Commit Graph

15 Commits

Author SHA1 Message Date
你çšnepiedg 515fba0b55 feat: update smoke profile area handling 2026-03-19 15:41:26 +08:00
root 172a543a5e docs: 完成 #3 戒烟小程序待办收敛与验收记录 2026-03-09 19:17:31 +08:00
root bdd34785ef 修复戒烟首页与统计中抽烟/忍住口径混淆 2026-03-04 00:59:12 +08:00
hello-dd-code c735b791cb 补充AI下次时间接口异常入参与验证记录 2026-02-28 16:24:04 +08:00
nepiedg 9200600b1c Enhance smoking tracking API with new features and improvements
- Added a new API endpoint `GET /api/v1/smoke/home` to consolidate core modules for the home dashboard, reducing the need for multiple requests.
- Updated the `smoke` routes to include the new home endpoint and improved user profile management with the addition of a `quit_date` field.
- Enhanced the algorithm for calculating daily targets and next smoke suggestions, ensuring accurate future time handling and user-specific recommendations.
- Improved API documentation to reflect new endpoints, response formats, and detailed field descriptions for better clarity and usability.
- Refactored user authentication handling in various handlers to streamline the process and ensure consistent error responses.
2026-01-29 17:16:35 +00:00
nepiedg c9ebfd5873 Update algorithm and API documentation for smoking recovery and motivation features
- Added unified backend calculations for health recovery, savings, and motivation generation in the algorithm documentation.
- Updated API documentation to include new endpoints for retrieving statistics and motivation messages, enhancing clarity on data retrieval processes.
- Revised product documentation to reflect changes in API usage for health recovery and savings calculations, ensuring consistency across all related files.
2026-01-25 09:33:10 +00:00
nepiedg f80c3e8f45 Update algorithm and API documentation for smoking tracking app
- Enhanced the algorithm documentation to clarify the calculation of smoking intervals, including default values and edge cases.
- Updated API documentation to reflect changes in response formats, including the addition of `exceeded_yesterday` and adjustments to time formatting to RFC3339.
- Improved descriptions of user profile management and AI suggestions in the product documentation, ensuring consistency across all related files.
- Removed outdated sequence diagram and UI documentation files to streamline project resources.
2026-01-25 08:51:25 +00:00
nepiedg b67dc32369 Enhance smoking tracking API and documentation
- Updated the main.go file to set the local time zone to Asia/Shanghai.
- Changed API endpoints from `PUT` to `POST` for user profile and logs management in multiple documentation files to reflect the correct usage.
- Added new fields in the API response for home summary, including `last_smoke_at`, `today_count`, `resisted_count`, and `reduced_from_yesterday`.
- Enhanced documentation across various files to accurately describe the updated API endpoints and their expected behaviors.
2026-01-25 07:55:32 +00:00
nepiedg be6d579d41 Update README.md to include product and UI documentation references
- Added new sections in README.md for product documentation (PRD) and UI/UX design documentation, linking to `docs/smoke/PRODUCT.md` and `docs/smoke/UI.md` respectively, to enhance the overall documentation for the project.
2026-01-20 07:34:25 +00:00
nepiedg 53531905d2 Update README.md to include sequence diagram reference for smoking tracking app
- Added a new section in README.md to reference the sequence diagram located in `docs/smoke/SEQUENCE.md`, enhancing documentation for the application's front-end flow.
2026-01-20 07:28:43 +00:00
nepiedg 6cf7eb2294 Enhance smoking tracking features with AI next smoke time suggestions
- Added new API endpoint `GET /api/v1/smoke/next_smoke_time` to provide AI-generated suggestions for the next smoking time based on user data.
- Introduced a new database table `fa_smoke_ai_next_smoke` to store structured AI time node suggestions.
- Updated smoke handler and service to integrate the new AI next smoke time functionality.
- Enhanced documentation to reflect the new API endpoint and its usage, including details on how to generate AI time nodes.
2026-01-20 07:08:52 +00:00
nepiedg dc54c4e934 Add user profile management for smoking data
- Introduced new API endpoints `GET /api/v1/smoke/profile` and `PUT /api/v1/smoke/profile` for retrieving and updating user smoking profiles.
- Added a new database table `fa_smoke_user_profile` to store user-specific smoking data, including daily smoking habits and motivations.
- Updated the smoke handler and service to integrate user profile data into AI advice generation.
- Enhanced documentation to reflect the new user profile features and their usage.
2026-01-20 02:37:20 +00:00
nepiedg f1f77a4d3d Add dashboard and latest logs endpoints for smoke tracking
- Introduced a new API endpoint `GET /api/v1/smoke/dashboard` to retrieve a summary of smoking statistics over a specified date range, including today's count and weekly breakdown.
- Added `GET /api/v1/smoke/logs/latest` endpoint to fetch the most recent smoking logs with a configurable limit.
- Updated the smoke handler and service to support the new functionality, including error handling for date parsing and limit validation.
- Enhanced documentation to reflect the new API endpoints and their usage.
2026-01-06 00:17:51 +00:00
nepiedg 16844d4a42 Enhance AI and Redis integration for smoke logging features
- Added AI configuration options to .env.example and config.go for OpenAI integration.
- Implemented Redis caching for session management in main.go and auth middleware.
- Updated smoke logging service to support real smoking time (`smoke_at`) and AI advice retrieval.
- Enhanced API routes to include endpoints for AI advice and unlock functionality for non-members.
- Improved database schema with new tables for AI advice and unlock records.
- Expanded documentation to cover new AI features and Redis caching implementation.
2026-01-03 02:14:21 +00:00
nepiedg 2884f54666 Update documentation structure and enhance API descriptions
- Revised README.md to provide a clearer documentation structure for multiple mini programs, including a new table of contents.
- Added references to common authentication documentation in both the remove watermark API and README files.
- Improved clarity of the login interface description and error handling messages in the remove watermark API documentation.
2025-12-31 03:02:00 +00:00