Roadoxe is a project developed to practice good coding conventions and test-driven development (TDD). It is built with TypeScript and Express.js.
Make sure you have the following software installed:
- Node.js >= 18.15.0
- npm >= 9.6.1
- pnpm >= 8.5.1
- postgres >= 15.1
** Please note this is mono-repo and we handle workspaces using nx and pnpm **
** Running pnpm install in the root will install dependencies for all the apps and packages **
- Clone the repository:
git clone https://github.com/RoadOxe/Roadoxe.git- Navigate to the project directory:
cd Roadoxe- Install the dependencies using pnpm:
pnpm install- Setup Database using pnpm:
pnpm ts-node src/scripts/migrations/create-database.tsTo start the development server:
pnpm start:devTo build the project:
pnpm buildTo run the tests:
pnpm testTo maintain a consistent code style and ensure code quality, the following conventions are followed in this project:
-
Linting: ESLint is used for linting the TypeScript code. You can run the linting checks using the following command:
pnpm lint
-
Formatting: Prettier is used for code formatting. You can format the code using the following command:
pnpm format
-
Commit Messages: The project enforces a commit message format using commitlint. Commit messages should follow the format:
<verb in imperative mood>: <what was done>. Allowed verbs in imperative mood includefeat,fix,bump,chore,refactor,reformat,optimise,document,merge. Example:feat: add login button. -
Git Hooks: Husky is used to set up Git hooks for pre-commit and pre-push actions. These hooks ensure that the code is properly formatted, linted, and follows the commit message conventions before committing or pushing to the repository. ...
For detailed coding conventions, please refer to the CODING_CONVENTIONS.md file.
This project is licensed under the ISC License. See the LICENSE file for details.