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.
- 🏎️ 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.
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)
- Runtime: Bun
- Frameworks: Next.js, Expo, ElysiaJS, NestJS
- Monorepo: Turborepo
- Styling: Tailwind CSS
- Tooling: Biome, Lefthook, Syncpack
We use bum to manage Bun versions, ensuring consistency across environments.
curl -fsSL https://github.com/owenizedd/bum/raw/main/install.sh | bashAdd 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-bumrcNote
bum is used primarily for development. For production, please use the Bun version specified in .bumrc within your Docker container.
The docker-compose.yml file in the root directory provides the necessary development environment and dependencies (e.g., Redis).
docker compose up -dNote
You may also install Docker Desktop for a more user-friendly experience.
bun installStart all applications in development mode:
bun run dev| 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 |
We enforce Conventional Commits. Use the interactive CLI for a smooth experience:
bun run commitManaged 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.lockchanges.