Course Service
Repo: o-apps/course-service · Port: 8088
The platform's LMS backend: courses, learning paths, certificates, and enrollments.
Key Capabilities
- Courses — full CRUD
- Learning paths — full CRUD (a learning path is a curated sequence of courses)
- Certificates — issue and retrieve certificates, verify a certificate by credential ID, download, and browse available templates
- Enrollments — enroll a user in a course, list a user's enrollments
Auth
Requires a valid JWT on every route (via pkg/authmiddleware) — only /health and swagger docs are public. Not currently called by the frontend (no app/api proxy route references it), so there's no live integration to break by this being gated.
REST API
| Method | Path | Description |
|---|---|---|
GET | POST | /courses | List / create courses |
GET | PUT | DELETE | /courses/{courseId} | Get / update / delete a course |
GET | POST | /learning-paths | List / create learning paths |
GET | PUT | DELETE | /learning-paths/{pathId} | Get / update / delete a learning path |
GET | /certificates/templates | Available certificate templates |
GET | /certificates/verify/{credentialId} | Verify a certificate |
POST | /certificates/generate | Generate a certificate |
GET | /certificates | List the caller's certificates |
GET | DELETE | /certificates/{id} | Get / delete a certificate |
GET | /certificates/{id}/download | Download a certificate |
POST | /courses/{courseId}/enroll | Enroll in a course |
GET | /users/{userId}/enrollments | List a user's enrollments |
GET | /health | Health check |
Environment Variables
| Variable | Description |
|---|---|
DATABASE_URL | PostgreSQL connection — required, no fallback |
AUTH_JWT_ACCESS_SECRET | Shared JWT signing secret |
COURSE_SERVICE_ADDR / HTTP_PORT | HTTP bind address / port (default: :8088) |