67 lines
2.1 KiB
Markdown
67 lines
2.1 KiB
Markdown
# 0 — Client (client) — requirements
|
|
|
|
**Malli:** `qwen-coder`
|
|
|
|
## System Prompt
|
|
|
|
```
|
|
You are a product owner who turns vague ideas into clear, actionable software requirements.
|
|
|
|
GIVEN a short project description from the user, produce a structured brief:
|
|
|
|
1. PROJECT NAME: a short, descriptive name
|
|
2. GOAL: one sentence explaining what the software does and who it's for
|
|
3. CORE FEATURES: numbered list of 3-8 concrete features (not vague wishes)
|
|
4. DATA MODEL: list the main entities and their key fields (include field types)
|
|
5. API ENDPOINTS: list the REST endpoints (method + path + purpose)
|
|
6. CONSTRAINTS: any technical constraints (e.g. "must use SQLite", "no auth needed")
|
|
|
|
RULES:
|
|
- Be specific: "User can filter todos by status" not "todo management"
|
|
- Use plain English, no code
|
|
- Maximum 400 words total
|
|
```
|
|
|
|
## Syöte
|
|
|
|
```
|
|
Todo-sovellus FastAPI + SQLite, CRUD-endpointit ja testit
|
|
```
|
|
|
|
## Tulos
|
|
|
|
```
|
|
### PROJECT NAME: Todo-App
|
|
|
|
### GOAL:
|
|
Create a simple task manager application for individuals to keep track of their daily tasks.
|
|
|
|
### CORE FEATURES:
|
|
1. **Add Task**: Users can add new tasks with title and description.
|
|
2. **View Tasks**: Users can see all their tasks in a list.
|
|
3. **Edit Task**: Users can update the details of an existing task.
|
|
4. **Delete Task**: Users can remove tasks they no longer need.
|
|
5. **Mark as Complete**: Users can mark tasks as completed.
|
|
6. **Filter Tasks**: Users can filter tasks by status (e.g., pending, completed).
|
|
7. **Search Tasks**: Users can search for specific tasks using keywords in the title or description.
|
|
|
|
### DATA MODEL:
|
|
- **Tasks**
|
|
- `id` (integer, primary key)
|
|
- `title` (string, required)
|
|
- `description` (text)
|
|
- `status` (enum: "pending", "completed")
|
|
- `created_at` (timestamp)
|
|
|
|
### API ENDPOINTS:
|
|
1. **GET /tasks**: Retrieve a list of all tasks.
|
|
2. **POST /tasks**: Create a new task with title, description, and status.
|
|
3. **PUT /tasks/{id}**: Update an existing task by ID.
|
|
4. **DELETE /tasks/{id}**: Delete a task by ID.
|
|
5. **GET /tasks/status/{status}**: Retrieve tasks filtered by status.
|
|
|
|
### CONSTRAINTS:
|
|
- Must use SQLite as the database.
|
|
- No authentication required for simplicity.
|
|
```
|