OneApp Docs
Getting Started

Installation

Get OneApp running on your local machine in under 5 minutes.

Prerequisites complete?

Ensure you have Node.js 22+, pnpm 10+, and Git → before continuing.

Why proper installation matters

Setting up a monorepo incorrectly leads to frustrating issues:

  • Broken dependencies — Missing or incorrect packages cause cryptic errors
  • Wrong versions — Conflicting dependency versions break builds
  • Failed Git hooks — Pre-commit checks don't run, allowing bad code to be committed
  • Environment mismatches — Missing environment variables cause runtime errors

OneApp's installation automates the setup process — cloning the repository, installing all workspace dependencies, linking internal packages, and configuring Git hooks — so you can start building immediately.

Quick Start

Get up and running in 3 steps:

Clone the repository

Terminal
# Clone via HTTPS
git clone https://github.com/OneDigital-Product/monorepo.git
cd monorepo

# Or via SSH (recommended for contributors)
git clone git@github.com:OneDigital-Product/monorepo.git
cd monorepo

Why SSH?

SSH authentication is more secure and doesn't require entering your password for every push. Set up SSH keys →

Install dependencies

Terminal
pnpm install

This command:

  • ✅ Installs dependencies for all 40+ workspaces
  • ✅ Links internal packages (@repo/*) automatically
  • ✅ Sets up Git hooks via Husky (pre-commit formatting)
  • ✅ Prepares build outputs

Installation time: ~2-3 minutes (first install), ~30 seconds (subsequent installs with cache)

Start development

Terminal
pnpm dev

Your app is now running at http://localhost:3000 🎉

That's it! You're now ready to build with OneApp.

Verify installation

Run code quality checks to ensure everything works:

Terminal
# Type check all packages
pnpm typecheck

# Lint all packages
pnpm lint

# Full quality check (recommended before first PR)
pnpm build && pnpm lint && pnpm typecheck

Alternative development commands

Explore different development modes:

Main web application

Terminal
pnpm dev

Starts the Next.js 16 web app with:

  • Hot reload — Changes reflect instantly
  • Turbopack — Fast builds
  • TypeScript — Real-time type checking
  • Port: 3000

OneApp microfrontend architecture

Terminal
pnpm dev:oneapp

Starts the complete OneApp ecosystem:

  • oneapp-onstage — Main consumer app (port 3000)
  • oneapp-backstage — AI workflow designer (port 3001)
  • oneapp-api — REST API server (port 3002)

Storybook component library

Terminal
pnpm --filter=storybook dev

Starts Storybook at http://localhost:6006 with:

  • Component development — Build and test UI components in isolation
  • 5-theme system — Test components across Light, Dark, Corporate, Marketing, Admin themes
  • Accessibility testing — Built-in a11y checks

Production build

Terminal
# Build for production
pnpm build

# Start production server
pnpm start

What was installed

After installation, you'll have:

Project structure

monorepo/
├── apps/web/              # Main Next.js 16 application
├── packages/
│   ├── ui/                # Shared React components (@repo/ui)
│   ├── types/             # TypeScript utilities (@repo/types)
│   ├── utils/             # Common functions (@repo/utils)
│   └── config/            # Shared configs (@repo/config)
├── teams/                 # Team workspaces (ai, istudio, engineering)
├── personal/              # Personal workspaces (andy, torin, michael, vinay, jeff)
├── platform/              # Platform apps (docs, oneapp-*, storybook, mobile-app, email)
└── node_modules/          # Shared dependencies

Key packages

PackagePurposeVersion
@repo/uiReact componentsLatest
@repo/utilsUtility functionsLatest
@repo/typesTypeScript utilities & branded typesLatest
@repo/configESLint, TS, Prettier configsLatest
nextNext.js framework16.x
reactReact library19.x
typescriptTypeScript compiler5.x
tailwindcssTailwind CSS framework4.x
vitestTesting framework4.x
@vercel/aiVercel AI SDK6.x
prismaPrisma ORMLatest
better-authAuthentication libraryLatest

Troubleshooting

Installation fails

Terminal
# Try installing without lockfile constraints
pnpm install --no-frozen-lockfile

# Or clear pnpm cache and reinstall
pnpm store prune
pnpm install

Port 3000 already in use

Terminal
# Use a different port
pnpm dev -- -p 3001

# Or kill the process using port 3000
lsof -ti:3000 | xargs kill -9

Node.js version mismatch

Terminal
# Switch to Node.js 22
nvm use 22

# Or install if not available
nvm install 22

pnpm command not found

Terminal
# Enable Corepack
corepack enable

# Or install pnpm globally
npm install -g pnpm@latest

Git hooks not working

Terminal
# Reinstall Husky hooks
pnpm run prepare

# Or manually
npx husky install

Next steps

On this page