Prerequisites
Before you begin, ensure you have the following installed:Node.js
Version 18.0.0 or later
PNPM
Version 10.5.2 or compatible
PostgreSQL
Any recent version
The project uses pnpm as the package manager. If you don’t have it installed, run:
Installation
Install Dependencies
Install all dependencies for the monorepo using pnpm:This will install dependencies for all applications and packages in the workspace:
@skyteam/web- Next.js web application@skyteam/admin- Next.js admin panel@skyteam/api- Express API server@skyteam/client- Discord bot@skyteam/models- ROBLOX module@skyteam/database- Drizzle ORM package@skyteam/ui- Shared UI components
Configure Environment Variables
Copy the example environment file and configure your settings:Edit
.env with your configuration:Initialize the Database
Push the database schema to your PostgreSQL database:This command runs
drizzle-kit push to create all necessary tables:users- Player profilesairlines- Airline organizationsbrands- Airline brandsflights- Flight recordsflightPassengers- Passenger manifestsmilesTransactions- Miles audit logmilesProducts- Marketplace items
To open Drizzle Studio and explore your database visually, run:
Start Development Servers
Launch all applications in development mode:This starts:
- Web → http://localhost:3000
- Admin → http://localhost:3001
- API → http://localhost:4000
- Discord Bot → Connects to Discord
- Database → Watch mode for schema changes
You should see console output indicating each service has started successfully!
Selective Development
You can run specific parts of the system based on what you’re working on:- ROBLOX Development
- Web Development
- Full Stack
For ROBLOX game integration, run only the API and models:This starts:
@skyteam/models- ROBLOX module with Rojo@skyteam/api- Backend API server@skyteam/database- Database package in watch mode
rbxtsc -w- TypeScript compiler in watch moderojo serve- Rojo sync server for ROBLOX Studio
First API Request
Test your API server with a health check:Initialize ROBLOX Module
To integrate the SkyTeam module into your ROBLOX game:Build the Module
Build the ROBLOX module from TypeScript:This compiles TypeScript to Lua using
rbxtsc.Sync with ROBLOX Studio
Start the Rojo sync server:Then in ROBLOX Studio, click Plugins → Rojo → Connect to sync the module.
Discord Bot Setup
To enable Discord integration:Create Discord Application
- Go to Discord Developer Portal
- Create a new application
- Go to the Bot section and create a bot
- Copy the bot token to your
.envfile asDISCORD_TOKEN - Copy the application ID as
DISCORD_CLIENT_ID
Configure Bot Permissions
Your bot needs these permissions:
- Send Messages
- Embed Links
- Read Message History
- Use Slash Commands
- Manage Channels (for
/setupchannel)
Invite Bot to Server
Generate an invite URL with:
- Scope:
bot+applications.commands - Permissions: The ones listed above
DISCORD_HOME_GUILD_ID in .env.Verify Installation
Check that all services are running:- Web Application
- Admin Panel
- API Server
- Discord Bot
- Database
Visit http://localhost:3000 - you should see the SkyTeam web interface
Development Tools
Build All Apps
Lint Code
Format Code
Database Studio
Next Steps
Now that you have SkyTeam ROBLOX running locally:Learn the Architecture
Understand how the monorepo is structured
Configure Your Airline
Set up your airline brands and settings
Integrate ROBLOX Game
Connect your ROBLOX game to the API
API Reference
Explore available endpoints
Troubleshooting
Database connection errors
Database connection errors
Ensure PostgreSQL is running and the
DATABASE_URL in .env is correct. Test your connection:Discord bot not responding
Discord bot not responding
Check that:
DISCORD_TOKENis valid- Bot has proper permissions in your server
DISCORD_HOME_GUILD_IDmatches your server ID- The bot shows as online in Discord
ROBLOX module initialization fails
ROBLOX module initialization fails
Common causes:
- HTTP requests not enabled in game settings
- Invalid API token in module settings
- API server not running on port 4000
- Network/firewall blocking requests
Port already in use
Port already in use
If a port is in use, you can change it:
- Web: Set
PORTenv var before running - Admin: Edit
apps/admin/package.jsondev script (-p 3001) - API: Set
PORTenv var (defaults to 4000)
All set! You now have a fully functional SkyTeam ROBLOX development environment.