The goal of this project is to discover, as a whole, the software platform that we have chosen through the
creation of a business application.
To do this, we have implemented a software suite that functions similar to that of IFTTT and/or Zapier.
This software suite is broken into three parts :
• An application server to implement all the features listed below (see Features)
• A web client to use the application from your browser by querying the application server
• A mobile client to use the application from your phone by querying the application server
The application offer the following functions :
- The user registers on the application in order to obtain an account
- The registered user then confirms their enrollment on the application before being able to use it
- The application then asks the authenticated user to subscribe to Services
- Each service offers the following components:
- type Action (see Action Components)
- type REAction (see REAction Components)
- The authenticated user composes AREA by interconnecting an Action to a REAction previously con-
figured - The application triggers AREA automatically thanks to triggers
- Team
- Requirements
- Usages
- Server
- Web application
- Mobile application
- API documentation swagger
- Database schema
- How it work
- Server
- Web
- Mobile application
- User manual
- Web app
- Mobile application
- Arthur Jourdan : Back-end developer
- Aurélien Joncour : Back-end developer
- Simon Racaud : Back-end developer, Documentation
- Sullivan Geslot : Pro mobile flutter developer
- Vincent Andrieu : Full-Stack developer
You should complete the server/.env
file with all the api keys.
To start the program, run at the root of the project:
docker-compose up
To stop
docker-compose down
That will start the back-end, the web app and build an apk for the mobile application.
Start manually
cd server && npm run start
You will also need to run a database mongo db version 4.4
cd server && npm run test
After starting the server. Go to http://localhost:8080/api-docs/ to see the Swagger documentation. That documentation describe the endpoints of the API.
Start manually
cd web && npm run start
TODO
Tables:
- Action
- Area
- Reaction
- User
{
type: string # Type name of the action ex: "CRON"
parameters: [{ # Parameter list
name: string # Field name ex: "timestamp"
label: string # Label to display ex: "Timestamp"
type: string # Type of the parameters ex: "TEXT" or "DATE"
}]
service: string # Name of the service ex: "GITHUB"
}
{
type: string # Type name of the reaction ex: "TWITTER_BANNER"
parameters: [{ # Parameter list
name: string # Field name ex: "timestamp"
label: string # Label to display ex: "Timestamp"
type: string # Type of the parameters ex: "TEXT" or "DATE"
}]
service: string # Name of the service ex: "TWITTER"
}
{
trigger: {
inputs: ActionConfig # Data structure to configure the action
action: Action # cf: Action table
outputs: Action Result # Data structure to stock contextual data if needed
}
consequence: {
inputs: ReactionConfig # Data structure to configure the reaction
reaction: Reaction # cf: Reaction table
}
}
{
username: string
password: string
token: string # OAuth token or jwt token
areas: array(Area) # List the area owned by the user (cd: area table)
oauth: { # OAuth2 : stock the token of each service to access their API
twitter: Data structure
github: Data structure
discord: Data structure
dropbox: Data structure
notion: Data structure
twitch: Data structure
twitter: Data structure
linkedin: Data structure
unsplash: Data structure
}
}
- Initialisation
- Area API CRUD
- Action/Reaction CRON
- Auth API endpoints
At the beginning, Express and the whole API start. After that, we initialize the database. If the tables Action or Reaction are missing, we create and fill them with the standard dataset (cf: /server/src/dataset/*.json). At the end, we start the Action/Reaction CRON service. (cf: following paragraph)
There are 5 endpoints to Create, Read one, Read all, Update and Delete user's areas. More information about those endpoints in the Swagger documentation (cf: Usages part)
The purpose of that module is to detect when an event occur (ex: a message is posted on github) and to trigger the associated reaction.
By default, the CRON run every minute. The actions of each user are evaluated one after another.
The schedule of the CRON can be configured through an API endpoint (cf: swagger documentation)
There are several endpoints used of the authentication of the users. The endpoints /auth/register and /auth/login allow the user of join the application with an email and a password. There are also several endpoints used to register or login the user on the application through the OAuth2 of other services. A new time, the swagger documentation define which endpoints are available.
- Github
- Action: When a new pull request is created
- Action: When a new issue is created
- Reaction: Create a new issue
- Reaction: Create a new pull request
- Notion
- Reaction: Append a text in a page.
- Discord
- Action: When a new message is posted in a channel
- Reaction: Post a new message in a channel
- Twitter
- Action: When an user post a new tweet
- Reaction: Post a new tweet
- Reaction: Update the banner of the account
- Reaction: Update the profile picture of the account
- Twitch
- Action: When a streaming is on live
- Dropbox
- Reaction: Upload a file
- RSS
- Action: When a stream is updated.
- Time
- Action: When a specific timestamp is reached
- Action: When a CRON schedule condition is true
- Unsplash
- Action: When an user post a new picture
- Action: Get a random post