-
Notifications
You must be signed in to change notification settings - Fork 1
Added information about providing own database and Firebase after grading is over into readme #125
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -197,11 +197,22 @@ NEXT_PUBLIC_FIREBASE_APP_ID=<get-from-firebase> | |
| NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID=<get-from-firebase> | ||
| ``` | ||
|
|
||
| **Note:** | ||
| After Spring 2025 grades are released by Grinnell College, the availability of database credentials used for our development cannot be guaranteed. | ||
| The availability of Firebase credentials cannot be guaranteed as well. | ||
| Therefore, after grades are released, team members may be unable to provide `.env` files. | ||
| You may need to provide your own PostgreSQL database and Firebase credentials after this point. | ||
|
|
||
| ### Setting Other Secrets | ||
| The file `backend/serviceAccountKey.json` is the Firebase service account key JSON. | ||
| An example is provided. This file is used to authenticate with Firebase services. | ||
| Ask a team member for the content of this file. | ||
|
|
||
| **Note:** | ||
| After Spring 2025 grades are released by Grinnell College, the availability of Firebase credentials used for our development cannot be guaranteed. | ||
| Therefore, after grades are released, team members may be unable to provide the `serviceAccountKey.json` file. | ||
| You may need to provide your own Firebase credentials after this point. | ||
|
|
||
| ### Installing Dependencies | ||
|
|
||
| At root level, run: | ||
|
|
@@ -212,20 +223,63 @@ pnpm install | |
|
|
||
| This will install 3 workspaces, because we have specified so in [pnpm-workspace.yaml](pnpm-workspace.yaml). This will install the dependencies for the backend and frontend. Alternatively, you can go into each directory and run `pnpm install` separately. | ||
|
|
||
| ### Setting Up the Database | ||
| ### Initial Database and Prisma Setup | ||
|
|
||
| How to set up the database will depend on whether the database services used for our development are still available: | ||
| - Before Spring 2025 grades are released, you may ask a team member for credentials. | ||
| - This way, graders may use the team's credentials for grading purposes. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Information on how to set up the database |
||
| - After grades are released, please provide your own PostgreSQL database and Firebase credentials. | ||
|
|
||
| Please consult the sections [Setting Environment Variables](#setting-environment-variables-please-contact-a-team-member-for-the-three-env-files) and [Setting Other Secrets](#setting-other-secrets) for more details on how to configure database and Firebase credentials. | ||
|
|
||
| ### Getting Onboard with Neon (Our Database) | ||
| 1. Ask Madel to add you to the StressLess Neon database. (Optional: For testing, you can use ThunderClient, which you can easily download on VSCode under Extensions.) | ||
| 2. Make sure your .env file in the backend is good. | ||
| #### Option A. Before Spring 2025 grades are released (for grading purposes): | ||
|
|
||
| ### Installing Prisma Client (Tool Used to Access Our Database Neon) | ||
| ##### Getting Onboard with Neon (Our Database) | ||
| 1. Optional: Ask Madel to add you to the StressLess Neon database. (Optional: For testing, you can use ThunderClient, which you can easily download on VSCode under Extensions.) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instructions on how to set up Neon, our database |
||
| 2. Make sure your `.env` and `.test.env` files in the backend are good. See [Setting Environment Variables](#setting-environment-variables-please-contact-a-team-member-for-the-three-env-files) and [Setting Other Secrets](#setting-other-secrets) for more details. You may contact a team member for the content of these files. | ||
|
|
||
|
|
||
| ##### Installing Prisma Client (Tool Used to Access Our Database Neon) | ||
|
|
||
| ```bash | ||
| cd backend | ||
| pnpm exec prisma generate | ||
| ``` | ||
|
|
||
| For more information on **Prisma**, check out [Prisma Guide](./docs/dev%20docs/database/Prisma.md) | ||
| For more information on how to use **Prisma** after initial setup, check out [Prisma Guide](./docs/dev%20docs/database/Prisma.md) | ||
|
|
||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Information after grades are released |
||
| You may proceed to the section [Development](#development). | ||
|
|
||
| #### Option B. After Spring 2025 grades are released: | ||
|
|
||
| ##### Setting Up A Database | ||
| 1. Please provide **two** PostgreSQL databases on your own (one for development and one for automated testing) | ||
| 2. Make sure your `.env` and `.test.env` files in the backend are good. See [Setting Environment Variables](#setting-environment-variables-please-contact-a-team-member-for-the-three-env-files) and [Setting Other Secrets](#setting-other-secrets) for more details. | ||
|
|
||
| ##### Installing Prisma Client (Tool Used to Access Your Database) | ||
|
|
||
| ```bash | ||
| cd backend | ||
| pnpm exec prisma generate | ||
| ``` | ||
|
|
||
| ##### Adding The Schema to Your Database | ||
| Ensure that the two databases are empty. | ||
| Ensure you are in the `backend` directory (which you should be if you completed the previous step). | ||
|
|
||
| **To add the schema to the development database:** | ||
| ```bash | ||
| pnpm exec prisma migrate dev | ||
| ``` | ||
|
|
||
| **To add the schema to the automated testing database:** | ||
| ```bash | ||
| pnpm exec env-cmd -f ./.test.env prisma migrate dev | ||
| ``` | ||
|
|
||
| For more information on how to use **Prisma** after initial setup, check out [Prisma Guide](./docs/dev%20docs/database/Prisma.md) | ||
|
|
||
| You may proceed to the section [Development](#development). | ||
|
|
||
| ### Development | ||
|
|
||
|
|
@@ -289,11 +343,11 @@ pnpm lint | |
|
|
||
| ## Docker | ||
|
|
||
| ## Install Docker Desktop for your OS. | ||
| ### Install Docker Desktop for your OS. | ||
|
|
||
| https://docs.docker.com/get-started/get-docker/ | ||
|
|
||
| ## Access the application by running | ||
| ### Access the application by running | ||
|
|
||
| Open Docker Desktop. Then run in the command line at root level: | ||
|
|
||
|
|
@@ -329,4 +383,8 @@ For more information, see the [Docker Guide](docs/dev%20docs/docker-guide.md). | |
|
|
||
| ## Acknowledgments | ||
|
|
||
| We would like to thank Professor Leah Perlmutter and our class mentor Elliot Swaim for their guidance and support throughout this project. | ||
| We would like to thank all of our stakeholders who gave us useful feedback to help us improve our app. We want to thank [this YouTube tutorial](https://youtu.be/VrC5XhjW6W0?si=_ibhdo7doCMXNtB3) for helping us implement our frontend calendar. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Acknowledgements to everyone who helped us |
||
| Finally, we would also like to thank all of our amazing teammates for all of their hard work, dedication, and creativity for making this project possible. | ||
|
|
||
| <a href="#readme-top">back to top</a> | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
notes to usersabout database credentials and firebase credentials