A self-hosted, single-tenant AI learning system that generates structured multi-lesson courses from user-defined topics using configurable LLM providers (Claude CLI, API, or local models). The system uses a bootstrap configuration flow and serves generated content as static HTML accessible from any device.
git clone https://github.com/alexunder18/learning-hub.git
cd learning-hub
docker compose up -dOpen http://localhost:8080 - the browser-based setup will guide you through provider configuration.
git clone https://github.com/alexunder18/learning-hub.git
cd learning-hub
python -m venv venv
.\venv\Scripts\activate
pip install -r requirements.txt
python server.py| Provider | Cost | Requirements |
|---|---|---|
| Claude Code CLI | Included in Max/Pro subscription | Claude Code installed locally |
| Anthropic API | Pay per token | API key |
| OpenAI API | Pay per token | API key |
| Ollama | Free | Ollama running locally |
See PROVIDERS.md for detailed configuration.
- Click + to create a new topic
- Chat with AI about what you want to learn
- Review and approve the proposed syllabus
- Lessons are generated automatically
- Access your lessons anytime on your home network
On first run, the browser-based setup page configures your config.json. You can also create it manually:
{
"mode": "cli",
"provider": "claude-code",
"model": "claude-opus-4-6",
"api_key": "",
"api_base": "",
"initial_lessons": 3,
"topics_dir": "./topics"
}| Field | Values | Description |
|---|---|---|
mode |
cli, api |
cli runs Claude Code CLI locally, api calls provider HTTP APIs |
provider |
claude-code, anthropic, openai, ollama |
Which AI service to use |
model |
any model ID | e.g. claude-opus-4-6, claude-sonnet-4-6, gpt-4o, llama3 |
api_key |
string | API key for Anthropic or OpenAI (not needed for CLI or Ollama) |
api_base |
URL | Custom API endpoint (only needed for Ollama, defaults to http://localhost:11434) |
initial_lessons |
number | How many lessons to generate when a new topic is created (default: 3) |
topics_dir |
path | Where topics are stored (default: ./topics) |
Claude Code CLI (requires local Claude Code installation + subscription):
{ "mode": "cli", "provider": "claude-code", "model": "claude-opus-4-6" }Anthropic API (requires API key):
{ "mode": "api", "provider": "anthropic", "model": "claude-sonnet-4-6", "api_key": "sk-ant-..." }OpenAI API (requires API key):
{ "mode": "api", "provider": "openai", "model": "gpt-4o", "api_key": "sk-..." }Ollama (free, local, no account needed):
{ "mode": "api", "provider": "ollama", "model": "llama3", "api_base": "http://localhost:11434" }# Uncomment the ollama service in docker-compose.yml, then:
docker compose up -d
docker compose exec ollama ollama pull llama3Configure the setup page with provider "Ollama" and model "llama3".
├── server.py # Flask application
├── config.json # AI provider config (created on setup)
├── topics/ # Generated content (persisted)
├── templates/ # Jinja2 templates
├── static/ # CSS, JS
├── Dockerfile
└── docker-compose.yml


