πΊοΈ Platform Architecture Overview β How Everything Fits Together #112
LarytheLord
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Purpose
This discussion is the single best starting point for any contributor β human or AI agent. It maps every part of the platform, how data flows between them, and why things are built the way they are.
Read this before picking up any issue.
What Adventurers Guild Is
A gamified developer marketplace with a dual purpose:
The key insight: rank is a trust signal. A D-rank adventurer has shipped production code across multiple reviewed quests. Clients get skill-vetting built into the pipeline.
Three User Roles
Critical admin note: admin has no
CompanyProfile. Any code that updatescompanyProfilemust checkrole !== adminfirst or it will crash.Two Delivery Tracks
Track is a hard boundary enforced at the API level:
Quest Lifecycle
Key:
lib/quest-lifecycle.tssyncs quest status with its assignments. Multi-participant quests stayavailableuntil all slots are filled.Assignment Lifecycle
pending_admin_reviewis a Phase 2 addition (issue #105). It sits betweensubmittedandreviewfor BOOTCAMP and INTERN track quests. OPEN track goes direct toreview.Auth Architecture
lib/auth.tsβ config + JWT/session callbackslib/api-auth.tsβrequireAuth(...roles)helper used in ALL API routesmiddleware.tsβ RBAC route protection with longest-prefix-matchid,role,rank,xpSession shape:
Database: Key Models
Full schema:
prisma/schema.prismaβ always read this before touching models.API Surface
Frontend: Layout Rules
app/layout.tsxrenders<Navigation />+<SiteFooter />for ALL pagesnullon/dashboard/**and/adminroutesapp/dashboard/layout.tsx<Navigation />or<SiteFooter />inside a page componentXP and Ranking
Ranks: F β E β D β C β B β A β S
XP is granted in
lib/xp-utils.tswhen a submission is approved. Rank updates automatically. Adventurers only access quests at or below their rank (enforced by the quest difficulty field).For bootcamp students: XP is earned but no payment in Phase 2.
Payment Architecture (Phase 2)
lib/payment-provider.tsroutes to:Platform fee: 15% of quest reward.
BOOTCAMP track: XP-only. No payment until Phase 3.
Design System Rules
orange-500only. No other accent colors.<RankBadge>component onlybg-slate-950/bg-slate-900shadcn/uias base primitivesUseful File Map
lib/auth.tslib/db.tslib/api-auth.tsmiddleware.tslib/quest-lifecycle.tslib/xp-utils.tslib/payment-provider.tsprisma/schema.prismatypes/next-auth.d.tsBeta Was this translation helpful? Give feedback.
All reactions