Version control based recipe for Spring 18 ITWS 4500 course. All project materials such as the Proposal and Presentation can be found in the MISC folder. A server hosting our project can be found here: http://52.170.95.42/ Our slides and notes for the final presentation can be found here: https://docs.google.com/presentation/d/10IKhqsdQ-_AgRApVFVHrB_aBnAiZC4t5sGASLMGvUnw/edit?usp=sharing
Before you started, make sure you have docker installed and can run the hello-world demo.
- Clone the repo
$ git clone https://github.com/bobmayuze/Vercipe
- Build images. You will not see the db connected this time, don't worry about it.
$ ./scripts/init.sh
After you see MongoDB says
mongo | MongoDB configured successfully. You may now connect to the DB.
mongo | $cmd
Press crtl + c to stop all these containers.
- Rebuild containers, and migrate mongo Database. Firstly restart all containers:
$ ./scripts/init.sh
Then, run DB_Migration script:
$ ./scripts/DB_Migration.sh
-
Start a new terminal, and cd into vercipe_frontend/frontend folder
-
Install the dependencies
$ npm install
- Make sure you ng-cli installed, then start the frontend dev mode
$ ng serve -o
Your browser should open a window at port 4200. If not, you can go to port 4200 to check it.
- Proposal.pdf
- Vercipe Project Timeline - Gantt Chart.pdf
Data Schema for a recipe
{
_id : ObjectId,
title: String,
creator: String,
creator_Email: String,
materials: [String],
instructions: [String],
created_at: Unix Timestamp,
version: Int,
previous_version: String
}
Endpoint: GET /
Authorization: none
Request Body: none
Response: 200 JSON object, {"msg" : 'hello world'}
Endpoint: POST /newRecipe
Authorization: none
Request Body:
{
title: string
creator: string
materials: array of string
version: number
previous_version: ObjectId
}
Response: 200 JSON object, {"status" : 'success'}
Endpoint: GET /allRecipes
Authorization: none
Request Body: none
Response: 200, Ordered (by index) JSON Array of Recipe Objects
Endpoint: POST /recipes
Authorization: none
Request Body: {"id":ObjectId}
Response: 200, one Recipe Object
Endpoint: POST /recipes/byMail
Authorization: none
Request Body: {"email":String}
Response: 200, Ordered (by index) JSON Array of Recipe Objects
Endpoint: POST /recipes/byTitle
Authorization: none
Request Body: {"title":String}
Response: 200, Ordered (by index) JSON Array of Recipe Objects
Endpoint: DELETE /recipes
Authorization: none
Request Body: {"title":String}
Response: 200, Ordered (by index) JSON Array of Recipe Objects
Endpoint: POST /recipes/forkById
Authorization: Log in as user
Request Body:
{
title: String
materials: [String]
creator: String
}
Response: 200, if success
Endpoin: POST /recipe/previous
Authorization: Null
Request Body:
{
"id": string
}
Response: 200, if success
Endpoin: POST /recipes/previous/all
Authorization: Null
Request Body:
{
"id": string
}
Response: 200, if success
{
"versions": [string]
}
Endpoint: POST /recipes/byUserName
Authorization: none
Request Body: {"creator":String}
Response: 200,
{
"result":[recipes]
}
Endpoint: GET /
Authorization: none
Request Body: none
Response: 200 JSON object, {"msg" : 'hello world'}
Endpoint: POST /sign_up
Authorization: none
Request Body:
{
newUser.email : String
newUser.username : String
newUser.password : String
newUser.passwordConf : String
}
Response: 200, if success
Endpoint: POST /sign_up
Authorization: none
Request Body:
{
newUser.username : String
newUser.password : String
}
Response: 200, if success
Endpoint: GET /dashboard
Authorization: Log in as user
Request Body: None
Response: 200, if success
Endpoint: POST /allRecipes
Authorization: None
Request Body:
{
"creater_email" : String
}
REsponse: { message : [Recipe]}