The main goal of this project is to create a simple and easy to use time tracking application using Google Sheets to store all the data. This is aimed to managers who want to track their employees' time.
This is the backend of the application. It is a REST API that is used to communicate with the Google Sheets API. You can find the frontend here. This project is built on NodeJS using the ExpressJS framework.
- Deploy to GCP Cloud Run
- (Prerequisites)
- Install NodeJS and npm (included with NodeJS)
- Copy the
.env.example
file and rename it to.env
. Fill in the values for the environment variables.
- Clone the repository
- Run
pnpm install
to install all dependencies - Run
pnpm build
to build the project - Run
pnpm start
to start the server - Open
http://localhost:8000
in your browser to view the application
- Run
npm run dev
to start the server in development mode (this will build the project and start the server in watch mode) - Run
npm run test
to run the tests - Run
npm run test:dev
to run the tests in watch mode
- Run
npm run lint
to lint the project using ESLint (without fixing the errors) - Run
npm run lint:fix
to lint the project and fix linting errors - Run
npm run format:check
to check the formatting using Prettier (without fixing the errors) - Run
npm run format
to format the project using Prettier (and fix the errors)
NOTE: The project is automatically linted and formatted on commit using Husky and Lint-Staged.
- ExpressJS
- A NodeJS framework used to build the REST API
- TypeScript
- A superset of JavaScript that adds static typing to the language
- Google Apis
- A library that allows you to easily interact with Google APIs
- Zod
- A TypeScript-first schema declaration and validation library used to validate client requests
- Winston
- A logger library used to log errors and other information