plan(backend): Update task list
Generated by: Planning Agent Timestamp: 2025-11-21T01:00:47.221578+00:00 Component: backend
This commit is contained in:
parent
43ce663b0b
commit
ecbd6e8f4b
1 changed files with 230 additions and 3 deletions
|
|
@ -2,8 +2,235 @@
|
|||
"project": "mnemo_cards_backend",
|
||||
"component": "backend",
|
||||
"version": "1.0",
|
||||
"generated_at": null,
|
||||
"generated_at": "2025-11-21T01:00:13.845013+00:00",
|
||||
"generated_by": "planning_agent",
|
||||
"tasks": []
|
||||
"tasks": [
|
||||
{
|
||||
"id": "BACKEND-001",
|
||||
"title": "Implement Subscriptions Plans Endpoint",
|
||||
"priority": "high",
|
||||
"status": "pending",
|
||||
"estimated_hours": 2.0,
|
||||
"description": "Implement GET /api/v2/subscriptions/plans endpoint to return available subscription plans. Use SubscriptionManager.getAllSubscriptionPlans() or getSubscriptionDto() to fetch plans and return them in proper format.",
|
||||
"acceptance_criteria": [
|
||||
"GET /api/v2/subscriptions/plans returns 200 with list of plans",
|
||||
"Plans are properly formatted as JSON",
|
||||
"Endpoint handles authentication correctly",
|
||||
"Returns empty array if no plans available",
|
||||
"Unit test passes for getPlans endpoint"
|
||||
],
|
||||
"dependencies": [],
|
||||
"files_to_modify": [
|
||||
"mnemo_cards_backend/lib/api/v2/subscriptions_api_v2.dart",
|
||||
"mnemo_cards_backend/test/api/v2/subscriptions_api_v2_test.dart"
|
||||
],
|
||||
"component": "backend"
|
||||
},
|
||||
{
|
||||
"id": "BACKEND-002",
|
||||
"title": "Implement Subscription Status Endpoint",
|
||||
"priority": "high",
|
||||
"status": "pending",
|
||||
"estimated_hours": 2.0,
|
||||
"description": "Implement GET /api/v2/subscriptions/status endpoint to return current user's subscription status. Use SubscriptionManager.getSubscriptionDto() to get subscription info and return active status, start/finish dates.",
|
||||
"acceptance_criteria": [
|
||||
"GET /api/v2/subscriptions/status returns 200 with subscription status",
|
||||
"Returns active: true/false correctly",
|
||||
"Returns start and finish dates when subscription is active",
|
||||
"Endpoint requires authentication",
|
||||
"Returns 401 for unauthenticated requests",
|
||||
"Unit test passes for getStatus endpoint"
|
||||
],
|
||||
"dependencies": [],
|
||||
"files_to_modify": [
|
||||
"mnemo_cards_backend/lib/api/v2/subscriptions_api_v2.dart",
|
||||
"mnemo_cards_backend/test/api/v2/subscriptions_api_v2_test.dart"
|
||||
],
|
||||
"component": "backend"
|
||||
},
|
||||
{
|
||||
"id": "BACKEND-003",
|
||||
"title": "Implement Subscription Purchase Endpoint",
|
||||
"priority": "high",
|
||||
"status": "pending",
|
||||
"estimated_hours": 3.0,
|
||||
"description": "Implement POST /api/v2/subscriptions/purchase endpoint to handle subscription purchases. Accept planId in request body, validate plan exists, create payment via PaymentManager, and activate subscription for user.",
|
||||
"acceptance_criteria": [
|
||||
"POST /api/v2/subscriptions/purchase accepts planId in request body",
|
||||
"Validates planId exists and is valid",
|
||||
"Creates payment record via PaymentManager",
|
||||
"Activates subscription for user",
|
||||
"Returns 200 with purchase confirmation",
|
||||
"Returns 400 for invalid planId",
|
||||
"Returns 401 for unauthenticated requests",
|
||||
"Unit test passes for purchase endpoint"
|
||||
],
|
||||
"dependencies": ["BACKEND-001"],
|
||||
"files_to_modify": [
|
||||
"mnemo_cards_backend/lib/api/v2/subscriptions_api_v2.dart",
|
||||
"mnemo_cards_backend/test/api/v2/subscriptions_api_v2_test.dart"
|
||||
],
|
||||
"component": "backend"
|
||||
},
|
||||
{
|
||||
"id": "BACKEND-004",
|
||||
"title": "Implement Subscription Cancel Endpoint",
|
||||
"priority": "high",
|
||||
"status": "pending",
|
||||
"estimated_hours": 2.0,
|
||||
"description": "Implement POST /api/v2/subscriptions/cancel endpoint to cancel user's active subscription. Update UserSubscriptionModel to mark subscription as cancelled, set cancellation date, and prevent auto-renewal.",
|
||||
"acceptance_criteria": [
|
||||
"POST /api/v2/subscriptions/cancel cancels active subscription",
|
||||
"Returns 200 with cancellation confirmation",
|
||||
"Returns 400 if user has no active subscription",
|
||||
"Returns 401 for unauthenticated requests",
|
||||
"Subscription is marked as cancelled in database",
|
||||
"Unit test passes for cancel endpoint"
|
||||
],
|
||||
"dependencies": ["BACKEND-002"],
|
||||
"files_to_modify": [
|
||||
"mnemo_cards_backend/lib/api/v2/subscriptions_api_v2.dart",
|
||||
"mnemo_cards_backend/test/api/v2/subscriptions_api_v2_test.dart"
|
||||
],
|
||||
"component": "backend"
|
||||
},
|
||||
{
|
||||
"id": "BACKEND-005",
|
||||
"title": "Add Promocodes List Endpoint",
|
||||
"priority": "medium",
|
||||
"status": "pending",
|
||||
"estimated_hours": 2.0,
|
||||
"description": "Implement GET /api/v2/promocodes endpoint to list available promocodes for current user. Return active campaigns with their promocodes that user can apply. Filter by active status and date range.",
|
||||
"acceptance_criteria": [
|
||||
"GET /api/v2/promocodes returns 200 with list of available promocodes",
|
||||
"Only returns active campaigns within date range",
|
||||
"Filters promocodes user hasn't already activated",
|
||||
"Returns 401 for unauthenticated requests",
|
||||
"Proper JSON format with campaign and code information",
|
||||
"Unit test passes for listPromocodes endpoint"
|
||||
],
|
||||
"dependencies": [],
|
||||
"files_to_modify": [
|
||||
"mnemo_cards_backend/lib/api/v2/promocodes_api_v2.dart",
|
||||
"mnemo_cards_backend/lib/promo_codes/promo_codes_manager.dart",
|
||||
"mnemo_cards_backend/test/api/v2/promocodes_api_v2_test.dart"
|
||||
],
|
||||
"component": "backend"
|
||||
},
|
||||
{
|
||||
"id": "BACKEND-006",
|
||||
"title": "Add Promocode Validation Endpoint",
|
||||
"priority": "medium",
|
||||
"status": "pending",
|
||||
"estimated_hours": 2.0,
|
||||
"description": "Implement GET /api/v2/promocodes/{code}/validate endpoint to validate a promocode without applying it. Check if code exists, is active, hasn't exceeded activation limits, and user is eligible.",
|
||||
"acceptance_criteria": [
|
||||
"GET /api/v2/promocodes/{code}/validate returns validation result",
|
||||
"Returns 200 with valid: true/false and message",
|
||||
"Checks code existence, status, and activation limits",
|
||||
"Checks user eligibility (tags, previous activations)",
|
||||
"Returns 401 for unauthenticated requests",
|
||||
"Returns 404 for non-existent codes",
|
||||
"Unit test passes for validatePromocode endpoint"
|
||||
],
|
||||
"dependencies": [],
|
||||
"files_to_modify": [
|
||||
"mnemo_cards_backend/lib/api/v2/promocodes_api_v2.dart",
|
||||
"mnemo_cards_backend/lib/promo_codes/promo_codes_manager.dart",
|
||||
"mnemo_cards_backend/test/api/v2/promocodes_api_v2_test.dart"
|
||||
],
|
||||
"component": "backend"
|
||||
},
|
||||
{
|
||||
"id": "BACKEND-007",
|
||||
"title": "Write Unit Tests for Statistics Models",
|
||||
"priority": "medium",
|
||||
"status": "pending",
|
||||
"estimated_hours": 3.0,
|
||||
"description": "Write comprehensive unit tests for all statistics-related models (PackProgressModel, AchievementModel, StudySessionModel) including toDto/fromDto conversions, serialization, and edge cases.",
|
||||
"acceptance_criteria": [
|
||||
"Unit tests created for PackProgressModel",
|
||||
"Unit tests created for AchievementModel",
|
||||
"Unit tests created for StudySessionModel",
|
||||
"All toDto/fromDto conversions tested",
|
||||
"Serialization/deserialization tested",
|
||||
"Edge cases covered (null values, empty lists, etc.)",
|
||||
"15+ unit tests pass with >80% coverage"
|
||||
],
|
||||
"dependencies": [],
|
||||
"files_to_modify": [
|
||||
"mnemo_cards_backend/test/models/pack_progress_model_test.dart",
|
||||
"mnemo_cards_backend/test/models/achievement_model_test.dart",
|
||||
"mnemo_cards_backend/test/models/study_session_model_test.dart"
|
||||
],
|
||||
"component": "backend"
|
||||
},
|
||||
{
|
||||
"id": "BACKEND-008",
|
||||
"title": "Update OpenAPI Specification for Statistics Endpoints",
|
||||
"priority": "medium",
|
||||
"status": "pending",
|
||||
"estimated_hours": 2.0,
|
||||
"description": "Update public/open_api.yaml to include all statistics endpoints (detailed, packs, words, timeline, sessions, achievements) with proper request/response schemas, query parameters, and examples.",
|
||||
"acceptance_criteria": [
|
||||
"All 6 statistics endpoints documented in OpenAPI spec",
|
||||
"Request schemas defined with query parameters",
|
||||
"Response schemas defined with proper types",
|
||||
"Examples provided for each endpoint",
|
||||
"Error responses documented (400, 401, 404)",
|
||||
"OpenAPI spec validates without errors"
|
||||
],
|
||||
"dependencies": [],
|
||||
"files_to_modify": [
|
||||
"mnemo_cards_backend/public/open_api.yaml"
|
||||
],
|
||||
"component": "backend"
|
||||
},
|
||||
{
|
||||
"id": "BACKEND-009",
|
||||
"title": "Complete Statistics Integration Tests",
|
||||
"priority": "medium",
|
||||
"status": "pending",
|
||||
"estimated_hours": 4.0,
|
||||
"description": "Complete integration tests for all statistics endpoints, ensuring end-to-end flow works correctly. Test pagination, filtering, error handling, and edge cases for all statistics endpoints.",
|
||||
"acceptance_criteria": [
|
||||
"Integration tests for getDetailedStatistics endpoint",
|
||||
"Integration tests for getPacksStatistics with packId filter",
|
||||
"Integration tests for getWordsStatistics with pagination and filters",
|
||||
"Integration tests for getTimelineStatistics with period filtering",
|
||||
"Integration tests for recordStudySession endpoint",
|
||||
"Integration tests for getAchievements endpoint",
|
||||
"All integration tests pass",
|
||||
"Edge cases covered (empty data, invalid filters, etc.)"
|
||||
],
|
||||
"dependencies": [],
|
||||
"files_to_modify": [
|
||||
"mnemo_cards_backend/test/api/v2/users_api_v2_statistics_test.dart"
|
||||
],
|
||||
"component": "backend"
|
||||
},
|
||||
{
|
||||
"id": "BACKEND-010",
|
||||
"title": "Update Statistics Documentation",
|
||||
"priority": "low",
|
||||
"status": "pending",
|
||||
"estimated_hours": 2.0,
|
||||
"description": "Create STATISTICS_API.md documentation and update PROGRESS.md and TODO.md with statistics system completion status. Document API endpoints, request/response formats, and usage examples.",
|
||||
"acceptance_criteria": [
|
||||
"STATISTICS_API.md created with comprehensive API documentation",
|
||||
"All statistics endpoints documented with examples",
|
||||
"Request/response formats documented",
|
||||
"PROGRESS.md updated with statistics completion status",
|
||||
"TODO.md updated with completed tasks",
|
||||
"Documentation is clear and complete"
|
||||
],
|
||||
"dependencies": ["BACKEND-008"],
|
||||
"files_to_modify": [
|
||||
"mnemo_cards_backend/STATISTICS_API.md",
|
||||
"mnemo_cards_backend/PROGRESS.md",
|
||||
"mnemo_cards_backend/TODO.md"
|
||||
],
|
||||
"component": "backend"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue