Skip to content

asynchronous-x/orbital-ctf

Repository files navigation

🚀 Orbital CTF Platform

GitHub License Made with Next.js Powered by Prisma Styled with Tailwind

Orbital CTF Logo

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.

Demo · Report Bug · Request Feature

✨ Features

  • 🔐 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 14, Prisma, and Tailwind CSS

🛠️ Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js 18.x or later
  • npm or yarn
  • SQLite (included with Prisma)

🚀 Quick Start

  1. Clone the repository

    git clone https://github.com/asynchronous-x/orbital-ctf.git
    cd orbital-ctf
  2. Install dependencies

    npm install
    # or
    yarn install
  3. Set up the database

    npx prisma migrate reset
  4. Seed initial challenges

    npm run prisma:seed
    # or
    yarn prisma:seed
  5. Start development server

    npm run dev
    # or
    yarn dev

    Open http://localhost:3000 to launch the platform.

📁 Project Structure

orbital-ctf/
├── src/
│   ├── app/          # Next.js app router pages
│   ├── components/   # React components
│   └── lib/          # Utilities and configurations
├── prisma/
│   ├── schema.prisma # Database schema
│   └── migrations/   # Database migrations
└── public/           # Static assets
    └── uploads/      # Challenge file uploads

💾 Database Schema

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, flags, and dependencies
ChallengeDependency Manages challenge unlock requirements
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

🔧 Configuration

The platform can be configured through environment variables:

DATABASE_URL="file:./dev.db"
NEXTAUTH_SECRET="your-secret-here"
NEXTAUTH_URL="http://localhost:3000"

📝 License

This project is licensed under the MIT License. See the LICENSE file for details.

🌟 Acknowledgments


Made with 💯 by Asynchronous-X