This Project serves the backend APIs required for Real Dev Squad web projects. This project is built in Express.js.
- The application uses node-config(documentation) for managing config.
- Create a new file:
config/local.js. Override the required config values fromconfig/development.jsandconfig/default.jsintoconfig/local.js. - Register the application for GitHub OAuth to get the
clientIdandclientSecret. Add the callback URL ashttp://<HOSTNAME>:<PORT>/auth/github/callback - Create an application on FireStore and generate a service file. Add the service file credentials in the local config (or your env variables) as a string. Make sure you convert all the escape sequence (newline) -
\nwith\\nin private_key field. - For running the project locally, Firebase Local Emulator Suite can also be used instead of using the remote DB. Steps for setting it up: CONTRIBUTING.md - Using Firebase Emulator Locally
Please install pnpm version 12 (see pnpm installation).
No separate node version manager is needed: this repo pins node 26.8.1 via the
devEngines.runtime field in package.json, so pnpm automatically downloads and uses
the correct node for all scripts (pnpm dev, pnpm test, …). Verify with
pnpm exec node --version, which should print v26.8.1.
Install all the packages with a frozen lockfile, so versions stay exactly as locked:
pnpm install --frozen-lockfileThis command should be successful, before moving to development.
pnpm validate-setupHead over to TDD Tests Files List, and add the list of your new (or old) test files.
You can use wildcard '*' in the filepaths
Run TDD in watch mode. Exiting this command will print the coverage report. Try to achieve 100% coverage.
pnpm tdd:watchpnpm dev- Install packages
pnpm install
- Run tests
pnpm test
- Prune dev dependencies
pnpm prune --prod
- Run start command (with port information)
pnpm start
Note: These are handled automatically behind the scene when pushing to Heroku
Check out our video on how to setup the backend here: Wiki link
Read more about contributing to the project: CONTRIBUTING