How congodevelopersclub/cdtm-api works
CDTM-API is a Laravel API for user authentication and professional profiles. The main workflow is LinkedIn sign-in, account creation or login, and one-time-code exchange for an API token; authenticated API clients can then browse or update profiles and their skills and projects. Separate endpoints manage categories, skills, and users. Profile updates are validated and delegated to a service that synchronizes related records. The graph follows the sampled controllers, services, models, and route references; unsampled endpoint behavior and persistence wiring are not expanded beyond what the evidence supports.
Main entry points: Profile.php Profile · api_v1.php API v1 routes · AuthService.php OAuth and tokens · ProfileController.php Profile endpoints
Components 25
API entry
- API v1 routes
routes/api_v1.php - Application setup
bootstrap/app.php
Authentication
- Auth endpoints
app/Http/Controllers/Api/V1/AuthController.php - OAuth and tokens
app/Services/AuthService.php - Welcome mail service
app/Services/MailService.php - Welcome email
app/Mail/WelcomeUserMail.php - Invalid code error
app/Exceptions/InvalidOAuthCodeException.php
Profile management
- Profile endpoints
app/Http/Controllers/Api/V1/ProfileController.php - Profile validation
app/Http/Requests/UpdateProfileRequest.php - Status validation
app/Http/Requests/ValidateProfileRequest.php - Profile updates
app/Services/ProfileService.php - Skill endpoints
app/Http/Controllers/Api/V1/SkillController.php - Skill response resource
app/Http/Resources/SkillListResource.php - Category endpoints
app/Http/Controllers/Api/V1/CategoryController.php - User endpoints
app/Http/Controllers/Api/V1/UserController.php
Domain data
- User account
app/Models/User.php - Profile
app/Models/Profile.php - Skill
app/Models/Skill.php - Profile skill link
app/Models/SkillProfile.php - Project
app/Models/Project.php - Category
app/Models/Category.php - Account status
app/Enums/ProfileAccountStatus.php
Other components
- API client
- LinkedIn OAuth
- Frontend callback
Connections 33
- API client → API v1 routes: calls API
routes/api_v1.php - API v1 routes → Auth endpoints: routes to
routes/api_v1.php - API v1 routes → Profile endpoints: routes to
routes/api_v1.php - API v1 routes → Skill endpoints: routes to
routes/api_v1.php - API v1 routes → Category endpoints: routes to
routes/api_v1.php - API v1 routes → User endpoints: routes to
routes/api_v1.php - Application setup → API v1 routes: loads routes
bootstrap/app.php - Application setup → Invalid code error: renders errors
bootstrap/app.php - Auth endpoints → OAuth and tokens: delegates auth
app/Http/Controllers/Api/V1/AuthController.php - OAuth and tokens → LinkedIn OAuth: authenticates with
app/Services/AuthService.php - Auth endpoints → Frontend callback: redirects callback
app/Http/Controllers/Api/V1/AuthController.php - OAuth and tokens → User account: creates and loads
app/Services/AuthService.php - OAuth and tokens → Welcome mail service: sends welcome mail
app/Services/AuthService.php - Welcome mail service → Welcome email: queues message
app/Services/MailService.php - OAuth and tokens → Invalid code error: throws invalid code
app/Services/AuthService.php - Auth endpoints → User account: uses account
app/Http/Controllers/Api/V1/AuthController.php - Profile endpoints → Profile updates: delegates updates
app/Http/Controllers/Api/V1/ProfileController.php - Profile endpoints → Profile validation: validates updates
app/Http/Controllers/Api/V1/ProfileController.php - Profile endpoints → Status validation: validates status
app/Http/Controllers/Api/V1/ProfileController.php - Profile endpoints → Profile: reads profiles
app/Http/Controllers/Api/V1/ProfileController.php - Profile updates → Profile: updates profile
app/Services/ProfileService.php - Profile updates → Skill: syncs skills
app/Services/ProfileService.php - Profile updates → Project: syncs projects
app/Services/ProfileService.php - Profile → Profile skill link: uses pivot
app/Models/Profile.php - Profile → Account status: casts status
app/Models/Profile.php - Profile → User account: belongs to
app/Models/Profile.php - Profile → Category: belongs to
app/Models/Profile.php - Profile → Project: has projects
app/Models/Profile.php - Profile → Skill: has skills
app/Models/Profile.php - Skill endpoints → Skill: uses skill data
app/Http/Controllers/Api/V1/SkillController.php - Skill endpoints → Skill response resource: formats response
app/Http/Controllers/Api/V1/SkillController.php - Category endpoints → Category: uses categories
app/Http/Controllers/Api/V1/CategoryController.php - User endpoints → User account: uses accounts
app/Http/Controllers/Api/V1/UserController.php