Skip to content

feat: add user profile page and improve Swagger API documentation#1

Open
amormousa wants to merge 3 commits into
Majoramari:mainfrom
amormousa:main
Open

feat: add user profile page and improve Swagger API documentation#1
amormousa wants to merge 3 commits into
Majoramari:mainfrom
amormousa:main

Conversation

@amormousa

Copy link
Copy Markdown
Collaborator

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

  • New Endpoint Added:
    • GET /api/profile: Secure route protected by BearerAuth that fetches the full developer profile payload.
  • Swagger Documentation (swagger.json):
    • Updated the paths to officially document the profile route, including its expected parameters and 200/401 responses.
  • Exposed Data Models:
    • 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

  • Validated swagger.json compliance against the Swagger 2.0/OpenAPI standard.
  • Verified response schemas align perfectly with Angular service integration requirements.

@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown

@amormousa is attempting to deploy a commit to the Majoramari Team on Vercel.

A member of the Team first needs to authorize it.

amormousa added 2 commits July 7, 2026 23:34
- 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant