feat: implement docker infrastructure (US-001)
- Add docker-compose.yml with postgres, redis, api, and web services - Add multi-stage Dockerfile for API (Python 3.11) - Add multi-stage Dockerfile for web (Node.js 20 + nginx) - Add Makefile with common development commands - Add .env.example with all required environment variables - Add placeholder pyproject.toml and package.json for builds - Configure health checks for all services - Setup persistent volumes for postgres, redis, and repos - Run services as non-root users
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
# User Configuration Specification
|
||||
|
||||
## Purpose
|
||||
|
||||
Store and manage user preferences and settings.
|
||||
|
||||
## Requirements
|
||||
|
||||
### Requirement: Key-Value Storage
|
||||
|
||||
The system SHALL store user configuration as JSONB key-value pairs.
|
||||
|
||||
#### Scenario: Store preferences
|
||||
- GIVEN an authenticated user
|
||||
- WHEN they update their settings
|
||||
- THEN the configuration is stored in the UserConfig model
|
||||
|
||||
### Requirement: Supported Config Keys
|
||||
|
||||
The system SHALL support specific configuration keys.
|
||||
|
||||
#### Scenario: Supported keys
|
||||
- GIVEN the configuration system
|
||||
- THEN these keys SHALL be supported:
|
||||
- `default_editor`: Preferred code editor
|
||||
- `theme`: UI theme preference
|
||||
- `git_user_name`: Git commit author name
|
||||
- `git_user_email`: Git commit author email
|
||||
|
||||
### Requirement: Config Retrieval
|
||||
|
||||
The system SHALL return user configuration.
|
||||
|
||||
#### Scenario: Get config
|
||||
- GIVEN an authenticated user
|
||||
- WHEN they access settings
|
||||
- THEN their current configuration is returned
|
||||
|
||||
### Requirement: Config Updates
|
||||
|
||||
The system SHALL support partial configuration updates.
|
||||
|
||||
#### Scenario: Update single key
|
||||
- GIVEN an authenticated user with existing config
|
||||
- WHEN they update just the theme
|
||||
- THEN only that key is modified
|
||||
- AND other keys remain unchanged
|
||||
|
||||
### Requirement: Frontend Integration
|
||||
|
||||
The system SHALL apply configuration in the frontend.
|
||||
|
||||
#### Scenario: Apply theme
|
||||
- GIVEN a user with theme preference set
|
||||
- WHEN they load the application
|
||||
- THEN the selected theme is applied
|
||||
|
||||
## Dependencies
|
||||
|
||||
- Database models: UserConfig, User
|
||||
- auth-oauth (authenticated users)
|
||||
|
||||
## Quality Gates
|
||||
|
||||
- `pytest` must pass
|
||||
- `mypy .` must pass
|
||||
- `ruff check .` must pass
|
||||
- `npm run typecheck` must pass
|
||||
- `npm run lint` must pass
|
||||
Reference in New Issue
Block a user