feat: add user profile page and improve Swagger API documentation#1
Open
amormousa wants to merge 3 commits into
Open
feat: add user profile page and improve Swagger API documentation#1amormousa wants to merge 3 commits into
amormousa wants to merge 3 commits into
Conversation
|
@amormousa is attempting to deploy a commit to the Majoramari Team on Vercel. A member of the Team first needs to authorize it. |
- Add UpdateProfileStats to upsert cached aggregate stats after session processing - Add GetProfileStats model function for reading cached profile stats - Add RevokeAllUserRefreshTokens and CleanupExpiredRefreshTokens for token management - Add POST /api/auth/logout endpoint to revoke refresh token and clear cookie - Add periodic cleanup of expired refresh tokens on token refresh - Populate user_profile_stats table from session processor background job - Extend User model with all profile fields from migrations
This reverts commit 670b0eb.
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.
Description
This PR introduces the core user profile system by adding the full profile endpoint (
/api/profile) to aggregate developer tracking data, activity history, and bio details. Additionally, the Swagger specification (swagger.json) has been successfully updated/regenerated to reflect the new endpoints and underlying database models for frontend consumption.Key Changes
GET /api/profile: Secure route protected byBearerAuththat fetches the full developer profile payload.swagger.json):200/401responses.models.ProfileResponse: The primary response structure containing aggregated metadata.models.HeatmapCell: 365-day granular bucket tracking for GitHub-like grid visualization.models.ProfileMetric: Key performance and connection indicators.models.ProfileInfoField: Dynamic evaluation for profile setup completion percentage.models.Achievement&models.ActivityLogItem: Tracking blocks for developer badges and recent audit logs.Testing & Verification
swagger.jsoncompliance against the Swagger 2.0/OpenAPI standard.