This is a Turborepo-managed monorepo for the Ultimate Adventure project.
/ultimate-adventure
├── apps/
│ ├── web/ # Ultimate Adventure Guides (frontend)
│ ├── admin/ # Ultimate Adventure Guides Admin (frontend)
│ ├── web-api/ # Future: Backend API for web
│ └── admin-api/ # Future: Backend API for admin
├── packages/
│ ├── shared-models/ # Shared data models and types (using Zod)
│ ├── backend-utils/ # Backend-specific utilities
│ └── tsconfig/ # Shared TypeScript configurations
├── turbo.json # Turborepo configuration
└── package.json # Root package.json with workspaces
npm installRun all apps in development mode:
npm run devRun a specific app:
# Run web app only
npm run dev --filter=@ultimate-adventure/web
# Run admin app only
npm run dev --filter=@ultimate-adventure/adminBuild all apps:
npm run buildBuild a specific app:
# Build web app
npm run build --filter=@ultimate-adventure/web
# Build admin app
npm run build --filter=@ultimate-adventure/adminLint all packages:
npm run lintShared data models and types used across all apps. Built with Zod for runtime validation.
Usage in apps:
- Add to package.json dependencies:
{
"dependencies": {
"@ultimate-adventure/shared-models": "*"
}
}- Import in your code:
import { YourModel } from '@ultimate-adventure/shared-models';Backend-specific utilities shared between backend services.
Usage:
- Add to package.json dependencies (backend apps only):
{
"dependencies": {
"@ultimate-adventure/backend-utils": "*"
}
}- Import in your code:
import { yourUtil } from '@ultimate-adventure/backend-utils';Shared TypeScript configurations to ensure consistency across the monorepo.
Available configs:
base.json- Base configuration for all packagesreact.json- React-specific configuration for frontend appsnode.json- Node-specific configuration for build tools (Vite, etc.)
Usage:
{
"extends": "@ultimate-adventure/tsconfig/react.json",
"compilerOptions": {
// Your app-specific overrides
}
}- Create a new directory in
apps/:
mkdir apps/your-new-app- Create a
package.jsonwith the naming convention:
{
"name": "@ultimate-adventure/your-new-app",
"version": "0.0.0",
"private": true
}- Install dependencies from the root:
npm install- Create a new directory in
packages/:
mkdir packages/your-package- Create a
package.json:
{
"name": "@ultimate-adventure/your-package",
"version": "0.0.0",
"private": true,
"main": "./src/index.ts",
"types": "./src/index.ts"
}- Install dependencies from the root:
npm install- Caching: Turborepo caches build outputs to speed up subsequent builds
- Parallel Execution: Runs tasks across packages in parallel when possible
- Dependency Graph: Automatically understands dependencies between packages
- Remote Caching: Can be configured for team-wide cache sharing (optional)
Each app manages its own .env file. Environment variables are not shared across apps by default.
apps/web/.env- Web app environment variablesapps/admin/.env- Admin app environment variables
- Split frontend apps into separate frontend and backend
- Add
apps/web-api- Backend API for the web app - Add
apps/admin-api- Backend API for the admin app - Set up shared authentication package
- Add E2E testing setup
- Configure remote caching for CI/CD