Skip to main content
This guide will walk you through installing, configuring, and running the SkyTeam ROBLOX system on your local machine.

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:
npm install -g pnpm

Installation

1

Clone the Repository

Clone the SkyTeam ROBLOX repository to your local machine:
git clone https://github.com/your-org/skyteam-roblox.git
cd skyteam-roblox
2

Install Dependencies

Install all dependencies for the monorepo using pnpm:
pnpm install
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
3

Configure Environment Variables

Copy the example environment file and configure your settings:
cp .env.example .env
Edit .env with your configuration:
# Database
DATABASE_URL="postgresql://user:password@localhost:5432/skyteam"

# Discord Bot
DISCORD_TOKEN="your-discord-bot-token"
DISCORD_HOME_GUILD_ID="your-server-id"
DISCORD_CLIENT_ID="your-client-id"

# Web
NEXT_PUBLIC_API_URL="http://localhost:4000"

# Admin
ADMIN_JWT_SECRET="your-secret-key"

# Dev
NODE_ENV="development"
Never commit your .env file to version control. Keep your secrets secure!
4

Initialize the Database

Push the database schema to your PostgreSQL database:
pnpm db:push
This command runs drizzle-kit push to create all necessary tables:
  • users - Player profiles
  • airlines - Airline organizations
  • brands - Airline brands
  • flights - Flight records
  • flightPassengers - Passenger manifests
  • milesTransactions - Miles audit log
  • milesProducts - Marketplace items
To open Drizzle Studio and explore your database visually, run:
pnpm db:studio
5

Start Development Servers

Launch all applications in development mode:
pnpm dev
This starts:
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:
For ROBLOX game integration, run only the API and models:
pnpm dev:roblox
This starts:
  • @skyteam/models - ROBLOX module with Rojo
  • @skyteam/api - Backend API server
  • @skyteam/database - Database package in watch mode
The models package uses:
  • rbxtsc -w - TypeScript compiler in watch mode
  • rojo serve - Rojo sync server for ROBLOX Studio

First API Request

Test your API server with a health check:
curl http://localhost:4000/health
Expected response:
{
  "ok": true
}

Initialize ROBLOX Module

To integrate the SkyTeam module into your ROBLOX game:
1

Build the Module

Build the ROBLOX module from TypeScript:
cd apps/models
pnpm build
This compiles TypeScript to Lua using rbxtsc.
2

Sync with ROBLOX Studio

Start the Rojo sync server:
pnpm dev:serve
Then in ROBLOX Studio, click Plugins → Rojo → Connect to sync the module.
3

Initialize in Your Game

In your server script, initialize the SkyTeam module:
import SkyTeamModule from "@rbxts/skyteam-module";

const skyteam = new SkyTeamModule({
  TOKEN: "your-airline-api-token",
  Flags: []
});

skyteam.Initialize();
The module will:
  • Test HTTP services connectivity
  • Set up client-server communication
  • Initialize the RemoteEvent for client events
  • Display initialization errors to players if any occur
Ensure HTTP requests are enabled in your ROBLOX game settings: Game Settings → Security → Allow HTTP Requests must be checked.

Discord Bot Setup

To enable Discord integration:
1

Create Discord Application

  1. Go to Discord Developer Portal
  2. Create a new application
  3. Go to the Bot section and create a bot
  4. Copy the bot token to your .env file as DISCORD_TOKEN
  5. Copy the application ID as DISCORD_CLIENT_ID
2

Configure Bot Permissions

Your bot needs these permissions:
  • Send Messages
  • Embed Links
  • Read Message History
  • Use Slash Commands
  • Manage Channels (for /setupchannel)
3

Invite Bot to Server

Generate an invite URL with:
  • Scope: bot + applications.commands
  • Permissions: The ones listed above
Copy your server ID and add it as DISCORD_HOME_GUILD_ID in .env.
4

Start the Bot

The bot starts automatically when you run pnpm dev. Check the console for:
Bot initialized.
Available commands:
  • /ping - Test bot responsiveness
  • /setupchannel - Configure flight announcement channels

Verify Installation

Check that all services are running:
Visit http://localhost:3000 - you should see the SkyTeam web interface

Development Tools

Build All Apps

pnpm build
Builds all applications for production

Lint Code

pnpm lint
Runs ESLint on all packages

Format Code

pnpm format
Formats all files with Prettier

Database Studio

pnpm db:studio
Opens Drizzle Studio on port 4983

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

Ensure PostgreSQL is running and the DATABASE_URL in .env is correct. Test your connection:
psql "postgresql://user:password@localhost:5432/skyteam"
Check that:
  • DISCORD_TOKEN is valid
  • Bot has proper permissions in your server
  • DISCORD_HOME_GUILD_ID matches your server ID
  • The bot shows as online in Discord
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
If a port is in use, you can change it:
  • Web: Set PORT env var before running
  • Admin: Edit apps/admin/package.json dev script (-p 3001)
  • API: Set PORT env var (defaults to 4000)
All set! You now have a fully functional SkyTeam ROBLOX development environment.

Build docs developers (and LLMs) love