Skip to content

Repository files navigation

Midforge

A retro 2D multiplayer RPG where indie hackers and solopreneurs level up their in-game character using real verified data: X (Twitter) follower count and Stripe MRR.

Tech Stack

  • Framework: Next.js 14 (App Router)
  • Game Engine: Phaser 3 (Phase 2)
  • Multiplayer: Colyseus (Node.js game server)
  • Database: Neon (serverless Postgres)
  • ORM: Drizzle ORM
  • Auth: X (Twitter) OAuth via Auth.js v5
  • Styling: Tailwind CSS + custom pixel art CSS

Monorepo Structure

midforge/
├── apps/
│ ├── web/ # Next.js app (port 3000)
│ └── game-server/ # Colyseus server (port 2567)
└── packages/
├── db/ # Drizzle + Neon schema
└── shared/ # Shared types, quests, combat

Getting Started

1. Install dependencies

npm install

2. Set up environment

cp apps/web/.env.example apps/web/.env.local

Fill in your credentials:

  • NEXTAUTH_SECRET — run openssl rand -base64 32
  • TWITTER_CLIENT_ID / TWITTER_CLIENT_SECRET — from X Developer Portal
  • DATABASE_URL — from Neon dashboard

3. Push database schema

npm run db:push

4. Run both servers

# Terminal 1 — Next.js (port 3000)
npm run dev:web
# Terminal 2 — Colyseus game server (port 2567)
npm run dev:server

Or run both together:

npm run dev

Pages

RouteDescription
/Landing page
/loginX OAuth login
/worldMain game view (Phaser canvas in Phase 2)
/leaderboardGlobal rankings by XP
/profile/[username]Player profile with verified stats

API Routes

RouteMethodDescription
/api/auth/[...nextauth]GET/POSTAuth.js handlers
/api/player/statsGETCurrent player data

Built on Neon · Powered by real revenue · Forged in Midgard

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages