Skip to content

Commit

Permalink
README update & dependency installation (#13)
Browse files Browse the repository at this point in the history
* Install MUI in frontend

* Update README.md with clearer env variable setup instructions

* Update nodemailer version
  • Loading branch information
benjaminJohnson2204 authored Jan 17, 2024
1 parent ea369ec commit af2e281
Show file tree
Hide file tree
Showing 6 changed files with 548 additions and 18 deletions.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,20 @@ This project is built with MongoDB, Express.js, Node.js, React, TypeScript, Next

Before running the project, you must configure environment variables for the frontend and backend. Environment variables contain information that may be different between different developers and development vs. production environments, and/or may be sensitive information we don't want to put in our public GitHub repos (e.g. Firebase keys, email account password).

See the `.env.example` files in both the frontend and backend for a list of environment variables and example values. The real values (for sensitive variables, such as Firebase settings) can be found in our project's Google Drive (TSE Drive -> PAP -> Development -> Environment Variables). The `src/util/validateEnv.ts` files in both the frontend and backend list the expected types for each environment variable, and will throw an error if any environment variables are missing or of the wrong format when you run the project.
See the `.env.example` files in both the frontend and backend for a list of environment variables and example values. The real values (for sensitive variables, such as Firebase settings) can be found in our project's Google Drive (TSE Drive -> PAP -> Development -> Environment Variables). Note that on Google Drive, the environment variable files are named `.env.backend.development` and `.env.frontend.development`, but you will need to rename them to just `.env` when you put them in the backend and frontend directories respectively. This is because by default, our code will look for a file named `.env` to get environment variables from.

Once your environment variables are setup, your file structure for the project should look like:

- PAP-Inventory-Processing
- backend/
- .env (renamed from `env.backend.development`)
- - [other directories & files]
- frontend/
- .env (renamed from `env.frontend.development`)
- - [other directories & files]
- [other directories & files]

The `src/util/validateEnv.ts` files in both the frontend and backend list the expected types for each environment variable, and will throw an error if any environment variables are missing or of the wrong format when you run the project.

### Backend

Expand Down
7 changes: 4 additions & 3 deletions backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"mongodb": "^5.7.0",
"mongodb-memory-server": "^9.1.1",
"mongoose": "^7.4.0",
"nodemailer": "^6.9.7",
"nodemailer": "^6.9.8",
"supertest": "^6.3.3",
"ts-jest": "^29.1.1"
},
Expand Down
1 change: 0 additions & 1 deletion frontend/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
/// <reference types="next/navigation-types/compat/navigation" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
Loading

0 comments on commit af2e281

Please sign in to comment.