Appearance
Local Development Guide
This guide provides the necessary information to set up and run the Majestic Transport monorepo locally for development and testing.
Prerequisites
Before you begin, ensure you have the following installed on your machine:
- Node.js (LTS version recommended)
- pnpm (The preferred package manager for the monorepo)
- Docker (For running the database locally)
Getting Started
Follow these steps to set up your local development environment:
Clone the Repository:
bashgit clone <repository-url> cd majestic-transportInstall Dependencies:
bashpnpm installSet Up Environment Variables: Each application has its own
.env.examplefile. Copy these files to.envand configure them for your local environment.Start the Local Database:
bashdocker-compose up -dInitialize the Database: Run the migrations for the API to set up the database schema.
bashpnpm --filter @majestic-transport/api db:migrate
Common Commands
The monorepo uses Turborepo to manage tasks efficiently. You can run commands from the root or within specific application directories.
| Command | Description |
|---|---|
pnpm dev | Starts all applications in development mode simultaneously. |
pnpm build | Builds all applications and packages for production. |
pnpm lint | Runs linting across the entire monorepo. |
pnpm test | Executes the test suite for all applications and packages. |
Application-Specific Commands
You can use the --filter flag with pnpm to run commands for specific applications or packages:
- Start only the API:
pnpm --filter @majestic-transport/api dev - Start only the Admin Panel:
pnpm --filter @majestic-transport/admin dev - Start only the Driver App:
pnpm --filter @majestic-transport/driver start
Contributing Guidelines
Always follow the established architectural patterns and coding standards when contributing to the Majestic Transport monorepo. Refer to the System Overview and the documentation for each application and package for specific guidance.