OGTHG (OGT Hacking Game) is a world-class, educational playground for aspiring security researchers., it bridges the gap between theoretical security concepts and practical exploitation through high-fidelity simulations, gamified progression, and real-time AI mentorship.
- Browser Sandbox: A custom-built virtual browser that allows inspecting source code, manipulating cookies, and executing XSS/SQLi payloads in a safe, isolated environment.
- Terminal Nexus: A simulated Linux-style bash environment for practicing command injection and directory traversal.
- Integrated with Google Gemini 3 Flash, Omar acts as a "simple-speaking" hacker mentor.
- Provides contextual hints based on the specific challenge.
- Explains the "Why" behind vulnerabilities to ensure deep conceptual learning.
- 12 detailed modules covering the full spectrum of modern web attacks, including SQLi, XSS, SSRF, JWT, and SSTI.
- Dashboard: Track your XP, Clearance Level, and skill analysis.
- Leaderboard: Compete with other operatives in the Hall of Fame.
- Framework: React 19
- Build Tool: Vite
- Styling: Tailwind CSS
- Animations: Framer Motion
- Intelligence: @google/genai (Gemini 3 Flash)
- Icons: Lucide React
- Charts: Recharts
OGTHG-Hacking-Game/
โ
โโโ ๐ .github/
โ โโโ workflows/
โ โโโ deploy.yml # GitHub Actions workflow for auto-deployment
โ
โโโ ๐ public/ # Static assets served as-is
โ โโโ assets/ # Images and media files
โ โโโ academic.png # Academy page screenshot
โ โโโ challenges.png # Challenges page screenshot
โ โโโ login.png # Landing page screenshot
โ
โโโ ๐ src/ # Source code directory
โ โ
โ โโโ ๐ components/ # Reusable React components
โ โ โโโ BrowserSimulator.tsx # Virtual browser for web exploitation
โ โ โโโ Sidebar.tsx # Navigation sidebar component
โ โ โโโ TerminalSimulator.tsx # Virtual terminal for command injection
โ โ
โ โโโ ๐ pages/ # Application pages/routes
โ โ โโโ Academy.tsx # Learning modules and tutorials
โ โ โโโ ChallengePage.tsx # Individual challenge interface
โ โ โโโ ChallengesList.tsx # All challenges overview
โ โ โโโ Dashboard.tsx # User stats and progress tracking
โ โ โโโ LandingPage.tsx # Welcome/login page
โ โ โโโ Leaderboard.tsx # Global rankings
โ โ โโโ Profile.tsx # User profile and achievements
โ โ โโโ Settings.tsx # Application settings
โ โ
โ โโโ ๐ services/ # External API integrations
โ โ โโโ geminiService.ts # Google Gemini AI service
โ โ
โ โโโ ๐ utils/ # Utility functions (empty, ready for expansion)
โ โ
โ โโโ App.tsx # Main application component & routing
โ โโโ constants.tsx # Challenge data, modules, and constants
โ โโโ index.tsx # Application entry point
โ โโโ store.ts # Global state management (Zustand)
โ โโโ types.ts # TypeScript type definitions
โ
โโโ ๐ .env.local # Environment variables (not in git)
โโโ ๐ .gitignore # Git ignore rules
โโโ ๐ CODE_OF_CONDUCT.md # Community guidelines
โโโ ๐ CONTRIBUTING.md # How to contribute
โโโ ๐ DEPLOYMENT.md # Deployment instructions
โโโ ๐ LICENSE # MIT License
โโโ ๐ package.json # Dependencies and scripts
โโโ ๐ README.md # Project documentation
โโโ ๐ SECURITY.md # Security policy
โโโ ๐ tsconfig.json # TypeScript configuration
โโโ ๐ vite.config.ts # Vite build configuration
Contains static assets that are served directly without processing. Files here are accessible at the root URL.
index.html: The main HTML template with meta tags, fonts, and the root divassets/: Images, screenshots, and media files
The heart of the application - all TypeScript/React source code.
Reusable UI components used across multiple pages:
- BrowserSimulator: Simulates a web browser for XSS/SQLi challenges
- TerminalSimulator: Simulates a Linux terminal for command injection
- Sidebar: Main navigation component
Full-page components mapped to routes:
- LandingPage: Entry point with authentication
- Dashboard: User progress, XP, and skill analysis
- Academy: 12 learning modules covering web vulnerabilities
- ChallengesList: Browse all available CTF challenges
- ChallengePage: Interactive challenge interface with simulators
- Leaderboard: Global rankings and competition
- Profile: User achievements and statistics
- Settings: Application preferences
External API integrations:
- geminiService: Handles communication with Google Gemini AI for the AI mentor feature
Utility functions and helpers (currently empty, ready for expansion)
index.html: The main HTML template (Vite entry point)vite.config.ts: Vite bundler configuration with GitHub Pages base pathtsconfig.json: TypeScript compiler optionspackage.json: Project metadata, dependencies, and npm scripts
The main application component that sets up:
- React Router for navigation
- Layout structure with Sidebar
- Route definitions
- Global state initialization
Contains all static data:
- Challenge definitions (12 challenges across 4 categories)
- Academy module content (SQLi, XSS, SSRF, etc.)
- Leaderboard data
- Configuration constants
Global state management using Zustand:
- User profile (username, XP, level)
- Challenge completion status
- Progress tracking
- Persistent storage in localStorage
TypeScript type definitions for:
- Challenge structure
- User profile
- Academy modules
- Leaderboard entries
When you run npm run build, Vite creates a dist/ directory:
dist/
โโโ assets/
โ โโโ index-[hash].js # Bundled JavaScript
โ โโโ index-[hash].css # Bundled CSS
โ โโโ [images] # Optimized images
โโโ index.html # Production HTML
This dist/ folder is what gets deployed to GitHub Pages.
- react & react-dom: UI framework
- react-router-dom: Client-side routing
- @google/genai: AI mentor integration
- framer-motion: Smooth animations
- lucide-react: Icon library
- recharts: Data visualization for dashboard
- vite: Fast build tool and dev server
- typescript: Type safety
- @vitejs/plugin-react: React support for Vite
- gh-pages: GitHub Pages deployment utility
- Create
src/pages/NewPage.tsx - Add route in
src/App.tsx - Add navigation link in
src/components/Sidebar.tsx
- Add challenge object to
src/constants.tsx - Update types in
src/types.tsif needed - Challenge will automatically appear in the UI
- Create component in
src/components/ - Import and use in relevant pages
- Keep components reusable and focused
- Node.js (v18 or higher)
- npm or yarn
- Gemini API Key (Get it from Google AI Studio)
-
Clone the repository
git clone https://github.com/ogtamimi/OGTHG-Hacking-Game.git cd OGTHG-Hacking-Game -
Install dependencies
npm install
-
Set up environment variables
Create a
.env.localfile in the root directory:GEMINI_API_KEY=your_api_key_here
-
Run the development server
npm run dev
-
Open your browser
Navigate to
http://localhost:3000
npm run buildThis creates an optimized production build in the dist/ directory.
npm run preview-
Update the base path in
vite.config.tsto match your repository name:base: '/YOUR-REPO-NAME/',
-
Deploy
npm run deploy
This will build the project and deploy it to GitHub Pages automatically.
- Start Learning: Visit the Academy to learn about web vulnerabilities
- Practice Challenges: Apply your knowledge in realistic CTF scenarios
- Get AI Help: Use Operative Omar for hints and explanations
- Track Progress: Monitor your XP and skill development on the Dashboard
- Compete: Check the Leaderboard to see how you rank
- All exploits run in isolated sandboxes
- No actual vulnerabilities in the platform itself
- Educational content reviewed by security professionals
- Safe environment for learning offensive security
We welcome contributions! Please see our Contributing Guidelines for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This platform is intended strictly for educational purposes. All "exploits" are performed within a simulated sandbox environment. The goal is to train white-hat security professionals and improve the overall security posture of the web.
Do not use the knowledge gained here for malicious purposes.
- Author: Omar Al Tamimi (OGT)
- Email: ogttamimi@gmail.com
- Issues: GitHub Issues
Version 1.1
Licensed under the MIT License.
ยฉ 2024-2026 OGTHG Platform. Built for the next generation of security researchers.
- Google Gemini AI for powering the AI mentor
- The cybersecurity community for inspiration
- All contributors and supporters of this project
Empowering the next generation of ethical hackers



