Monorepo Structure
SkyTeam ROBLOX uses a Turborepo-powered monorepo to manage multiple applications and shared packages efficiently.Overview
The project is organized as a pnpm workspace with Turborepo for build orchestration. This structure enables:- Shared code between applications
- Efficient caching and parallel builds
- Simplified dependency management
- Consistent tooling across all packages
Workspace Configuration
pnpm Workspace
The workspace is defined inpnpm-workspace.yaml:
apps/ and packages/ as workspace members.
Turborepo Configuration
Turborepo is configured inturbo.json with the following key settings:
- Global Dependencies: Changes to
.envinvalidate all caches - Global Environment Variables: Required env vars for builds
- Task Pipeline: Build tasks run dependencies first (
^build) - Output Caching: Caches build outputs for faster rebuilds
- Dev Mode: Development servers run persistently without caching
Directory Structure
Apps vs Packages
Apps
Applications are deployable, standalone services. Each app has its own runtime and serves a specific purpose:@skyteam/web - Main Website
@skyteam/web - Main Website
- Technology: Next.js 15
- Port: 3000 (dev)
- Purpose: Public-facing website for SkyTeam ROBLOX
- Dependencies:
@skyteam/database,@skyteam/ui
@skyteam/admin - Admin Panel
@skyteam/admin - Admin Panel
- Technology: Next.js
- Port: 3001 (dev)
- Purpose: Administrative dashboard
- Dependencies:
@skyteam/ui
@skyteam/api - Backend API
@skyteam/api - Backend API
- Technology: Express.js
- Port: 4000 (dev)
- Purpose: REST API for data operations
- Dependencies:
@skyteam/database - Scripts:
build: Bundles with tsupdev: Watches and auto-restarts on changesstart: Runs production build
@skyteam/client - Discord Bot
@skyteam/client - Discord Bot
- Technology: Discord.js + Discordx
- Purpose: Discord integration and bot commands
- Dependencies:
@skyteam/database - Type: ESM module
@skyteam/models - ROBLOX Models
@skyteam/models - ROBLOX Models
- Technology: Roblox-ts + Rojo
- Purpose: ROBLOX game integration
- Scripts:
build: Compiles TypeScript to Luaudev:watch: Watches for TypeScript changesdev:serve: Runs Rojo live sync serverdev: Runs both watch and serve concurrently
Packages
Packages are shared libraries consumed by apps. They export reusable code:@skyteam/database
@skyteam/database
- Purpose: PostgreSQL database client and schema
- Technology: Drizzle ORM
- Exports: Database client, schema, queries
- Scripts:
db:generate: Generate migrations from schemadb:push: Push schema changes to databasedb:studio: Launch Drizzle Studio (database GUI)
- Consumed by:
api,client,web
@skyteam/ui
@skyteam/ui
- Purpose: Shared React components and styles
- Technology: React + Tailwind CSS
- Consumed by:
web,admin
Workspace Dependencies
Packages reference each other using theworkspace:* protocol:
- Link to the local workspace package during development
- Resolve to the exact version when publishing (not applicable for private monorepos)
Package Manager
The project requires pnpm 10.5.2 or later:Dependency Graph
Thedatabase package is the most widely used shared dependency, consumed by the web app, API, and Discord client.