A retro space-themed Capture The Flag platform built with modern tech stack that actually Just Works™️
Experience a CTF in a sleek, dark-themed environment with real-time scoring and team collaboration.
- 🔐 User Authentication - Individual and team registration system
- 🎯 Challenge Management - Create, edit, import/export and manage CTF challenges
- 📊 Real-time Scoring - Live leaderboard updates
- 🌙 Retro UI Theme - Space-inspired design with stunning visuals for both the categories and challenge selection screens
- 📱 Responsive Design - Works on both desktop and mobile
- 🚀 Modern Stack - Built with Next.js 15, Prisma, and Tailwind CSS
- 🏁 Multi-Flag Challenges - Supports problems with multiple flags for partial credit
- 📈 Scoreboard History - Visualize team progress with a dynamic chart
- 🔓 Unlock Conditions - Time-based and prerequisite challenge gates
Before you begin, ensure you have the following installed:
- Node.js 20.x or later
- npm or yarn
- SQLite (included with Prisma)
-
Clone the repository
git clone https://github.com/asynchronous-x/orbital-ctf.git cd orbital-ctf
-
Install dependencies
npm install # or yarn install
-
Create a
.env
filecp .env.example .env
-
Set up the database
npx prisma migrate reset
-
Seed initial challenges
npm run prisma:seed # or yarn prisma:seed
-
Start development server
npm run dev # or yarn dev
Open http://localhost:3000 to launch the platform.
orbital-ctf/
├── src/
│ ├── app/ # Next.js app router pages
│ ├── components/ # React components
│ ├── lib/ # Server-side helpers
│ ├── utils/ # Client-side utilities
│ ├── types/ # Shared TypeScript types
│ ├── middleware.ts # Next.js middleware
│ └── instrumentation.ts # Startup tasks (challenge import)
├── prisma/
│ ├── schema.prisma # Database schema
│ └── migrations/ # Database migrations
└── public/ # Static assets
└── uploads/ # Challenge file uploads
The platform is built on these core models:
Model | Description |
---|---|
User |
User accounts with authentication and team membership |
Team |
Team information, scoring, and member management |
Challenge |
CTF challenges with points and locking rules |
UnlockCondition |
Challenge unlock requirements |
ChallengeFlag |
Supports multi-flag scoring |
Submission |
Challenge submission tracking and validation |
Announcement |
Platform-wide announcements |
ActivityLog |
Team activity tracking |
GameConfig |
CTF game timing and state configuration |
ChallengeFile |
Challenge attachment management |
Hint |
Challenge hints with point costs |
TeamHint |
Tracks which teams have purchased hints |
SiteConfig |
Platform configuration settings |
Score |
Detailed scoring history for teams and users |
TeamPointHistory |
Chronological log of team score changes |
The platform can be configured through environment variables:
DATABASE_URL="file:./dev.db"
NEXTAUTH_SECRET="your-secret-here"
NEXTAUTH_URL="http://localhost:3000"
INGEST_CHALLENGES_AT_STARTUP=true
CHALLENGES_DIR="./challenges"
Set INGEST_CHALLENGES_AT_STARTUP
to true
if you want challenges in CHALLENGES_DIR
automatically imported when the server starts.
This project is licensed under the GPL-3.0 License. See the LICENSE file for details.
Made with 💯 by Asynchronous-X