Cecilia0109 / cc-server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Court Canva

Getting Started ✨ ✨

Installation

$ npm i

Docker MongoDB

Please make sure you have installed Docker in your local environment. You can download Docker from here

$ docker compose up

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

Project Tech Stack

Back-end
Node Version: v16.14
Framework: Nest.js
Scripting Language: Typescript
Testing: Jest
Code Control: Eslint, Prettier
Git Hook: Husky, commitlint, lint-staged
Database: MongoDB
Object Modelling Tool: Mongoose
Cloud database service: MongoDB Atlas
Healthchecks: Terminus

Environment Variables

Add a file named .env at the root directory. Copy the .env code from Backend ENV ticket on notion(Get notion access permission from the development group) and paste it in .env. You can refer to the .env.example file in the directory and repo.

Notion Board

We put our ticket board and other important information in the notion board. Please advise our BA to get access to it.

Code of Conduct 📋

1. Creating New Branches
  • Warning:heavy_exclamation_mark::cop:: No one was allowed to manipulate main branch directly in any way and for any reason. When you get a new ticket and plan to start your work, please create a new branch then start coding. You can create a pull request to make your work able to be reviewed and tested by team and get your code merged after getting enough approvals.
  • Branch Name Example: "feature/cc-0027-a-user-can-view-pro-full-court"
  • Tutorial about branch management: Link
  • It is better to delete your branch after your pull request is approved and your branch have been merged into main branch.
2. Commit Message

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

feat: add hat wobble
^--^  ^------------^
|     |
|     +-> Summary in present tense.
|
+-------> Type: chore, docs, feat, fix, refactor, style, or test.

More Examples:

  • feat: (new feature for the user, not a new feature for build script)
  • fix: (bug fix for the user, not a fix to a build script)
  • docs: (changes to the documentation)
  • style: (formatting, missing semi colons, etc; no production code change)
  • refactor: (refactoring production code, eg. renaming a variable)
  • test: (adding missing tests, refactoring tests; no production code change)
  • chore: (updating grunt tasks etc; no production code change)

References:

3. Pull Request
  • Pull Request Title Example: "Feature/cc 0042 a user can log in sign up for my account"
  • Tutorial About How To Create A Pull Request: Link
  • 4. Specific Code Convention
  • Basically we will use double double quotes ""instead of single quotes'' in the front end project.
  • In terms of indentation, our indentation in the project is two spaces.
    How To Change Indentation in your VS code
  • Please format your code before submitting your work.
  • About


    Languages

    Language:TypeScript 85.2%Language:JavaScript 14.0%Language:Dockerfile 0.4%Language:Shell 0.3%