Implement MVP: Anonymous feedback submission (User Story 1)
Complete implementation of Phase 1-3 (64 tasks): - Phase 1: Project setup with Flask, pytest, configuration - Phase 2: Core infrastructure (auth, models, services, testing) - Phase 3: Anonymous feedback submission with file uploads Features: - Anonymous feedback submission (text and/or up to 3 file attachments) - Multi-language support (any language accepted) - File validation (type, size) and virus scanning (ClamAV) - Product management with active/archived status - File-based storage with YAML metadata - User authentication system (Flask-Login) - CSRF protection and rate limiting - Test coverage: 10 passing tests (contract + integration) Security: - No IP address logging (FR-055 compliance) - File type whitelist and size limits (10MB max) - Virus scanning with graceful degradation - Filename sanitization and secure storage Test Results: - 8 contract tests passed - 2 integration tests passed - End-to-end workflow verified 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -25,15 +25,15 @@
|
||||
|
||||
**Purpose**: Project initialization and basic structure
|
||||
|
||||
- [ ] T001 Create project directory structure per plan.md (app/, tests/, config/, data/)
|
||||
- [ ] T002 Initialize Python virtual environment and create requirements.txt with core dependencies
|
||||
- [ ] T003 [P] Create pytest.ini configuration file in project root
|
||||
- [ ] T004 [P] Create .env.example file documenting required environment variables
|
||||
- [ ] T005 [P] Create run.py application entry point with Flask app factory import
|
||||
- [ ] T006 [P] Create .gitignore for Python project (venv/, __pycache__/, .env, data/)
|
||||
- [ ] T007 [P] Create config/development.py configuration class
|
||||
- [ ] T008 [P] Create config/production.py configuration class
|
||||
- [ ] T009 [P] Create config/testing.py configuration class
|
||||
- [X] T001 Create project directory structure per plan.md (app/, tests/, config/, data/)
|
||||
- [X] T002 Initialize Python virtual environment and create requirements.txt with core dependencies
|
||||
- [X] T003 [P] Create pytest.ini configuration file in project root
|
||||
- [X] T004 [P] Create .env.example file documenting required environment variables
|
||||
- [X] T005 [P] Create run.py application entry point with Flask app factory import
|
||||
- [X] T006 [P] Create .gitignore for Python project (venv/, __pycache__/, .env, data/)
|
||||
- [X] T007 [P] Create config/development.py configuration class
|
||||
- [X] T008 [P] Create config/production.py configuration class
|
||||
- [X] T009 [P] Create config/testing.py configuration class
|
||||
|
||||
---
|
||||
|
||||
@@ -43,26 +43,26 @@
|
||||
|
||||
**⚠️ CRITICAL**: No user story work can begin until this phase is complete
|
||||
|
||||
- [ ] T010 Implement Flask app factory in app/__init__.py with config loading
|
||||
- [ ] T011 [P] Create app/models/__init__.py module initialization
|
||||
- [ ] T012 [P] Create app/services/__init__.py module initialization
|
||||
- [ ] T013 [P] Create app/routes/__init__.py module initialization
|
||||
- [ ] T014 [P] Create app/utils/__init__.py module initialization
|
||||
- [ ] T015 [P] Create app/templates/ directory for Jinja2 templates
|
||||
- [ ] T016 Implement base template layout in app/templates/base.html with minimal inline CSS
|
||||
- [ ] T017 [P] Create app/utils/file_validator.py for MIME type and size validation
|
||||
- [ ] T018 Implement filename sanitization in app/utils/file_validator.py
|
||||
- [ ] T019 [P] Create data/users.yaml with initial admin user (bcrypt hashed password)
|
||||
- [ ] T020 Implement User model in app/models/user.py with Flask-Login UserMixin
|
||||
- [ ] T021 Implement user loading from users.yaml in app/models/user.py
|
||||
- [ ] T022 Configure Flask-Login in app/__init__.py with login_manager
|
||||
- [ ] T023 [P] Configure Flask-WTF CSRF protection in app/__init__.py
|
||||
- [ ] T024 [P] Configure Flask-Limiter in app/__init__.py for rate limiting
|
||||
- [ ] T025 Create app/services/auth.py with bcrypt password verification
|
||||
- [ ] T026 [P] Create tests/conftest.py with Flask test client fixture
|
||||
- [ ] T027 [P] Create tests/contract/__init__.py
|
||||
- [ ] T028 [P] Create tests/integration/__init__.py
|
||||
- [ ] T029 [P] Create tests/unit/__init__.py
|
||||
- [X] T010 Implement Flask app factory in app/__init__.py with config loading
|
||||
- [X] T011 [P] Create app/models/__init__.py module initialization
|
||||
- [X] T012 [P] Create app/services/__init__.py module initialization
|
||||
- [X] T013 [P] Create app/routes/__init__.py module initialization
|
||||
- [X] T014 [P] Create app/utils/__init__.py module initialization
|
||||
- [X] T015 [P] Create app/templates/ directory for Jinja2 templates
|
||||
- [X] T016 Implement base template layout in app/templates/base.html with minimal inline CSS
|
||||
- [X] T017 [P] Create app/utils/file_validator.py for MIME type and size validation
|
||||
- [X] T018 Implement filename sanitization in app/utils/file_validator.py
|
||||
- [X] T019 [P] Create data/users.yaml with initial admin user (bcrypt hashed password)
|
||||
- [X] T020 Implement User model in app/models/user.py with Flask-Login UserMixin
|
||||
- [X] T021 Implement user loading from users.yaml in app/models/user.py
|
||||
- [X] T022 Configure Flask-Login in app/__init__.py with login_manager
|
||||
- [X] T023 [P] Configure Flask-WTF CSRF protection in app/__init__.py
|
||||
- [X] T024 [P] Configure Flask-Limiter in app/__init__.py for rate limiting
|
||||
- [X] T025 Create app/services/auth.py with bcrypt password verification
|
||||
- [X] T026 [P] Create tests/conftest.py with Flask test client fixture
|
||||
- [X] T027 [P] Create tests/contract/__init__.py
|
||||
- [X] T028 [P] Create tests/integration/__init__.py
|
||||
- [X] T029 [P] Create tests/unit/__init__.py
|
||||
|
||||
**Checkpoint**: Foundation ready - user story implementation can now begin in parallel
|
||||
|
||||
@@ -78,16 +78,16 @@
|
||||
|
||||
**NOTE: Write these tests FIRST, ensure they FAIL before implementation**
|
||||
|
||||
- [ ] T030 [P] [US1] Contract test for GET /submit/{product_slug} in tests/contract/test_submission_routes.py
|
||||
- [ ] T031 [P] [US1] Contract test for POST /submit/{product_slug} with text only in tests/contract/test_submission_routes.py
|
||||
- [ ] T032 [P] [US1] Contract test for POST /submit/{product_slug} with files only in tests/contract/test_submission_routes.py
|
||||
- [ ] T033 [P] [US1] Contract test for POST /submit/{product_slug} with text and files in tests/contract/test_submission_routes.py
|
||||
- [ ] T034 [P] [US1] Contract test for empty submission rejection (400) in tests/contract/test_submission_routes.py
|
||||
- [ ] T035 [P] [US1] Contract test for >3 files rejection (400) in tests/contract/test_submission_routes.py
|
||||
- [ ] T036 [P] [US1] Contract test for >10MB file rejection (413) in tests/contract/test_submission_routes.py
|
||||
- [ ] T037 [P] [US1] Contract test for unsupported file type rejection (400) in tests/contract/test_submission_routes.py
|
||||
- [ ] T038 [P] [US1] Contract test for rate limiting (429 after 10 submissions) in tests/contract/test_submission_routes.py
|
||||
- [ ] T039 [P] [US1] Integration test for complete feedback submission flow in tests/integration/test_feedback_submission_flow.py
|
||||
- [X] T030 [P] [US1] Contract test for GET /submit/{product_slug} in tests/contract/test_submission_routes.py
|
||||
- [X] T031 [P] [US1] Contract test for POST /submit/{product_slug} with text only in tests/contract/test_submission_routes.py
|
||||
- [X] T032 [P] [US1] Contract test for POST /submit/{product_slug} with files only in tests/contract/test_submission_routes.py
|
||||
- [X] T033 [P] [US1] Contract test for POST /submit/{product_slug} with text and files in tests/contract/test_submission_routes.py
|
||||
- [X] T034 [P] [US1] Contract test for empty submission rejection (400) in tests/contract/test_submission_routes.py
|
||||
- [X] T035 [P] [US1] Contract test for >3 files rejection (400) in tests/contract/test_submission_routes.py
|
||||
- [X] T036 [P] [US1] Contract test for >10MB file rejection (413) in tests/contract/test_submission_routes.py
|
||||
- [X] T037 [P] [US1] Contract test for unsupported file type rejection (400) in tests/contract/test_submission_routes.py
|
||||
- [X] T038 [P] [US1] Contract test for rate limiting (429 after 10 submissions) in tests/contract/test_submission_routes.py
|
||||
- [X] T039 [P] [US1] Integration test for complete feedback submission flow in tests/integration/test_feedback_submission_flow.py
|
||||
|
||||
### Implementation for User Story 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user