Production Deploy - Cloudwatch Logging#74
Conversation
Syncing main to development
Feat/infra housekeeping
Feat/middleware-wiring-webhook-setup
* added user calibration endpoints and schema"
- Added user_calibration migration
- Added sqlc queries for calibration CRUD operations
- added /api/users/me/calibration endpoints: GET, POST, DELETE
- me endpoint now fetches user from clerk id using middleware, enhancing security
- removed GET methods for user (GET /{id}, GET /)
* Fixed line endings
* Fixed time formatting in handler
* Added NOT NULL constrain to updated_at, created_at in db table
switch go dev container port to correct mapping (8080)
fixed variable typo in middleware_auth.go
---------
Co-authored-by: NicolaSavino <nick.savino@arcurve.com>
Co-authored-by: NicolaSavino <nick.savino@arcurve.com>
* Implemented workout and calibration schema with included sqlc queries. Updated makefile and seeding files * Regenerated SQLC to match new queries and models (workout type + workout session) * Added workout session service * Added Workout Handler Endpoint * Addressed PR comments - fixed syntax error in makefile - Fixed migration schema - fixed seeding script - added /service/helps/helpers.util file - renamed Dtos to match go standards, (Id -> ID) * Updated API endpoints * updated dtos to match casing convention. updated workout_session logic * Added functionality for workout sets and reps. (services, handlers, migrations, queries) * Addressed PR comments * Addressed PR comments --------- Co-authored-by: NicolaSavino <nick.savino@arcurve.com>
* fix: added clerk webhook secret * updated CRLF line endings to LF
* fix: added clerk webhook secret * updated CRLF line endings to LF * fix
…pment # Conflicts: # scripts/ci/deploy_via_ssm.sh
* Prod fix (#67) * Small changes to dev tooling (docker/make/compose * Server: minor variable rename * Auth middleware + clerk webhook handler * Added WithTransaction to store * Removed debug logging message exposing userid * Removed docker-compose changes not relevant to PR * Renamed users.go to users.handler.go in handlers * Added documentation explaining dev bypass * Feat/calibration-endpoints (#57) * added user calibration endpoints and schema" - Added user_calibration migration - Added sqlc queries for calibration CRUD operations - added /api/users/me/calibration endpoints: GET, POST, DELETE - me endpoint now fetches user from clerk id using middleware, enhancing security - removed GET methods for user (GET /{id}, GET /) * Fixed line endings * Fixed time formatting in handler * Added NOT NULL constrain to updated_at, created_at in db table switch go dev container port to correct mapping (8080) fixed variable typo in middleware_auth.go --------- Co-authored-by: NicolaSavino <nick.savino@arcurve.com> * Fixed syntax error on migration (#58) Co-authored-by: NicolaSavino <nick.savino@arcurve.com> * Feat/workouts api (#59) * Implemented workout and calibration schema with included sqlc queries. Updated makefile and seeding files * Regenerated SQLC to match new queries and models (workout type + workout session) * Added workout session service * Added Workout Handler Endpoint * Addressed PR comments - fixed syntax error in makefile - Fixed migration schema - fixed seeding script - added /service/helps/helpers.util file - renamed Dtos to match go standards, (Id -> ID) * Updated API endpoints * updated dtos to match casing convention. updated workout_session logic * Added functionality for workout sets and reps. (services, handlers, migrations, queries) * Addressed PR comments * Addressed PR comments --------- Co-authored-by: NicolaSavino <nick.savino@arcurve.com> * fix: added clerk webhook secret (#62) * Fix/add clerkwebhook secret (#64) * fix: added clerk webhook secret * updated CRLF line endings to LF * Fix/add clerkwebhook secret (#66) * fix: added clerk webhook secret * updated CRLF line endings to LF * fix --------- Co-authored-by: NicolaSavino <nick.savino@arcurve.com> * fix: wipe data on seed --------- Co-authored-by: Nicola Savino <77707655+NickSavino@users.noreply.github.com> Co-authored-by: NicolaSavino <nick.savino@arcurve.com>
* feat: setup AWS Cloudwatch resource and updated deploy script to attach to logging
ⓘ You are approaching your monthly quota for Qodo. Upgrade your plan Review Summary by QodoProduction Deploy - CloudWatch Logging and User Deletion Webhook
WalkthroughsDescription• Add CloudWatch logging to production Docker deployment • Implement user deletion webhook handler for Clerk integration • Refactor workout session history query to include aggregated sets/reps • Create new logs infrastructure module with IAM policies • Add database reset workflow for production environment • Fix line endings and formatting across infrastructure files Diagramflowchart LR
A["Clerk Webhook"] -->|user.deleted event| B["HandleDeleteUserFromClerk"]
B -->|DeleteUserByClerkID| C["Database"]
D["Docker Container"] -->|awslogs driver| E["CloudWatch Logs"]
F["Logs Module"] -->|IAM Policy| G["EC2 Role"]
G -->|Permissions| E
H["Reset Database Workflow"] -->|Manual Trigger| I["Database Migration"]
File Changes1. internal/core/service/user.service.go
|
Code Review by Qodo
1. Prod DB reset workflow
|
No description provided.