34 lines
1.2 KiB
Plaintext
34 lines
1.2 KiB
Plaintext
**PROJECT NAME:** Todo Manager
|
|
|
|
**GOAL:** A simple todo application for individuals to manage their tasks efficiently.
|
|
|
|
**CORE FEATURES:**
|
|
1. Create a new todo item with title and description.
|
|
2. Read (view) all todos or filter by status (e.g., completed, pending).
|
|
3. Update an existing todo item's details.
|
|
4. Delete a todo item.
|
|
5. Mark a todo as completed.
|
|
6. View the total number of todos.
|
|
7. Search for todos by partial title.
|
|
|
|
**DATA MODEL:**
|
|
1. **Todo**
|
|
- id (integer, primary key)
|
|
- title (string, required)
|
|
- description (text, optional)
|
|
- status (enum [completed, pending], default: pending)
|
|
- created_at (timestamp, auto-generated)
|
|
|
|
**API ENDPOINTS:**
|
|
1. **POST /todos**: Create a new todo item.
|
|
2. **GET /todos**: Retrieve all todos.
|
|
3. **GET /todos/status/{status}**: Filter todos by status.
|
|
4. **PUT /todos/{id}**: Update an existing todo item.
|
|
5. **DELETE /todos/{id}**: Delete a todo item.
|
|
6. **PATCH /todos/{id}/complete**: Mark a todo as completed.
|
|
7. **GET /todos/count**: Get the total number of todos.
|
|
8. **GET /todos/search?q={query}**: Search for todos by partial title.
|
|
|
|
**CONSTRAINTS:**
|
|
- Must use SQLite as the database.
|
|
- No authentication is required. |