How creatly/creatly-backend works
Creatly is a multi-tenant learning-management backend. Its principal workflow serves learner and administrator API requests, applies service-layer operations, and persists or retrieves school, course, learning, and commerce data. The tree and sampled wiring support the HTTP-to-service-to-repository structure, as well as configured payment, email, file-storage, and DNS integrations. Individual route and service implementations were not sampled, so finer-grained call relationships are intentionally omitted.
Main entry points: service.go Service registry · app.go Application wiring · handler.go API routing · server.go HTTP server
Components 23
HTTP API
- HTTP server
internal/server/server.go - API routing
internal/delivery/http/v1/handler.go - Admin endpoints
internal/delivery/http/v1/admins.go - Student endpoints
internal/delivery/http/v1/students.go - Course endpoints
internal/delivery/http/v1/courses.go - Payment callbacks
internal/delivery/http/v1/payment.go - Application wiring
internal/app/app.go
Learning Platform
- Service registry
internal/service/service.go - Users and students
internal/service/students.go - Schools and settings
internal/service/schools.go - Courses and lessons
internal/service/courses.go - Modules and packages
internal/service/modules.go - Surveys and progress
internal/service/surveys.go - File uploads
internal/service/files.go
Commerce
- Offers and codes
internal/service/offers.go - Orders and payments
internal/service/orders.go
Persistence and Integrations
- Domain repositories
internal/repository - MongoDB
pkg/database/mongodb/mongodb.go - Fondy gateway
pkg/payment/fondy/fondy.go - Object storage
pkg/storage/storage.go - SMTP email
pkg/email/smtp/smtp.go - Cloudflare DNS
pkg/dns/dns.go
Other components
- API client
Connections 27
- API client → HTTP server: sends requests
- Application wiring → HTTP server: starts server
- HTTP server → API routing: dispatches
- API routing → Admin endpoints: routes requests
- API routing → Student endpoints: routes requests
- API routing → Course endpoints: routes requests
- API routing → Payment callbacks: routes callbacks
- Application wiring → Service registry: constructs
- API routing → Service registry: handles through
- Service registry → Users and students: wires services
- Service registry → Schools and settings: wires services
- Service registry → Courses and lessons: wires services
- Service registry → Modules and packages: wires services
- Service registry → Surveys and progress: wires services
- Service registry → File uploads: wires services
- Service registry → Offers and codes: wires services
- Service registry → Orders and payments: wires services
- Application wiring → Domain repositories: constructs
- Service registry → Domain repositories: uses repositories
- Application wiring → MongoDB: connects
- Domain repositories → MongoDB: persists data
- Application wiring → Object storage: configures
- File uploads → Object storage: uploads files
- Application wiring → SMTP email: configures
- Application wiring → Cloudflare DNS: configures
- Application wiring → Fondy gateway: configures provider
- Orders and payments → Fondy gateway: uses gateway