How codelitdev/courselit works
CourseLit is a multi-tenant learning-commerce platform: creators build and manage course products and sales pages, while learners discover, purchase, and consume them. The repository also includes a background service for mail and notifications, plus a separate documentation app. The README establishes the main product capabilities; sampled route and worker code supports only some internal connections, so other relationships are shown as unverified rather than assumed.
Main entry points: products/page.tsx Product Browse · routes.ts Job Routes · checkout/page.tsx Checkout · new-mail-page-client.tsx Mail Authoring
Components 24
Learner Experience
- Course Learning
apps/web/app/(with-contexts)/course/[slug]/[id]/page.tsx - Communities
apps/web/app/(with-contexts)/(with-layout)/communities/page.tsx - Product Browse
apps/web/app/(with-contexts)/(with-layout)/products/page.tsx - Checkout
apps/web/app/(with-contexts)/(with-layout)/checkout/page.tsx
Creator Tools
- Page Builder
apps/web/components/admin/page-editor/index.tsx - Course Authoring
apps/web/app/(with-contexts)/dashboard/(sidebar)/product/[id]/content/page.tsx - Student Management
apps/web/app/(with-contexts)/dashboard/(sidebar)/users/page.tsx - Mail Authoring
apps/web/app/(with-contexts)/dashboard/(sidebar)/mails/new/new-mail-page-client.tsx - Email Preview
apps/web/app/(with-contexts)/dashboard/(sidebar)/mails/new/template-email-preview.tsx
Commerce Platform
- Product API
apps/web/app/api/products/route.ts - Payment Initiation
apps/web/app/api/payment/initiate/route.ts - User API
apps/web/app/api/user/route.ts - Domain Resolution
apps/web/app/verify-domain/route.ts
Messaging Service
- Job Routes
apps/queue/src/job/routes.ts - Mail Queue
apps/queue/src/domain/handler.ts - Mail Worker
apps/queue/src/domain/worker.ts - Mail Delivery
apps/queue/src/mail.ts - Notification Enqueue
apps/queue/src/notifications/services/enqueue.ts - App Notifications
apps/queue/src/notifications/services/channels/app.ts - Notification Events
apps/queue/src/notifications/utils/emitter.ts - Notification Stream
apps/queue/src/sse/routes.ts
Documentation
- Docs Site
apps/docs-new/app/(home)/[[...slug]]/page.tsx
Other components
- Learner
- Creator
Connections 19
- Learner → Product Browse: browses
- Product Browse → Product API: loads products
- Product API → Product Browse: returns products
- Learner → Checkout: purchases
- Checkout → Payment Initiation: initiates payment
- Learner → Course Learning: takes courses
- Learner → Communities: joins communities
- Creator → Page Builder: builds pages
- Creator → Course Authoring: authors courses
- Creator → Student Management: manages students
- Creator → Mail Authoring: creates mail
- Mail Authoring → Email Preview: renders preview
apps/web/app/(with-contexts)/dashboard/(sidebar)/mails/new/new-mail-page-client.tsx - User API → User API: validates key
apps/web/app/api/user/route.ts - Domain Resolution → Domain Resolution: resolves host
apps/web/app/verify-domain/route.ts - Job Routes → Mail Queue: enqueues mail
apps/queue/src/job/routes.ts - Mail Worker → Mail Delivery: sends mail
apps/queue/src/domain/worker.ts - Job Routes → Notification Enqueue: enqueues notifications
apps/queue/src/job/routes.ts - App Notifications → Notification Enqueue: enqueues notification
apps/queue/src/notifications/services/channels/app.ts - Notification Stream → Notification Events: listens for events
apps/queue/src/sse/routes.ts