An interactive fiction engine combining branching narratives with AI-generated prose.
- Dynamic narrative generation using LLMs
- Character behavior and consent systems
- Appearance and wardrobe tracking
- Support for mature/NSFW content
- Save/load game states
- Docker & Docker Compose
- Python 3.11+
- Node.js 20+
- Clone the repository:
git clone https://github.com/YOUR_USERNAME/plotplay.git
cd plotplay- Set up environment:
cp backend/.env.example backend/.env
# Edit backend/.env with your API keys- Start with Docker Compose:
docker-compose up- Access the application:
- Frontend: http://localhost:5173
- Backend API: http://localhost:8000
- API Docs: http://localhost:8000/docs
Backend:
cd backend
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
uvicorn app.main:app --reloadFrontend:
cd frontend
npm install
npm run dev/backend- FastAPI backend (Python)/frontend- React frontend (TypeScript)/games- Game content files/shared- Shared specifications
The backend now exposes side-effect-only routes that bypass the AI Writer/Checker loop:
POST /api/game/move/{session_id}— deterministic movement by destination, zone, or direction.POST /api/game/shop/{session_id}/purchaseand/sell— execute economy flows with pricing.POST /api/game/inventory/{session_id}/take/drop/give— manipulate inventories directly.
Each response returns a fresh state_summary snapshot so the client can stay in sync without invoking the full turn pipeline.
MIT