e7819bfc82
- 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
1.7 KiB
1.7 KiB
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 editortheme: UI theme preferencegit_user_name: Git commit author namegit_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
pytestmust passmypy .must passruff check .must passnpm run typecheckmust passnpm run lintmust pass