- Frontend
- Next.js
- Tailwind CSS
- Backend
- Express.js
- MongoDB (mongoose)
- Libraries
- Validation - express-validator, class-validator
- Testing - jest
To get started after cloning the repo, first install the necessary dependencies.
The client and server folders are individual pnpm packages, so you will need to install the respective dependencies separately.
Ensure you have pnpm installed. If you don't, follow this guide.
Run the following commands from the root folder.
pnpm i
cd client
pnpm i
cd ../server
pnpm iBy this point, you should have recieved an invitation email to the database.
If you haven't already, follow the link, make a new MongoDB account, and navigate to the overview page for MedMatch (may have to navigate through projects).
A banner should appear at the top saying that your IP address is not added to the whitelist. Click the button to add your IP address.
The tech lead should make a database user for you and provide you with a username and password. These will be necessary for the next section.
You will need to create a .env file in the /server directory.
Note: The file name should be ".env" verbatim, no file ending.
Then copy paste the following into the newly created file.
DB_USERNAME=[YOUR DATABASE USERNAME]
DB_PASSWORD=[YOUR DATABASE PASSWORD]
DB_HOST=radish.5ujpyx5.mongodb.net
DB_COLLECTION=medmatch
DB_CLUSTER=radish
DEV_PORT=4000
NODE_ENV=development
ACCESS_TOKEN_SECRET=[SECRET KEY]
REFRESH_TOKEN_SECRET=[DIFFERENT SECRET KEY]Make sure to replace the bracketed values with the corresponding data. You can use an online uuid generator to create secret keys.
In order to start the frontend development server, run the following command from the client directory.
pnpm dev
This works the same for the backend. Just run the same command from the server directory.
If you want to run both at once, navigate to the root directory and run the following command.
pnpm start
We will be using MkDocs for documentation. To run the documentation server, you need to do a few things.
- Install MkDocs and required plugins:
pip install mkdocs mkdocs-material pymdown-extensions - Run documentation server:
cd docs
mkdocs serve- View the site on: http://127.0.0.1:8000/
To build the static site:
cd docs
mkdocs buildThe static site is built in the docs/site directory.