Genre: Persistent Sandbox Crime MMORPG (Browsergame) Setting: Dystopian Cyberpunk — eine dunkle Megacity voller Neon, Implantate, Hacker und Straßengangs Platform: Mobile-First PWA (Progressive Web App), Desktop-Browser als Zweitplattform Tone: Gritty, immersive, text-driven mit stylishem Cyberpunk-UI Inspiration: Torn City (Persistenz, Sandbox, Spielerökonomie) + RuneScape (Skill-Progression, Grind-Loops) + The Fifth Family (Mobile-UX, Gameplay-Gates) Language: English (i18n-ready architecture from Day 1 via JSON translation files)
| Component | Technology | Rationale |
|---|---|---|
| Frontend | Next.js 15 (App Router) | SSR, API Routes, i18n-Support, PWA-fähig |
| Styling | Tailwind CSS | Mobile-First, schnelles Prototyping, Dark-Mode |
| Backend/DB | Supabase (PostgreSQL) | Auth, Realtime, RLS, Edge Functions, Free Tier |
| ORM | Drizzle ORM | Typsichere DB-Queries, bessere Testbarkeit, kein Supabase-Lock-in |
| Deployment | Vercel (Frontend) + Supabase Cloud (Backend) | Zero-DevOps, Git-Push-Deployment, 0€ Start |
| PWA | manifest.json + Service Worker | Homescreen-Icon, Offline-Fallback, Push-Notifications (Phase 2) |
value + updated_at. Aktuelle Werte werden bei jedem Request berechnet: current = min(max, stored + floor((now - last_update) / interval)). Kein Cronjob./locales/en.json). Nur Englisch im MVP, weitere Sprachen per zusätzlicher Datei.[ Time-based Regeneration ]
│
▼
┌──────────────────┐
│ Energy & Nerve │
└──────────────────┘
│
┌─────┴──────┐
▼ ▼
┌──────┐ ┌────────┐
│ Gym │ │ Crimes │──→ Crime Rank XP
└──────┘ └────────┘
│ │
▼ ▼
┌──────┐ ┌────────┐
│Stats │ │ Creds │
│ +XP │ │ +Loot │
└──────┘ └────────┘
│ │
└─────┬──────┘
▼
┌──────────────────┐
│ PvP (Arena) │──→ Walk Away (XP)
│ │──→ Loot (steal Creds)
│ │──→ Flatline (hospitalize)
└──────────────────┘
│
▼
┌──────────────────┐
│ Fence / Shop │ (sell loot, buy gear)
└──────────────────┘
Principle: Regenerate → Invest → Optimize → Dominate
Session Design: Optimaler Loop dauert 2-5 Minuten. Einloggen, Energie im Gym verbrauchen, Nerven für Crimes ausgeben, Schicht-Ergebnis einsammeln + neue starten, optional PvP, ausloggen. Timer-basierte Regen bremst natürlich und erzeugt Idle-Antizipation.
Vier Primärattribute, trainierbar im Gym (kostet Energy + Creds):
| Attribute | Combat Role |
|---|---|
| STR (Strength) | Raw damage output |
| DEF (Defense) | Damage reduction |
| AGI (Agility) | Dodge chance, initiative (who strikes first) |
| DEX (Dexterity) | Critical hit chance, crit damage multiplier |
Soft-Cap mit Diminishing Returns:
Eigenständige Progressionspfade mit passiven Boni. Erweiterbar designt (neue Skills = DB-Row + Config).
MVP Skills:
| Skill | Leveled by | Passive Bonus |
|---|---|---|
| Hacking | Corpo IT Job, Hacking Crimes | Better Hacking crime outcomes, unlock digital tools |
| Medicine | Clinic Job | Faster HP regeneration, shorter hospitalization time (~15% reduction at high level) |
| Streetsmarts | Passiv durch alle Crimes | Lower crime risk, better Fence prices |
Phase 2+ Skill Candidates: Mechanics (Cyberware maintenance), Chemistry (craft Stims/drugs), Engineering, Negotiation
Gewählt bei Charakter-Erstellung. Kleiner Startbonus, nach ~2 Tagen Spielzeit ausgeglichen:
| Archetype | Starting Bonus |
|---|---|
| Brawler | +50 STR, +50 DEF |
| Runner | +50 AGI, +50 DEX |
| Hacker | +5 Hacking Skill, +1 Cyberdeck (starter item) |
Jedes Verbrechen hat einen eigenen Crime Rank der durch erfolgreiche Ausführung steigt. Höherer Rang = weniger Risiko, mehr Ertrag, seltener Loot, neue Flavor-Texte.
| Crime | Unlock | Nerve Cost | Requirements | Rewards |
|---|---|---|---|---|
| Street Hustle | Level 1 | Low | None | Small Creds, Common loot chance |
| Break-In | Level 5 | Medium | Lockpick Kit (item) | Medium Creds, Uncommon loot chance |
| Hacking | Level 10 | High | Cyberdeck (item), Hacking Skill | High Creds, Rare loot chance, Hacking XP |
Crime Rank Progression Example (Street Hustle):
Failure Consequences: Chance of getting caught → Arrest → Hospitalization (shorter than PvP hospitalization). Higher Crime Rank reduces failure chance.
Legale Arbeit als passiver Skill-Trainer mit optionalem aktiven Grind.
| Job | Skill Leveled | Flavor |
|---|---|---|
| Corpo IT Support | Hacking | Debug corporate networks, maintain firewalls, learn system exploits |
| Back-Alley Clinic | Medicine | Patch up wounded mercs, learn anatomy, handle implant surgery |
Streetsmarts levelt passiv durch alle Crime-Aktivitäten (kein dedizierter Job nötig).
| Option | Reward | Effect on Loser |
|---|---|---|
| Walk Away | Maximum XP | Opponent stunned briefly |
| Loot | Steal 5% of opponent's unsecured cash | Less XP, opponent loses cash |
| Flatline | Minimal XP | Opponent hospitalized for 15 minutes |
Duration: Max 15 minutes (reducible via Medicine Skill)
| Blocked | Allowed |
|---|---|
| Gym Training | Chat (Global + Whisper) |
| PvP (Attack & Defense) | Market / Fence |
| Crimes | Inventory Management |
| Travel (Phase 2) | Gambling (Phase 2) |
| Job (continues running) |
SOURCES SINKS
─────── ─────
Crime Rewards ──────────→ Creds ──────────→ NPC Shop (gear, tools)
Job Salary ─────────────→ Creds ──────────→ Gym Fees
PvP Loot (steal) ──────→ Creds ──────────→ Hospital Bills
Fence (sell items) ────→ Creds ──────────→ Bank Withdrawal Fee (1%)
Sources:
Sinks:
No player-to-player marketplace in MVP. (Phase 2: Schwarzmarkt)
| Category | Slots | Example Items |
|---|---|---|
| Weapons | 1 slot | Knife, Pistol, Stun Baton, Mono-Wire |
| Cyberware | 2 slots | Reflex Booster (+AGI), Dermal Plating (+DEF), Optic Enhancer (+DEX), Muscle Graft (+STR) |
| Crime Tools | Inventory | Lockpick Kit (Break-In), Cyberdeck (Hacking) |
| Consumables | Inventory | Stim-Pack (heal HP), Adrenaline Shot (temp stat boost) |
| Tier | Drop Rate | Stat Bonus Range |
|---|---|---|
| Common | ~60% | Low |
| Uncommon | ~30% | Medium |
| Rare | ~10% | High |
Items are permanent once obtained. Item degradation is a Phase 2 candidate for long-term economic balance.
| Board | Metric | Motivation |
|---|---|---|
| Level | Character Level + XP | Universal progress indicator |
| Power | Sum of all combat attributes | Fighter prestige |
| Wealth | Total net worth (Bank + Cash + Inventory value) | Hustler prestige |
Clean Dark UI with Cyberpunk Accents. Think modern trading app meets hacker terminal.
Passt zum Cyberpunk-Thema, spart OLED-Akku, halbiert CSS-Aufwand.
You open your eyes. Neon light flickers through a cracked window. There's a fresh scar on your neck — where an implant used to be. Someone stripped you clean and left you bleeding in a back-alley clinic.
The surgeon says you owe her. Everyone owes someone in this city.
Time to start climbing.
Shown before the narrative intro. Simple 3-card choice:
| Measure | Implementation |
|---|---|
| Zero Client Trust | All game actions validated server-side. Client never modifies game state directly. |
| Supabase RLS | Row Level Security policies on all player data tables. Players can only read/write their own data. |
| Rate Limiting | Max 1 action per type per 10 seconds (configurable). Prevents bot automation. |
| Input Validation | All API inputs validated (correct types, ranges, state checks: has energy? is hospitalized? owns item?) |
| Transaction Logging | All Cred movements logged (from, to, amount, reason, timestamp). Enables manual audit. |
| Server-side Combat | Combat engine runs exclusively on server. Client receives only the result log. |
Strictly No Pay-to-Win. No purchasable gameplay advantage that isn't achievable through gameplay.
| Tier | Price | Benefits |
|---|---|---|
| Free (F2P) | 0€ | Full game access, earn Cryme Coins via Fence |
| Rewarded Ads | Watch 30s clip | Small temporary bonus (+10% energy regen for 1h, small Cred bonus on next crime) |
| Subscription | ~4.99€/month | Ad-free, same bonuses as Ads but permanent while subscribed, exclusive cosmetics, profile badge |
Goal: Closed, addictive gameplay loop playable by real users.
| Priority | Feature | Est. Effort |
|---|---|---|
| P0 | Auth (Supabase), Character Creation + Archetype | 2 days |
| P0 | Energy/Nerve System (lazy regen) | 1 day |
| P0 | Gym Training (4 attributes + Creds cost) | 1 day |
| P0 | 3 Crime Types with Crime Rank progression | 3 days |
| P0 | PvP Combat (5-round, server-side) + Walk Away/Loot/Flatline | 3 days |
| P0 | Bank System (deposit/withdraw/fee) | 0.5 days |
| P0 | NPC Shop (buy weapons, tools) | 1 day |
| P0 | Fence (sell items to NPC) | 0.5 days |
| P0 | Item System (Weapons, Cyberware, Tools, Consumables) | 2 days |
| P0 | Hospitalization (segmented downtime) | 1 day |
| P1 | Jobs (2h shifts, overtime, skill XP) | 2 days |
| P1 | Skill System (Hacking, Medicine, Streetsmarts) | 2 days |
| P1 | Leaderboards (Level, Power, Wealth) | 1 day |
| P1 | Global Chat + Whisper | 1.5 days |
| P1 | Narrative Onboarding (intro + guided actions) | 1 day |
| P1 | PWA Setup (manifest, service worker) | 0.5 days |
| P2 | Player Search + Profile View | 1 day |
| Total estimated | ~24 days |
At 10-20h/week → roughly 2-3 months for a complete MVP.
These decisions are deferred intentionally and should be revisited when the relevant phase begins:
High-level entity overview for the MVP:
players
├── id (uuid, PK)
├── username (unique)
├── email
├── archetype (brawler | runner | hacker)
├── level (int, max 20)
├── xp (int)
├── hp (int)
├── max_hp (int)
├── energy (int)
├── energy_updated_at (timestamp)
├── max_energy (int)
├── nerve (int)
├── nerve_updated_at (timestamp)
├── max_nerve (int)
├── str (int)
├── def (int)
├── agi (int)
├── dex (int)
├── cash (bigint) — unsecured, lootable
├── bank (bigint) — secured
├── bank_withdraw_at (timestamp, nullable) — cooldown tracker
├── hospitalized_until (timestamp, nullable)
├── protected_until_level (int, default 5)
├── created_at (timestamp)
└── updated_at (timestamp)
skills
├── id (uuid, PK)
├── player_id (FK → players)
├── skill_type (hacking | medicine | streetsmarts)
├── xp (int)
├── level (int)
└── updated_at (timestamp)
crime_ranks
├── id (uuid, PK)
├── player_id (FK → players)
├── crime_type (street_hustle | break_in | hacking)
├── xp (int)
├── rank (int)
└── updated_at (timestamp)
items
├── id (uuid, PK)
├── name (string)
├── description (string)
├── category (weapon | cyberware | crime_tool | consumable)
├── rarity (common | uncommon | rare)
├── stat_bonuses (jsonb) — e.g. {"str": 10, "agi": 5}
├── shop_price (int, nullable) — null = not sold in NPC shop
└── fence_price (int) — sell value at Fence
player_items
├── id (uuid, PK)
├── player_id (FK → players)
├── item_id (FK → items)
├── equipped (boolean, default false)
├── equipped_slot (weapon | cyberware_1 | cyberware_2 | null)
└── obtained_at (timestamp)
jobs
├── id (uuid, PK)
├── player_id (FK → players)
├── job_type (corpo_it | clinic)
├── shift_started_at (timestamp, nullable)
├── shift_duration (int, default 7200) — seconds
├── overtime_invested (int, default 0) — nerve spent
├── collected (boolean, default false)
└── updated_at (timestamp)
combat_logs
├── id (uuid, PK)
├── attacker_id (FK → players)
├── defender_id (FK → players)
├── rounds (jsonb) — array of round results
├── winner_id (FK → players)
├── outcome (walk_away | loot | flatline)
├── loot_amount (int, nullable)
├── xp_gained (int)
└── created_at (timestamp)
chat_messages
├── id (uuid, PK)
├── sender_id (FK → players)
├── recipient_id (FK → players, nullable) — null = global, set = whisper
├── message (text)
├── channel (global | whisper)
└── created_at (timestamp)
transaction_logs
├── id (uuid, PK)
├── player_id (FK → players)
├── type (crime_reward | job_salary | pvp_loot | shop_buy | fence_sell | gym_fee | hospital_bill | bank_withdraw_fee | bank_deposit | bank_withdraw)
├── amount (int) — positive = gain, negative = loss
├── balance_after (bigint)
├── metadata (jsonb, nullable) — e.g. {"crime_type": "hacking", "crime_rank": 12}
└── created_at (timestamp)
This document is the single source of truth for Cryme City development. Update it as decisions evolve.