"Time Capsule" is a student project developed by Sofia Vaz Sousa and Vanessa Sue Smith.
Read more about Time Capsule here: https://time-capsule-final.netlify.app/about
For our Time Capsule Backend we are working with a RESTful API built with Express on Node.js. We are storing our data in a Mongo Database structured with mongoose. Server deployed to Heroku and MongoDB stored in Atlas.
We work with 3 main collections in our database: User, BabyProfile and DailyEntry. We have connected the collections by creating a relation to the User model, so for example each DailyEntry entry includes an entryBy property, which lists the ID of the user who authored this entry.
We have implemented validation where possible on each of our models, in order to control that the data stored in our database is clean and proper β¨
You can find the Time Capsule Frontend repository here, where we have put this API to the test πͺ: https://github.com/VanessaSue27/final-project-frontend
And a deployed LIVE version of it here: https://time-capsule-final.netlify.app/
Restricted endpoints : These can only be accessed after the user has successfully signed up or logged in. In order for it to be validated, these endpoints expect the user's valid access token included in the POST request's authorization header.
https://time-capsule-final.herokuapp.com/
Home Page, shows a list of the endpoints.
Restricted endpoint: Endpoint to show the last 5 daily entries for a specific baby.
Restricted endpoint: Endpoint to show the baby details (BabyProfile data) for a specific baby.
Registration endpoint: creates a new user (Sign Up) This endpoint expects a name and password in the client's POST request body in order to create a new User in the database.
Login endpoint: login for an already existing user. This endpoint expects a username and password in the client's POST request in order to authenticate an already existing User.
Restricted endpoint: Endpoint to create a new Baby Profile. The POST request done in the Frontend must include in the body: babyName, dateOfBirth, timeOfBirth, gestationalAge, sex, weight and length values.
Restricted endpoint: Endpoint to create a new Daily Entry. The POST request done in the Frontend must include in the body: dailyActivities, dailyWeight and dailyReflection values.
Restricted endpoint: Endpoint to add a personalised profile picture. The POST request done in the Frontend must include multipart form data for image handling.
Restricted endpoint: Endpoint to delete a specific entry. It takes the ID from the entry the user wants to delete and removes it from the database.
Restricted endpoint: Endpoint to edit a specific daily entry. It takes the entry ID from the entry the user wants to update, included in the request URL and updates it. The PATCH request done in the Frontend must include in the body: dailyActivities, dailyWeight, dailyReflection.