This repo contains all the code for the backend of Project Breaktime, a project developing a time-tracking dashboard. This project utilizes a ReactJS (Frontend) and NodeJS (Backend).
To fully setup the backend follow these steps:
Nagivate to the root of this repo and run the following command
-
Run the following command to install all necessary packages.
npm install
-
Next create a file at the root of the project named
.env
. Ask a member of the development team on breaktime for the contents of this file. These are the private tokens required to run certain parts of the backend (Connecting to the Database, etc). -
Now run
npm start
and ensure that no errors show up, if you do not get any errors in the startup everything is successfully running!
To learn more about the various technologies utilized here you can read more about them below:
- What is backend development?
- NestJS : The framework utilized for our backend endpoints
- AWS Cognito : What is used for our user authentication
Our file structure is outlined below, while not all files are documented here these are several important ones for our design:
breaktime-backend/
├─ src/ - Directory housing almost all code
│ ├─ aws/
| | ├─ cognito/ AWS Coginto modules for various functionality
| | ├─ decorators/ Decorators for role-based functionality
| | ├─ middleware/ Functionality for actually authenticating a user
| | ├─ auth.controller.ts - Endpoints requiring authentication through AWS Cognito
| | ├─ auth.module.ts - Nest configuration file
| ├─ db/ Modules containing database functionality
| ├─ users/ Modules for users
| ├─ utils/ Utility modules
| ├─ app.module.ts
| ├─ constants.ts - Global constants
| ├─ dynamodb.ts - Main interface for interacting with database
| ├─ main.ts - main method / root of the project
├─ test/ - Directory containing test files
| ├─ UploadTimesheet.ts - A file used in debugging to upload arbitrary timesheets
├─ .gitignore - files ignored by git
├─ package.json - project configuration file
├─ README.md