Backend for the WeCare app allowing efficient collaboration between carers and care users.
This project is about building the backend of a care management platform.
Github repo: Go to Repo Deployed heroku link: Go to Heroku
- About the Project
- Technologies
- Main logic of the application
- Local Installation
- Deployed Application
- Contact the team
AS A WeCare user who is involved in the provision of care services
I CAN access all my relevant care information digitally, in one place and make live changes
SO THAT the quality of care provision is optimisedFor this project, the following technologies and packages were used to build the backend :
- Node.js v18.2.0 and NPM v8.9.0
- "@faker-js/faker": "^7.5.0",
- "apollo-server": "^3.10.2",
- "axios": "^0.27.2",
- "bcrypt": "^5.0.1",
- "date-fns": "^2.29.2",
- "dotenv": "^16.0.2",
- "graphql": "^16.6.0",
- "jsonwebtoken": "^8.5.1",
- "mongoose": "^6.5.4"
For testing of the API calls: Postman. The queries and mutations are compiled in the queries.md file in this repo.
Our database is built in MongoDB with the following collections of documents and their subdocuments:
- Users:
- Address
- Supervisors
- Carers:
- Review
- Patients:
- CarePlan
- AddressLookup
- Appointments:
- Review
- Notifications
Our associations are:
- All users have a
userprofile, and they have a second profile depending on their role:supervisor,carerorpatient - All appointments reference the carer and the patient involved
- All notifications reference the sender and the receiver involved, and when applicable the appointment involved
Should you wish to get this project installed on your local machine, the following steps are required:
Clone the two repositories:
For each repo, go into the new repository and install the required packages:
cd {{repo-name}}
npm install
Once installed, make sure to set the environment variables as per the .env.sample file.
To create and seed information into a local database, from the root folder, open an integrated terminal and enter the instruction below and press enter:
npm run seed
You can check your database in MongoDB Compass and should see your database and all the relevant collections.
To start your backend, enter the following command:
npm run start
Once your server is up and running, you can get the frontend running, and once they are both running, you should be able to use the application as intended.
Backend deployment: Heroku
Frontend deployment: Heroku
When accessing the application, the following sample user accounts can be used:
- Log in as a carer: Darien53@example.org
- Log in as a patient: Riley_Lueilwitz@example.org
- Log in as a supervisor: supervisor@example.org
All seed accounts use the password: password123
If you have any questions about this application, feel free to get in touch with any member of the team:
