Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README update & dependency installation #13

Merged
merged 3 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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