Development Workflow
This guide covers the day-to-day development workflow for SkyTeam ROBLOX, including running development servers, building, and testing.Prerequisites
Before starting development, ensure you have:- Node.js 18.0.0 or later
- pnpm 10.5.2 or later
- PostgreSQL database running
- Environment variables configured (see Environment Setup)
Initial Setup
1. Install Dependencies
2. Environment Setup
Copy the example environment file and configure it:.env with your local configuration:
3. Initialize Database
Push the database schema to your PostgreSQL instance:drizzle-kit push in the @skyteam/database package.
Development Scripts
All scripts are defined in the rootpackage.json and orchestrated by Turborepo.
Start All Applications
- Starts all apps in parallel with hot reload
- Runs
turbo run devwhich executes thedevscript in all workspace packages - Uses
dotenv-clito load environment variables from.env
- Web:
http://localhost:3000 - Admin:
http://localhost:3001 - API:
http://localhost:4000 - Discord bot: Connects to Discord
- Models: Rojo server for ROBLOX sync
Development Modes
dev:roblox):
- Starts:
@skyteam/models,@skyteam/api,@skyteam/database - Use when working on ROBLOX integration
dev:web):
- Starts:
@skyteam/web,@skyteam/api - Use when working on the website
Database Management
- Launches Drizzle Studio at
https://local.drizzle.studio - Provides a GUI for browsing and editing database data
- Useful for debugging and manual data management
Building
Build All Applications
turbo run build, which:
- Builds packages first (due to
^builddependency) - Builds apps in parallel where possible
- Caches outputs in
.turbo/for faster rebuilds
Build Individual Packages
--filter to build specific workspace packages.
Build Outputs
Each application produces different build artifacts:| App | Build Tool | Output Directory | Type |
|---|---|---|---|
| api | tsup | dist/ | Node.js bundle |
| web | Next.js | .next/ | Next.js build |
| admin | Next.js | .next/ | Next.js build |
| client | tsup | dist/ | ESM bundle |
| models | roblox-ts | out/ | Luau code |
| database | tsup | dist/ | CJS + ESM |
Linting
Lint All Code
turbo run lint, executing ESLint in all packages.
Format Code
- Formats:
ts,tsx,js,jsx,json,md,mdx,css,scss,yaml,yml - Respects
.gitignorepatterns
Development Workflow Examples
Working on the API
Working on the Website
http://localhost:3000 to see your changes with Fast Refresh.
Working on ROBLOX Models
- Rojo server (live sync to ROBLOX Studio)
- TypeScript compiler (compiles
.tsto Luau) - API server (for data integration)
Working on Shared Packages
When modifying@skyteam/database or @skyteam/ui:
Turborepo Cache
Turborepo caches task outputs to speed up builds:buildandlinttasks are cacheddevtasks are never cached ("cache": false)- Cache is invalidated when
.envchanges
Common Tasks
Adding a New Dependency
Adding a New Dependency
To a specific package:To the root (dev tools):The
-w flag adds to the workspace root.Running Commands in a Package
Running Commands in a Package
Use the Examples:
--filter flag:Updating Dependencies
Updating Dependencies
Update all dependencies:Update specific package:The
-r flag updates recursively across all workspace packages.Clean Build Artifacts
Clean Build Artifacts
Production Builds
Build for Production
Run Production Servers
Ensure all required environment variables are set in production. The
globalEnv configuration in turbo.json lists all required variables.