Files
agentic-studio/zipit/rest_api_check/prompts/0_client_requirements.md
2026-04-12 18:48:14 +03:00

2.5 KiB

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

REST API käyttäjähallinnalle SQLite-tietokannalla

Tulos

**PROJECT NAME:** User Management REST API

**GOAL:** To develop a RESTful API for managing users using an SQLite database.

**CORE FEATURES:**
1. Register new users with username, email, and password.
2. Authenticate users to gain access to the system.
3. Update user profile information (email, password).
4. Delete existing users.
5. Retrieve all registered users.
6. Retrieve a specific user by ID.
7. Search for users based on partial usernames or emails.

**DATA MODEL:**
- **User:** 
  - UserID (Integer, Primary Key)
  - Username (String, Unique)
  - Email (String, Unique)
  - PasswordHash (String)

**API ENDPOINTS:**
1. **POST /users/register**: Register a new user.
   - Request Body:
     {
       "username": "johndoe",
       "email": "john@example.com",
       "password": "securepassword"
     }
2. **POST /auth/login**: Authenticate a user and return a token.
   - Request Body:
     {
       "username": "johndoe",
       "password": "securepassword"
     }
3. **PUT /users/{UserID}**: Update a specific user's profile.
   - Path Parameter: UserID (Integer)
   - Request Body:
     {
       "email": "newjohn@example.com",
       "password": "newsecurepassword"
     }
4. **DELETE /users/{UserID}**: Delete a specific user.
   - Path Parameter: UserID (Integer)
5. **GET /users**: Retrieve all registered users.
6. **GET /users/{UserID}**: Retrieve a specific user by ID.
7. **GET /users/search?query={searchTerm}**: Search for users based on partial usernames or emails.

**CONSTRAINTS:** 
- Must use SQLite as the database.
- No authentication is needed to view all users, but authentication is required to update or delete any user.