Seed public demo scenarios on startup
Idempotent seeder inserts public, unowned demo scenarios from backend/app/seed_data/*.json if a public scenario with the same title is missing, so a fresh Neon database (and any clone) gets demo content guests can play immediately. Ships two scenarios: the Sunken Crypt of Vharos (all four script hooks) and Signal from the Derelict (sci-fi, context-engine focused). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TEpWMjnfPqzZ13nPMoGhs5
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
68c165585c
commit
c96b8cdf2f
@@ -11,8 +11,10 @@ from .database import engine
|
||||
from .limits import BodySizeLimitMiddleware
|
||||
from .migrations import bootstrap
|
||||
from .routers import adventures, auth, debug, scenarios, scripts, settings, story_cards
|
||||
from .seed import seed_public_scenarios
|
||||
|
||||
bootstrap(engine)
|
||||
seed_public_scenarios(engine)
|
||||
|
||||
# Production serves the SPA same-origin, so CORS only matters for the Vite dev
|
||||
# server; AIDND_CORS_ORIGINS overrides for any other cross-origin setup.
|
||||
|
||||
Reference in New Issue
Block a user