feat: single table design#8
Merged
Merged
Conversation
Add new API endpoint that returns the authenticated user's profile information based on the username extracted from JWT token. Changes: - Add GetCurrentUser handler in handler.go - Add CurrentUserResponse DTO with ISO 8601 timestamps - Register GET /me route with JWT authentication - Update CDK stack to include /me API Gateway resource - Add comprehensive handler tests with 100% coverage Tests: - TestHandler_GetCurrentUser: Success, invalid claims, user not found - TestHandler_GetCurrentUser_TimestampFormat: ISO 8601/RFC3339 validation - TestHandler_GetCurrentUser_DoesNotExposePassword: Security verification Security: - Password hash is never exposed in response - Only returns safe fields: username, name, created_at, updated_at 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…single-table-design
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DynamoDB Single Table Design Implementation
Summary
Implements a comprehensive DynamoDB single table design architecture for the GLAD project, establishing scalable data access patterns and repository infrastructure for user and skill management.
Key Changes
Architecture & Database Layer
UserRepositoryandSkillRepositoryinterfacescmd/app/internal/database/factory.go)New Entities
USER#<username>, SK:#METADATA#<username>)SKILL#<skill_name>, GSI1SK:LEVEL#<proficiency>#USER#<username>)API & Handler Improvements
user_handler.gowith 7 user-related endpointscmd/app/internal/dto/dto.go)Infrastructure
deployments/app/cdk.go)Documentation Added
Three comprehensive documentation files in
docs/:README-DYNAMODB-DESIGN.md- Overview and navigation guidedynamodb-single-table-design-plan.md(481 lines) - Complete implementation plan with:entity-addition-protocol.md(607 lines) - Step-by-step protocol for adding new entities:dynamodb-quick-reference.md(420 lines) - Developer cheat sheet with code snippets and common patternsTesting
cmd/app/internal/database/mock_test.go)This PR establishes the foundation for scalable DynamoDB usage and sets clear patterns for future entity additions.