A Modern, Scalable System Architecture with the Edge compute power
Official Backend System Architecture of navigo — empowering innovation.
Explore the docs »
View Website
·
Report Bug
·
Request Feature
Table of Contents
navigo Main Codebase is a comprehensive enterprise grade monorepo contains multiple applications organized in a scalable architecture.
- Security by Design: Every component is built with security as a priority
- Scalable Architecture: Designed to grow with traffic
- Maintainable Codebase: Clean, documented, and easy to maintain
- Cloud Native: Optimized for modern cloud environments
main-codebase/
├── apps/ # Application packages
│ ├── web/ # Main web application
│ ├── hono-server/ # Cloudflare backend worker
│ ├── kafka-producer/ # Admin-portal for the entire infrastructure management and overlook
│ ├── kafka-consumer/ # Admin-portal for the entire infrastructure management and overlook
├── packages/ # Shared packages
│ ├── api-endpoints/ # Api-endpoints shared across tools, apps and packages
└── tools/ # Build and development tools to ease navigo Event management or plan execution
- Microservices Architecture
- DevOps Integration
- CI/CD Pipeline Support
- Detailed Documentation
- Animation System
- Modern UI Components
- Clone the repository
git clone https://github.com/navigomjcet/main-codebase.git
cd main-codebase- Install pnpm pnpm is the package manager used for managing dependencies in this repository. To install pnpm, follow the steps below based on your operating system:
You can install pnpm globally using Homebrew (macOS) or npm (Linux/macOS/Windows) :
npm install -g pnpm
If you encounter any issues with the installation, refer to the official pnpm documentation.
- Install dependencies
pnpm installThe project contains a web application built using Next.js. To run the application, follow these steps:
- Run the Web UI Locally To start the web application locally, use the following command:
nx serve web This will start the development server on a local machine and you can access the application in your browser at http://localhost:3000. If port 3000 is already in use, it will automatically use the next available port (e.g., 3001).
- What Happens in the web Application The web application is built using Next.js, a React framework, and is designed to be used as the user interface of this project. Any changes made within the web directory will trigger rebuilding the project and potentially redeploying the application to Cloudflare Workers.
The web application is also deployed to Cloudflare Workers. This deployment happens automatically when changes are made inside the web folder.
- Deployment Flow Changes made within the apps/web folder will trigger automated web deployment to Cloudflare Workers. This is managed by OpenNext scripts written with pnpm run build and pnpm run deploy, through CD pipeline using Cloudflare accont ID and API token. Every time you run the nx serve web command and changes are made, the build will trigger the deployment process to Cloudflare Workers, ensuring the latest version is always live.
pnpm install- Install all dependenciesnpx nx dev <app>- Start development servernpx nx build <app>- Build applicationnpx nx test <app>- Run testspnpm lint- Lint code
Nx provides several commands for managing your monorepo, including tasks like running, building, testing, and linting applications and libraries.
- nx serve Starts the development server for a given project (e.g., web).
nx serve web This will start the development server for the web project, and you can access the application at http://localhost:3000 (or the next available port).
- nx build Builds the project and compiles the code.
nx build web This command will build the web project and output the compiled code to the dist/ folder, which is ready for deployment.
- nx lint Runs linting checks on the specified project.
nx lint web This will check the web project for linting errors, and output any issues found.
- nx test Runs unit tests for a given project.
nx test web This will run the unit tests for the web project and show the results in the terminal.
- nx affected:build Builds the affected projects based on the changes made to the workspace.
nx affected:build --base=main --head=HEAD This will only build projects that were affected by the changes between the main branch and the current branch.
- nx run-many Run a target (e.g., build, test, lint) for multiple projects at once.
nx run-many --target=build --projects=web,other-app This command allows you to run the build target for both the web project and another app in the workspace.
- nx migrate Upgrade the Nx workspace and its dependencies to the latest version.
nx migrate latest This will migrate your workspace to the latest Nx version, making sure everything is up-to-date.
If you run into any issues, here are a few things to check:
Make sure pnpm is installed: Verify that you can run pnpm --version to ensure pnpm is installed globally. Run Nx with --verbose: If a command isn't working as expected, try adding --verbose to get more detailed error logs. Clear Nx cache: If things are stuck, try clearing the Nx cache with nx reset and reinstall dependencies.
Contributions are welcome! Please read our contributing guidelines before submitting pull requests.
Start from dev branch. When starting any work, always create your branch from dev.
Branch naming convention:
feat/featurename→ For new featuresfix/whatyouarefixing→ For bug fixesupdate/whereyouareupdating→ For content updatesdocs/whatyouupdated→ For documentation changesrefactor/whatyourefactored→ For code refactoringhotfix/urgentfix→ For urgent production fixes
Step 1: Development
- Push your changes and create a PR to merge into
dev. - Provide a clear description of your work.
Step 2: Testing
- After merging into
dev, create a PR totest. - Ensure all code passes checks.
- Minimum 2 approvals required.
Step 3: Production
- Create a PR from
test→main. - Must be approved by Adnan and one reviewer.
- Upon approval, code is deployed.
Use prefixes for consistent commits:
| Prefix | Purpose |
|---|---|
| feat | New features |
| fix | Bug fixes |
| docs | Documentation updates |
| refactor | Code refactoring |
| style | Non-functional changes (formatting) |
| test | Adding/updating tests |
| chore | Maintenance tasks |
Example:
feat: add events page with dynamic fetching
All CI/CD checks (ESLint, build, and deployment validations) must pass before merging.
If merge conflicts occur, contact the Adnan immediately.
All PRs should be reviewed within 5 days of submission.
In case of urgent fixes, the Adnan may merge directly to production.
This project is licensed under GPL-3.0
These open-source projects power navigo backend: