Skip to content

Latest commit

 

History

132 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Starter

A production-ready monorepo for school-platform work, built on Bun workspaces + Turborepo.

Six apps — Next.js web, Expo mobile, NestJS API, Fumadocs docs, optional FastAPI AI service and Rust demo — sharing one UI layer, one logger, one TypeScript config, one CI pipeline and a slim Dev Container.

Dual-licensed MIT OR Apache-2.0.

Quick start

Prerequisites

  • Bun 1.4.2 (pinned via packageManager)
  • Optional: Docker Compose v2.20+, Rust toolchain (apps/rust), Python 3 (apps/ai-api, script tests)
git clone https://github.com/shabirkhan-dev/starter.git
cd starter
bun install
bun run prepare
bun run dev

bun run dev starts every workspace except Rust. Add it with bun run dev:rust, the AI service with bun run dev:ai, or run the lot with bun run dev:all.

App Dev URL
Web http://localhost:3000
Nest API http://localhost:4000 — /api/v1/health, /api/docs
Docs http://localhost:3002/docs

To work on one app in isolation: bun --cwd=apps/web run dev (same pattern for mobile, nest-api, docs, rust).

Layout

Apps

Path What it is
apps/web Next.js 16 — admin, marketing, auth and billing
apps/mobile Expo SDK 57 — auth, billing via hosted checkout
apps/nest-api NestJS API spine, Drizzle over Postgres/Neon
apps/docs Fumadocs site — project docs at /docs, component docs at /rabtx
apps/ai-api Optional FastAPI AI assist; Nest proxies it, never public
apps/rust Optional Rust/Axum demo

Packages

Package Path Role
@school-os/ui packages/ui shadcn base — the unopinionated primitives
@rabtx/ui packages/rabtx Polished animated layer; one API for web and native
@school-os/logger packages/logger Shared structured logging
@school-os/typescript-config packages/typescript-config Base tsconfigs every workspace extends

@rabtx/ui sits on top of shadcn rather than replacing it. Components take three orthogonal props — kind (material), variant (colour role), size — and Metro resolves the .native.tsx file while Next resolves the web one, so a single import serves both platforms with no Platform.OS branching. Docs at /rabtx.

Everything else

Path Purpose
.agents/ Agent rules, skills and plans — the single source; there is no second copy
docker/ Compose fragments: Postgres, Nest, web, optional profiles
scripts/ Bash and Python utilities, plus architecture and naming checks
.github/workflows/ ci.yml, cd.yml, security.yml
.devcontainer/ Bun + Rust + Python/Bash tooling

Commands

Command Does
bun run dev All dev servers except Rust
bun run dev:all / dev:rust / dev:ai Everything / Rust only / FastAPI only
bun run build Build every app
bun run lint / lint:fix oxlint, plus ShellCheck and Ruff over scripts/
bun run format Format TS/JS, shell, Python and Rust
bun run typecheck TypeScript across workspaces
bun run test / test:coverage Unit tests / coverage gates
bun run test:e2e:web Playwright e2e for web
bun run architecture:check Import-boundary rules
bun run naming:check File and symbol naming rules
bun run preflight lint + typecheck + test — run before pushing

Tooling

  • Bun workspaces and Turborepo for the task graph
  • oxlint for linting and oxfmt for formatting TS/JS — tabs, line width 100
  • Lefthook pre-commit and commit-msg, enforcing Conventional Commits
  • Bash: ShellCheck + shfmt · Python: Ruff · Rust: rustfmt + clippy

Docker

cp env.docker.example .env
docker compose up -d --build

Web :3000, Nest :4000, Postgres on host :5433. Optional profiles: docker compose --profile rust up -d --build, or --profile ai for FastAPI.

More in docker/README.md and /docs/docker.

Deploy

Piece Host Config
Web + docs Vercel apps/*/vercel.json
Nest API Render render.yaml
Database Neon DATABASE_URL

Walkthrough: /docs/deploy — apps/docs/content/docs/deploy.mdx.

Dev Container

.devcontainer/ installs Bun, Rust, Python/Ruff and the Bash lint tools. C and Lua are deliberately excluded.

Reopen in Container → bun run prepare → bun run dev

See .devcontainer/README.md.

Docs

bun --cwd=apps/docs run dev

Also in the repo: PROJECT.md, DESIGN.md, AGENTS.md, CHANGELOG.md.

License

Dual-licensed under MIT or Apache-2.0, at your option — LICENSE-MIT, LICENSE-Apache-2.0.

About

Production Bun + Turborepo monorepo starter: Next.js, Expo, NestJS, Fumadocs, shared UI, auth/billing, CI, Docker, and Dev Container.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages