Click any of the buttons below to start a new development environment to demo or contribute to the codebase without having to install anything on your machine:
Runs on Linux, Windows or Mac.
A (much simplified) port of a famous adventure game to help teach my daughter how to program in Python.
Two easy ways to launch the console project:
- Click on the Open with GitHub Codespaces badge above to launch the project in a browser or on your desktop inside Visual Studio Code, then type
uv run python zorkdemo.pyin the terminal window. - Download one of the binary releases and run the file on your system.
NOTE: the MacOS version does not have code signing built into it yet (that's next on my list!). To run it, you will need to set the binary as executable with chmod 755 or similar, and after trying to run it once, go through System Preferences: Security and Privacy: General and "Allow the program to run anyway".
adventure/: shared game engine logicbackend/: FastAPI service (SQLAlchemy + Alembic, target Railway deploy)frontend/: TypeScript frontend app (target GitHub Pages deploy)docs/architecture.md: migration architecture notes
Install tooling and Python dependencies:
Standardized environment variables:
- Backend:
DATABASE_URL,CORS_ALLOW_ORIGINS(seebackend/.env.example) - Frontend:
VITE_API_BASE_URL(seefrontend/.env.example)
Key targets:
make setup: install project tooling (uv, and Node/npm if missing)make install: install runtime dependencies onlymake devinstall: install full dev/test dependenciesmake lint: runruff checkmake format: runruff formatmake test: run Python + frontend testsmake run: ensure local backend is up, launch frontend dev server, and open browser (Linux/macOS/Windows)
make run uses uv run python -m backend.app.dev_runner for cross-platform process startup, health checks, and browser opening.
Optional make run variables:
BACKEND_HOST,BACKEND_PORT,FRONTEND_HOST,FRONTEND_PORTDATABASE_URL,CORS_ALLOW_ORIGINSBACKEND_LOG(default:.tmp/zorkdemo-backend.log)
- Workflow: .github/workflows/deploy-frontend-pages.yml
- Set repository variable
VITE_API_BASE_URLto your Railway backend URL (example:https://<service>.up.railway.app). - Push to
mainto build and publishfrontend/dist.
- Deployment config: railway.toml
- Health endpoint used by deployment config:
/api/v1/health - Required Railway env vars:
DATABASE_URL(from Railway Postgres plugin)CORS_ALLOW_ORIGINS(must include your GitHub Pages URL)
- Optional GitHub Actions deploy workflow: .github/workflows/deploy-backend-railway.yml
- Requires secret
RAILWAY_TOKEN - Requires repo variable
RAILWAY_SERVICE - Optional repo variable
BACKEND_HEALTHCHECK_URL
- Requires secret
For adding new locations, items, and commands, see:
uv run alembic -c backend/alembic.ini upgrade head
uv run uvicorn backend.app.main:app --host 0.0.0.0 --port 8000 --reloadAPI endpoints:
GET /api/v1/healthPOST /api/v1/sessionPOST /api/v1/commandPOST /api/v1/session/reset
cd frontend
npm install
npm run devNavigate to http://localhost:5173/