Skip to content

Adnan-The-Coder/navigo-platform-core

Repository files navigation

NAVIGO - Advance Backend system powered with multiple microservices and Event driven Architecture

Status

navigo Logo

A Modern, Scalable System Architecture with the Edge compute power

Next.js TypeScript Tailwind CSS PNPM Nx Cloudflare Workers HonoJS D1 Database Drizzle Mailtrap Resend Supabase GCP OAuth ESLint GitHub Actions Apache Kafka

Official Backend System Architecture of navigo — empowering innovation.

Explore the docs »

View Website · Report Bug · Request Feature

Table of Contents
  1. Overview
  2. Core Principles
  3. General commands
  4. Top Contributers
  5. Roadmap
  6. License
  7. Contact
  8. Acknowledgments

🌟 Overview

navigo Main Codebase is a comprehensive enterprise grade monorepo contains multiple applications organized in a scalable architecture.

Core Principles

  • 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

📁 Project Structure

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

Features

  • Microservices Architecture
  • DevOps Integration
  • CI/CD Pipeline Support
  • Detailed Documentation
  • Animation System
  • Modern UI Components

🚦 Getting Started

  1. Clone the repository
git clone https://github.com/navigomjcet/main-codebase.git
cd main-codebase
  1. 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.

  1. Install dependencies
pnpm install

Running the Web UI

The project contains a web application built using Next.js. To run the application, follow these steps:

  1. 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).

  1. 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.

Deployment to Cloudflare Workers

The web application is also deployed to Cloudflare Workers. This deployment happens automatically when changes are made inside the web folder.

  1. 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.

📦 Available Scripts

  • pnpm install - Install all dependencies
  • npx nx dev <app> - Start development server
  • npx nx build <app> - Build application
  • npx nx test <app> - Run tests
  • pnpm lint - Lint code

General Nx Commands

Nx provides several commands for managing your monorepo, including tasks like running, building, testing, and linting applications and libraries.

  1. 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).

  1. 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.

  1. 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.

  1. 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.

  1. 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.

  1. 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.

  1. 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.

Troubleshooting

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.

🤝 Contributing

Contributions are welcome! Please read our contributing guidelines before submitting pull requests.

Contributing Guidelines

1. Branching Strategy

Start from dev branch. When starting any work, always create your branch from dev.

Branch naming convention:

  • feat/featurename → For new features
  • fix/whatyouarefixing → For bug fixes
  • update/whereyouareupdating → For content updates
  • docs/whatyouupdated → For documentation changes
  • refactor/whatyourefactored → For code refactoring
  • hotfix/urgentfix → For urgent production fixes

2. Pull Request (PR) Workflow

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 to test.
  • Ensure all code passes checks.
  • Minimum 2 approvals required.

Step 3: Production

  • Create a PR from testmain.
  • Must be approved by Adnan and one reviewer.
  • Upon approval, code is deployed.

3. Commit Message Guidelines

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


4. CI/CD Pipeline

All CI/CD checks (ESLint, build, and deployment validations) must pass before merging.

5. Conflict Resolution

If merge conflicts occur, contact the Adnan immediately.

6. PR Review Time

All PRs should be reviewed within 5 days of submission.

7. Emergency Procedure

In case of urgent fixes, the Adnan may merge directly to production.


(back to top)


🧾 License

This project is licensed under GPL-3.0


🙏 Acknowledgments

These open-source projects power navigo backend:

Built with ❤️ by Adnan

About

Monorepo powering the NavigoRides backend — microservices, infra, and deployments built with NodeJS, Kafka, HonoJS, and Kubernetes.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

 
 
 

Contributors