A geography guessing game with a global leaderboard.
This repository contains two independent applications that run on separate Unikraft instances:
pangea/
├── game/ # SvelteKit frontend application
└── leaderboard-api/ # Bun backend API for leaderboard
/game)The main SvelteKit application that hosts the geography guessing game. Players try to identify countries and compete for high scores.
/leaderboard-api)A lightweight Bun server that handles leaderboard CRUD operations with SQLite storage.
GET /api/leaderboard?limit=100 - Fetch leaderboard entriesPOST /api/scores - Submit a new scoreGET /health - Health checkYou'll need to run both services simultaneously in separate terminals:
Terminal 1 - Leaderboard API:
cd leaderboard-api
bun install
bun run dev
Terminal 2 - Game:
cd game
bun install
bun run dev
The game will be available at http://localhost:5173 and will connect to the leaderboard API at http://localhost:3001.
Game (/game):
VITE_LEADERBOARD_API_URL - URL of the leaderboard API (defaults to http://localhost:3001)Leaderboard API (/leaderboard-api):
PORT - Server port (defaults to 3001)DATABASE_PATH - Path to SQLite database (defaults to leaderboard.db)CORS_ORIGIN - Comma-separated list of allowed originsEach application is deployed independently to separate Unikraft instances:
VITE_LEADERBOARD_API_URL to point to the deployed leaderboard APISee individual README files in each directory for deployment-specific instructions.
The two applications are completely independent: