# monkeycode **Repository Path**: chenshao/monkeycode ## Basic Information - **Project Name**: monkeycode - **Description**: MonkeyCode 智能任务 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 1 - **Created**: 2026-01-21 - **Last Updated**: 2026-04-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # FastAPI Todo API A simple Todo API built with FastAPI, secured with JWT authentication, and backed by SQLite. ## Features - User registration with hashed passwords - OAuth2 password flow with JWT access tokens - CRUD endpoints for user-specific Todo items - SQLite persistence via SQLAlchemy ORM ## Getting Started ### 1. Install dependencies ```bash python -m venv .venv source .venv/bin/activate pip install -r requirements.txt ``` ### 2. Configure (optional) Set a custom JWT secret if desired: ```bash export TODO_APP_SECRET_KEY="your-secret" ``` ### 3. Run the server ```bash uvicorn app.main:app --reload ``` The API will be available at http://127.0.0.1:8000 and interactive docs at http://127.0.0.1:8000/docs. ## API Overview 1. `POST /register` – Create a user account. 2. `POST /token` – Obtain an access token (use `username` for the email field as per OAuth2 spec). 3. Authenticated Todo routes (`Authorization: Bearer `): - `GET /todos` – List todos - `POST /todos` – Create a todo - `GET /todos/{id}` – Fetch a todo - `PUT /todos/{id}` – Update a todo - `DELETE /todos/{id}` – Remove a todo SQLite data is stored in `todo.db` in the project root. ## Web UI Run the FastAPI server and open http://127.0.0.1:8000/ to use a lightweight Todo dashboard. The page lets you register, log in, and manage your personal Todos via the same API, so no extra configuration is required.