creates a Profile schema for the profile collection in the db
creates a profile service file that contains functions for CRUD operations in the db for the Profile collection
creates the routes for Profile CRUD operations connecting to the db
adds jest tests for both the Profile service functions and routes
adds a script to run tests continuously while developing
For the frontend:
creates the user-facing profile page to display their profile information, along with options to edit or delete their profile
creates a form page for both creating a new profile (for first-time users) and updating an existing profile (for users who choose to edit)
adds jotai for storing app-wide state (such as the current user's profile id)
adds react-hook-form for easier form input validation and submission functionality
adjusts main app to use responsive height for layouts
Usage
To test,
startup the backend server by navigating to /backend-api and running npm start
startup the frontend app by navigating to /frontend-ui and running npm run dev
open a browser window to localhost:3000
use your browser tools to toggle responsive design previews for phone screens
use the navbar to navigate to "Profile" to view the current default profile details
manually navigate to localhost:3000/profile/create to input information for a new profile (to be used during account creation)
submit the form and notice the redirct to the profile details page with the newly created profile info
click the "Edit Profile" button to adjust the values of the current profile
submit your desired changes and notice the changes reflected in the profile details once again
click the red trash icon to delete the profile (this will eventually require a confirmation dialog)
notice the redirection to the profile page for the default profile information once again (this is temporary, since profile deletion in the final app would actually delete the account and log you out)
Optionally, checkout the mongoDB atlas database and browse the 'profiles' collection to watch the profile objects being added/updated/persisted/deleted while working through the above steps, however the jest tests written for the backend should cover those use cases, and should show as "passing" on github actions.
What has been done?
For the backend:
For the frontend:
Usage
To test,
/backend-api
and runningnpm start
/frontend-ui
and runningnpm run dev
localhost:3000
localhost:3000/profile/create
to input information for a new profile (to be used during account creation)Optionally, checkout the mongoDB atlas database and browse the 'profiles' collection to watch the profile objects being added/updated/persisted/deleted while working through the above steps, however the jest tests written for the backend should cover those use cases, and should show as "passing" on github actions.