Skip to content
Monadix-AIPublic

About

A cutting-edge, high-performance monorepo template

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Codex

Bun Turborepo Biome Lefthook Conventional Commits Docker

Codex is a cutting-edge, high-performance monorepo template built with Bun, Turborepo, and a suite of modern frameworks. It's designed for developers who want a unified codebase for web, mobile, and backend services with maximum speed and developer experience.

✨ Features

  • 🏎️ Powered by Bun: Lightning-fast installation, runtime, and bundling.
  • 🏗️ Turborepo: Optimized build pipelines and intelligent caching.
  • 🎨 Unified Design System: Share components across Next.js and Expo.
  • 🛠️ Developer Experience: Pre-configured with Biome, Lefthook, and Conventional Commits.
  • 🌍 Fullstack Ready: Includes Elysia, NestJS, Next.js, and Expo.

📁 Project Structure

codex/
├── apps/
│   ├── elysia/             # High-performance ElysiaJS API
│   ├── expo/               # React Native mobile application
│   ├── nestjs/             # Enterprise-ready NestJS API
│   └── nextjs/             # Fullstack React framework (App Router)
├── packages/
│   ├── biome-config/       # Shared linting & formatting (Biome)
│   ├── tsconfig/           # Shared TypeScript configurations
│   └── ui/                 # React component library (shadcn/ui inspired)

🛠️ Tech Stack


📋 Development Environment

1. Prerequisites (Bun Management)

We use bum to manage Bun versions, ensuring consistency across environments.

Installation

curl -fsSL https://github.com/owenizedd/bum/raw/main/install.sh | bash

Auto-load Configuration

Add this to your .zshrc (or equivalent) to automatically switch Bun versions when entering the project directory:

# Auto-load Bun version from .bumrc
autoload -U add-zsh-hook
load-bumrc() {
  local bum_path="$(pwd)/.bumrc"
  if [ -f "$bum_path" ]; then
    bum use
  fi
}
add-zsh-hook chpwd load-bumrc
load-bumrc

Note

bum is used primarily for development. For production, please use the Bun version specified in .bumrc within your Docker container.

2. 🐳 Docker for Development

The docker-compose.yml file in the root directory provides the necessary development environment and dependencies (e.g., Redis).

docker compose up -d

Note

You may also install Docker Desktop for a more user-friendly experience.


🚀 Getting Started

Installation

bun install

Development

Start all applications in development mode:

bun run dev

Common Commands

Command Action
bun run dev Start development servers for all apps
bun run build Build all apps and packages
bun run lint Run Biome linting across the monorepo
bun run test Execute tests across the workspace
bun run clean Remove node_modules and build artifacts

📝 Workflow

Committing Changes

We enforce Conventional Commits. Use the interactive CLI for a smooth experience:

bun run commit

Git Hooks

Managed by Lefthook to ensure code quality before it hits the repository:

  • Pre-commit: Runs Biome (format/lint) and Syncpack (dependency sync).
  • Commit-msg: Enforces conventional commit rules.
  • Post-merge/checkout: Checks for bun.lock changes.

About

A cutting-edge, high-performance monorepo template

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages