Please be patient with the deployed version as we use free tier services to deploy and it takes quite a while for things to load. Thank you!
Table of Contents
A customizable time management web app that creates schedules of when to work on assignments based on personal user preferences.
https://trello.com/b/qHGNCIJI/stressless
- Users can input activities (both recurring and one-time) they must do, including class time, assignments, extracurricular activities, work hours, meal times, and sleep times.
- Users will fill out an initial survey to input preferences for productivity times, free time, sleep/wake up times, and work/break preferences.
- The app designs a weekly routine for an academic semester that caters to the user’s commitments and preferences.
- Users can update their planned activities and regenerate the calendar.
- Notifications for upcoming deadlines and important events.
Use Case 3 defining Julie's ability to create an account, log in, and take the preferences survey is currently operational. The user is able to perform all three of the aformentioned tasks.
This is a mono-repo project structure. The root directory contains the backend, frontend, and documentation directories. The backend and frontend directories contain their respective codebases. There are 3 package.json in total. The root package.json is used for global dependencies and scripts only. See Monorepo Guide for more information.
StressLess/
├── backend/
├── src/
├── index.ts (entry point)
├── client.ts (database connection)
├── config/ (configuration files)
├── controllers/ (business logic)
├── routes/ (API endpoints)
├── test/ (unit tests)
├── .gitignore, package.json, tsconfig.json
├── README.md (read to set up environment)
├── frontend/
├── public/
├── index.html
├── manifest.json
├── .ico, .png
├── src/
├── app/ (Next.js app directory)
├── calendar/
├── dashboard/
├── preference/
├── page.tsx
├── layout.tsx
├── components/
├── lib/
├── styles/
├── tests/
├── .gitignore, package.json, tsconfig.json
├── eslint.config.mjs, next.config.ts, next-env.d.ts, postcss.config.mjs
├── vitest.config.ts, vitest.setup.ts
├── README.md
├── docs/
├── agile docs/
├── Living Document.md # requirements, user stories, etc.
├── milestones report/
├── Sprint [num]/
├── Sprint Journal [num].md
├── Sprint Planning [num].md
├── Sprint Review [num].md
├── dev docs/
├── general bugs fixed/ # log bugs that were not specific to backend or frontend
├── typescript styling/ # log typescript styling configurations
├── prettier.md # guide to automate code formatting
├── eslint.md # guide to catch typescript violations
├── README.md
├── .gitignore
├── .prettierrc, .prettierignore # code formatter
├── eslint.config.mjs # linter
├── package.json # global dependencies and scripts
- The
docsdirectory contains all markdowns, separated intoagile docsanddev docs. - Upon updating the project, please update this
README.mdwith the new directory structure. - Add files/folders that should not be committed to git in the
.gitignorefiles in the root,backend, orfrontenddirectories as suitable. - NEVER commit
.envfiles or any sensitive information to the repository. - Always document new technology and how to start things up in the
README.md. - Main Branch Protection: The
mainbranch is protected. This means:- Do not commit directly to the
mainbranch. - Make changes in a new branch and then make a pull request to merge changes into the
mainbranch. - When making a pull request, another team member should approve the pull request and merge to
main.
- Do not commit directly to the
- Frontend:
- React
- TypeScript
- Backend:
- Node
- TypeScript
- Express
- Database:
- Authentication:
- Look at the package.json global, backend package.json, and frontend package.json for more information on the dependencies and available scripts.
- Use
pnpminstead ofnpmfor commands. - Use
pnpm execinstead ofnpxfor commands. - TypeScript Style Guide: Please refer to this document We chose the Google TypeScript Style Guide because it promotes consistency, readability, and maintainability in TypeScript projects. It aligns with industry best practices, ensuring clean and efficient code that is easy to understand and collaborate on. To enforce these guidelines, we plan to:
- Configure
Prettierto handle code formatting automatically. See the file Prettier Guide for more information. - Configure
ESLintto catch TypeScript violations. See the file ESLint Guide for more information. - Possibly enable pre-commit hooks with
Huskyto run linting and formatting checks. - Integrate these tools into the CI/CD pipeline to prevent non-compliant code from being merged.
- Conduct code reviews to catch any remaining inconsistencies.
- Configure
- Clone the repository if you have read/write access:
git clone git@github.com:StressLess-Team/StressLess.git
cd StressLessIf you do not have read/write access to this repository but you want to contribute to StressLess, please see Contributing Guidelines for instructions on forking and making pull requests. You can keep following the steps below to set up your local environment. In order for your forked repo's GitHub actions to run correctly, you have to enter every environment variables into GitHub secrets in Settings. You should also get your deploy services secrets and put them into GitHub secrets for the deploy.yml action file to run.
In the backend directory, create a .env file and add the following variables:
PORT=3001
PGHOST=<some-secret-key-found-on-neon>
PGDATABASE=<found-on-neon>
PGUSER=<found-on-neon>
PGPASSWORD=<some-secret-password-found-on-neon>
DATABASE_URL=<some-url>
DIRECT_URL=<some-url>In the backend directory, also create a .test.env file in the same format as the backend .env file.
However, please enter the information for the database used for automated testing.
When running automated tests, the variables from .test.env will be used.
In the frontend directory, create a .env file and add the following variables:
# Server-side
# Client-side
NEXT_PUBLIC_BACKEND_BASE_URL=<some-url>
# Firebase
NEXT_PUBLIC_FIREBASE_API_KEY=<get-from-firebase>
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=<get-from-firebase>
NEXT_PUBLIC_FIREBASE_PROJECT_ID=<get-from-firebase>
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=<get-from-firebase>
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=<get-from-firebase>
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.
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.
At root level, run:
pnpm installThis will install 3 workspaces, because we have specified so in 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.
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.
- After grades are released, please provide your own PostgreSQL database and Firebase credentials.
Please consult the sections Setting Environment Variables and Setting Other Secrets for more details on how to configure database and Firebase credentials.
- 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.)
- Make sure your
.envand.test.envfiles in the backend are good. See Setting Environment Variables and Setting Other Secrets for more details. You may contact a team member for the content of these files.
cd backend
pnpm exec prisma generateFor more information on how to use Prisma after initial setup, check out Prisma Guide
You may proceed to the section Development.
- Please provide two PostgreSQL databases on your own (one for development and one for automated testing)
- Make sure your
.envand.test.envfiles in the backend are good. See Setting Environment Variables and Setting Other Secrets for more details.
cd backend
pnpm exec prisma generateEnsure 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:
pnpm exec prisma migrate devTo add the schema to the automated testing database:
pnpm exec env-cmd -f ./.test.env prisma migrate devFor more information on how to use Prisma after initial setup, check out Prisma Guide
You may proceed to the section Development.
You can either go into each directory and start the backend and frontend separately or use a tool like concurrently to run both at the same time.
Read each README in the backend and frontend directories for more information. or follow the steps below:
- Start the backend:
cd backend
pnpm install
pnpm start- Start the frontend:
cd frontend
pnpm install
pnpm devTo build the frontend for production, run the following command in the frontend directory:
pnpm buildThis will create a .next directory with the production-ready files. Then you can run:
pnpm startTo run the unit tests for both frontend and backend, you can run at root level:
pnpm test:unitAlternatively, you can run the tests in each directory separately:
pnpm testTo run formatting and linting checks, you can run at root level:
pnpm format
pnpm linthttps://docs.docker.com/get-started/get-docker/
Open Docker Desktop. Then run in the command line at root level:
docker compose up --buildFor more information, see the Docker Guide.
- Milestone 1 - Requirements
- Milestone 2 - Git Setup
- Milestone 3 - Paper prototyping
- Milestone 4 - Feedback & Iteration
- Milestone 5 - Design & Architecture
- Milestone 6 - Testing & CI
- Milestone 7 - Release 1 and demo
- Milestone 8 - Documentation
- Milestone 9 - Code Review and demo
- Milestone 10 - Bug logging
- Milestone 11 - Final Presentation
- Milestone 12 - Final Release
- Alyssa
- Madel
- Nifemi
- Cheyanne
- Tim
- Khanh
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 for helping us implement our frontend calendar.
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.