- Run
npm installandnpm install react-router-domandnpm install react-iconsandnpm install dotenvandnpm install bcrypt jsonwebtokenandnpm install react-datepicker --saveandnpm install jwt-decodefrom the root for application to run - Run
npm install nodemailerandnpm i --save unsplash-jsandnpm install --save-dev multerandnpm install --save groq-sdkinside the backend folder - Run
npm install react-markdowninside the frontend folder - Run
npm install --save-dev jestandnpm install @testing-library/react @testing-library/user-event react-router-dom jestandnpm install jest-environment-jsdom --save-devandnpm install util --save-devandnpm install --save-dev babel-jest @babel/core @babel/preset-env @babel/preset-reactandnpm install --save-dev @testing-library/react @testing-library/jest-domandnpm install --save-dev identity-obj-proxyandnpm install mongodb-memory-serverandnpm install mockingooseandnpm install cypress --save-devfrom root for tests to run - Coverage npm test -- --coverage
- To run the backend, create a .env file
touch .envand copy and paste this inMONGODB_URI = "mongodb+srv://whats-in-the-fridge-user:DWIRaCXhO11dWbPY@cluster0.dmiyl.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0". DWIRaCXhO11dWbPY is our temporary testing database password. - In this same .env file, you need to generate TOKEN_SECRET, use this call
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"and pasteTOKEN_SECRET = outputinto the .env file. If not running runnpm install node-gyp -gnpm install bcrypt -gnpm install bcrypt --save - To run acceptance testing, go to root, run
npm run cy:open
Link: https://white-stone-02cbbab1e.6.azurestaticapps.net
Link: https://drive.google.com/file/d/1-DF9gWVICOnoTd2iIAfFA8pn8QXNmS5H/view?usp=sharing
Link: https://docs.google.com/presentation/d/1mYY5xVuRVQNVl82VJjr9D-LUXhEZOkWFhZJvqiZmHfY/edit?usp=sharing
Figma Link: https://www.figma.com/design/2t0g61ZrfOgUqMNpqOzQGS/whats-in-my-fridge?node-id=3-4&t=2IYp4LDfXmCGodHy-1
Figma Prototype Link: https://www.figma.com/proto/2t0g61ZrfOgUqMNpqOzQGS/whats-in-my-fridge?node-id=3-4&t=2IYp4LDfXmCGodHy-1
Note: Need to include auto formatting based on dimensinons on screen.
Link: https://docs.google.com/document/d/1Ak_zM_7FnW5PO-jdHTA8a4cIh58q4heEO3FUmQtbRik/edit?usp=sharing
UML Class Diagram: https://drive.google.com/file/d/1S4yT_NFGVBmOmzIkn5r9AaRlGA2nTrHd/view?usp=sharing
Link: https://airbnb.io/javascript/react/
Installing Prettier:
- Go to extensions on the left hand bar on VS Code
- Search
Prettierand Install
- Create a branch
git branch TESTBRANCH - Update main before branching
git pull origin main - Go into the branch
git checkout TESTBRANCH - Retrieve latest from main
git pull origin mainORgit merge originORgit fetch - Modify code and files
- After finishing run
npm run formatANDnpm run lint - Add the files
git add .orgit add --all - Commit your branch
git commit -m "Message" - Push your branch
git push - Route back to main
git checkout main - Retrieve latest from main again (in case you don't have the lastest version)
git pull origin main - If there is modifications, fix and then merge
git merge TESTBRANCH - Push all changes to repo
git push origin main
Link: https://react-icons.github.io/react-icons/
6/5/2025 10:00PM:
-----------------------|---------|----------|---------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
|---|---|---|---|---|---|
| All files | 86.93 | 81.13 | 87.4 | 86.83 | |
| UserHouse-services.js | 95.91 | 100 | 100 | 95.91 | 212-213 |
| UserHouse.js | 100 | 100 | 100 | 100 | |
| app.js | 79.29 | 71.83 | 79.48 | 79.18 | 60-61,98,143,269,288-292,309,321,330-332,347-350,372-400,437,527-528,558-559,607,634-635,640-649,685-689,708-713,719-721,786-826,844,859,881-890,950,969-970,984-994,1020,1034,1047 |
| food-item.js | 100 | 100 | 100 | 100 | |
| food-services.js | 100 | 100 | 100 | 100 | |
| house-services.js | 100 | 100 | 100 | 100 | |
| house.js | 100 | 100 | 100 | 100 | |
| user-services.js | 100 | 100 | 100 | 100 | |
| user.js | 100 | 100 | 100 | 100 | |
| ----------------------- | --------- | ---------- | --------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |