Skip to content

wintkhantlin/gencourse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

109 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GenCourse

AI‑powered course generation with a modern web UI, real‑time notifications, and a modular services architecture.

System Diagram

flowchart LR
  subgraph Browser
    A[Web UI\nVite/React] -- HTTP --> G[[Oathkeeper Gateway]]
    A -- WS --> NWS[(Notifier WS)]
  end

  G --> MS[Management Service\nNode TS • Hono • Drizzle]
  MS <--> PG[(PostgreSQL)]
  MS -- AMQP --> RMQ[(RabbitMQ)]

  subgraph Workers
    LW[LLM Worker\nPython] -- consumes --> Q1((course.create))
    LW -- produces --> Q2((course.created))
    LW -->|notifications| QN((notifications))
  end

  RMQ <-.-> Q1
  RMQ <-.-> Q2
  RMQ <-.-> QN

  Q2 --> MS
  QN --> NS[Notifier Service\nGo]
  NS -.-> NWS

  subgraph Auth
    K[Ory Kratos] -. session mgmt .-> G
  end
Loading

Services

  • Web UI (Vite + React)

    • Location: web-ui/
    • Dev: npm run dev (port 3030)
    • Env:
      • VITE_PUBLIC_MANAGEMENT_API_URL default http://localhost:4455/api/management
      • VITE_PUBLIC_NOTIFIER_WS_URL default ws://localhost:4455/api/notifier/ws
      • VITE_PUBLIC_ORY_KRATOS_URL default http://localhost:4433
  • Management Service (Node, TypeScript, Hono)

    • Location: services/management-service/
    • Dev: npm install && npm run dev (port 3000)
    • Build: npm run build; Start: npm start
    • DB: Postgres
    • Queues:
      • Publishes course.create
      • Consumes course.created and publishes notifications
    • Health: GET /health
  • Notifier Service (Go, WebSocket hub)

    • Location: services/notifier-service/
    • Env:
      • AMQP_URL (default amqp://guest:guest@localhost:5672)
      • NOTIFIER_QUEUE (default notifications)
      • HTTP_ADDR (default :8080)
      • WS_PATH (default /ws)
      • HEALTH_PATH (default /healthz)
    • Endpoints:
      • GET /ws (WebSocket)
      • GET /healthz
  • LLM Worker (Python)

    • Location: services/llm-worker/
    • Runs as a consumer for course.create, emits course.created, and may emit notifications.
    • Env:
      • AMQP_HOST, AMQP_PORT, AMQP_USER, AMQP_PASS
      • QUEUE_CREATE (default course.create)
      • QUEUE_CREATED (default course.created)
      • GENERATION_MAX_RETRIES, GENERATION_RETRY_DELAY_SECONDS
      • LLM_PROVIDER, LLM_BASE_URL for model selection
  • Gateway and Auth (Docker‑only in local dev)

    • Oathkeeper: public gateway at 4455 (admin 4456)
    • Kratos: public 4433 (admin 4434)

Project Structure

  • web-ui/ – React app
  • services/management-service/ – Course and lesson API
  • services/notifier-service/ – WebSocket notifications
  • services/llm-worker/ – Course generation worker
  • config/ – Gateway and auth configuration
  • docker-compose.yml – Local infra and services

Local Development

  1. Start backend stack
docker compose up -d

Components:

  • Postgres 5432
  • RabbitMQ 5672 (UI: 15672)
  • Kratos 4433/4434
  • Oathkeeper 4455/4456
  • Management, Notifier, LLM Worker
  1. Start Web UI
cd web-ui
npm install
npm run dev

Open http://localhost:3030

Endpoints

  • Gateway base: http://localhost:4455
    • Management API: /api/management
    • Notifier WS: /api/notifier/ws

Contributing

  • Follow UI_UX_ACCESSIBILITY.md.
  • Keep changes small and focused; add tests where feasible.

License

MIT

About

AI tool that generates structured, interactive courses with lessons and quizzes from simple prompts.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors