Nightshift: Analyst is a narrative terminal game about power, surveillance and moral choice: you are a night-shift analyst, messages arrive, every decision shifts three metrics (technical, ethical, political) while fatigue builds, and the shift ends in one of several endings. You play in a browser terminal.
backend/– FastAPI backend service with PostgreSQL, Redis, and Celery integrations (seebackend/README.mdfor full docs)frontend/– Vite + React terminal client (login, account creation, the shift console)docs/superpowers/plans/– roadmap and implementation plansDGD/– Game design document (Game Design Document — Nightshift_ Analyst.pdf)LICENSE– MIT license for the project
-
Set up the backend
cd backend cp .env.example .env docker-compose up --buildThis boots PostgreSQL, Redis, the FastAPI app, and worker services defined in
docker-compose.yml. Update the.envfile with secrets before running in production. -
Explore the API (tables are created on startup; Alembic is not set up yet)
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
Refer to backend/README.md for local (non-Docker) setup, testing, linting, and deployment tips.
- Run the frontend
By default the client points to
cd frontend npm install npm run devhttp://localhost:8000/api/v1. Override withVITE_API_BASE_URLin a.envfile if your backend runs elsewhere. Open http://localhost:5173, create an account, press Start shift and typehelp.
The DGD/ directory contains the authoritative game design document. Review it to understand narrative arcs, characters, core mechanics, and planned content before making gameplay or content changes.
- Create a new branch per feature or fix.
- Ensure tests pass (
pytestinbackend/,npm testinfrontend/) and update documentation when behavior changes. - The game rules live in
backend/app/engine/as pure functions; content is data inbackend/content/.
Nightshift Analyst is released under the MIT License. See LICENSE for details.