An open, extensible API for small minigames — designed for collaborative development.
Goal: Build an extendable HTTP API that hosts multiple minigames (e.g. rock-paper-scissors, number guessing) and is easy for the community to contribute to.
Features
- Interactive OpenAPI documentation at
/docs(FastAPI) - Example game: Rock-Paper-Scissors (
POST /rps) - Example game: Number Guessing with sessions (
POST /guess/start,POST /guess/{game_id}) - Easy to extend: add new games as endpoints
Quickstart
- Clone the repository
git clone <repo-url>
cd MiniGames-API- Install dependencies
python -m pip install -r requirements.txt- Start development server
uvicorn main:app --reload
# or (if available) `python main.py`- Open the interactive docs:
- OpenAPI (Swagger UI): http://127.0.0.1:8000/docs
- ReDoc: http://127.0.0.1:8000/redoc
Endpoints (short)
GET /— project infoPOST /rps— rock-paper-scissors. Body:{ "player": "rock|paper|scissors" }POST /guess/start— create a new number-guessing session. Response:{ "game_id": "..." }POST /guess/{game_id}— send a guess{ "guess": 42 }— response:low|high|correctandattempts.
Contributing
- Read CONTRIBUTING.md for contribution guidelines.
- Use the Issue templates for Bug Reports and Feature Requests under
.github/ISSUE_TEMPLATE.
License
This project is Open Source under the MIT License — see LICENSE.
Enjoy building and contributing! 🎮