Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
433636b
docs: real IT Training System README with stack details
J1-bot Jun 21, 2026
3819028
Bump python-multipart from 0.0.14 to 0.0.31
dependabot[bot] Jul 2, 2026
fb9a715
Bump python-dotenv from 1.0.1 to 1.2.2
dependabot[bot] Jul 2, 2026
ab35102
docs: comprehensive README with training platform features, architect…
villon Jul 4, 2026
679e808
Apply ruff auto-fixes and portfolio standardization
Jul 4, 2026
b2407d0
fix(audit): add standard project files
OneByJorah Jul 6, 2026
8a15bd2
chore(release): v1.0.0 — containerization and documentation
Jul 7, 2026
fe3fc46
docs: add screenshot placeholder to README
Jul 7, 2026
21cee2d
fix(api): add missing SQLAlchemy ORM models and database initialization
Jul 6, 2026
a70780d
fix(api): add missing imports and fix model references in routes
Jul 6, 2026
79d66e3
fix(docker): remove redundant pip install layers in Dockerfile
Jul 6, 2026
74b4e9a
fix(compose): add health checks, restrict port exposure, require cred…
Jul 6, 2026
22ae0a9
fix(security): add credential warnings to compose.env.example
Jul 6, 2026
def9023
fix(docs): correct README database badge, tech stack, and architectur…
Jul 6, 2026
f510cf8
fix(docker): add non-root user and .dockerignore
Jul 6, 2026
a0bb036
fix(api): add security headers middleware and CORS configuration
Jul 6, 2026
0ee63df
fix(ci): add reports/ to .gitignore and create j1.yaml
Jul 6, 2026
85f74b2
Rename it-training-system to LearnForge
Jul 7, 2026
1faa23c
fix: remove ollama pull from onboarding bootstrap script
Jul 7, 2026
6ac7f39
chore: rebrand to LearnForge
Jul 8, 2026
163838c
fix: Dockerfile stage-2 COPY requirements.txt -> api/requirements.txt…
Jul 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.git
.gitignore
.env
__pycache__/
*.pyc
node_modules/
.idea/
.vscode/
.DS_Store
*.log
Dockerfile
docker-compose*
README.md
AUDIT_REPORT.md
18 changes: 18 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# it-training-system — Environment Configuration
# Copy this file to .env and fill in your values.

# ── MinIO (Object Storage) ─────────────────────────────────
MINIO_ROOT_USER=admin
MINIO_ROOT_PASSWORD=change_me_minio_password

# ── Ollama ─────────────────────────────────────────────────
OLLAMA_ORIGINS=*

# ── Training API ───────────────────────────────────────────
DATABASE_URL=sqlite:///./app.db
SECRET_KEY=change_me_generate_random_secret
TELEGRAM_BOT_TOKEN=change_me_telegram_bot_token
TELEGRAM_ADMIN_CHAT_ID=change_me_admin_chat_id

# ── Logging ────────────────────────────────────────────────
LOG_LEVEL=INFO
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @OneByJorah
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
.env
.git
.github
.mypy_cache
__pycache__
*.mp4
*.mov
*.avi
*.mkv
*.webm

reports/
5 changes: 5 additions & 0 deletions AUDIT_REPORT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# AUDIT_REPORT - LearnForge
**Date:** 2026-07-05
**Score:** 68/100 - DEGRADED
- Full-stack training platform
- Missing: j1.yaml, .dockerignore, CODEOWNERS, CHANGELOG
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Changelog
## [1.0.0] - 2026-07-07
### Added
- Initial release
- Dockerfile with multi-stage build
- .env.example with placeholder values
48 changes: 48 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment:

- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes
- Focusing on what is best not just for us as individuals, but for the overall
community

Examples of unacceptable behavior:

- The use of sexualized language or imagery, and sexual attention or advances
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the project team at security@jorahone.com. All complaints will
be reviewed and investigated and will result in a response that is deemed
necessary and appropriate to the circumstances.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.

[homepage]: https://www.contributor-covenant.org
57 changes: 57 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Contributing to JorahOne Projects

First off, thank you for considering contributing! It's people like you that make
this community great.

## Code of Conduct

This project and everyone participating in it is governed by our Code of Conduct.
By participating, you are expected to uphold this code.

## How Can I Contribute?

### Reporting Bugs

- **Ensure the bug was not already reported** by searching GitHub Issues.
- If you're unable to find an open issue addressing the problem, open a new one.
- Include a **clear title and description**, as much relevant information as possible,
and a **code sample** or **executable test case** demonstrating the expected behavior.

### Suggesting Enhancements

- Open a new GitHub Issue with the enhancement tag.
- Provide a clear explanation of why this enhancement would be useful.

### Pull Requests

1. Fork the repository
2. Create a feature branch: `git checkout -b feature/my-feature`
3. Commit your changes: `git commit -am 'Add my feature'`
4. Push to the branch: `git push origin feature/my-feature`
5. Open a Pull Request

### Styleguides

#### Git Commit Messages

- Use the present tense ("Add feature" not "Added feature")
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
- Limit the first line to 72 characters or less
- Reference issues and pull requests liberally after the first line

#### Code Style

Follow the existing code style in the project. When in doubt, match the
surrounding code. Consistency is key.

## Additional Notes

### Issue and Pull Request Labels

| Label | Description |
|-------|-------------|
| `bug` | Something isn't working |
| `enhancement` | New feature or improvement |
| `documentation` | Documentation only changes |
| `security` | Security-related issues |
| `good first issue` | Good for newcomers |
36 changes: 36 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# ── Stage 1: Build ──────────────────────────────────────────
FROM python:3.11-slim AS builder

WORKDIR /build
COPY api/requirements.txt .
RUN pip install --no-cache-dir --user -r requirements.txt

# ── Stage 2: Runtime ───────────────────────────────────────
FROM python:3.11-slim

ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1

WORKDIR /app

# System deps
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
&& rm -rf /var/lib/apt/lists/*

# Copy Python deps from builder
COPY --from=builder /root/.local /root/.local
ENV PATH=/root/.local/bin:$PATH

# App code
COPY api/ api/
COPY api/requirements.txt .

# Healthcheck
HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \
CMD curl -sf http://localhost:8080/health || exit 1

EXPOSE 8080

CMD ["python3", "api/app.py"]
7 changes: 7 additions & 0 deletions FIXES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# LearnForge — Fixes and Enhancements

## Changes Made

### Containerization
- **Added Dockerfile** — Multi-stage build for production deployment
- **Added .env.example** — Environment variable template with placeholder values
176 changes: 176 additions & 0 deletions INTENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
# INTENT.md — J1-PIPELINE Phase -1 (ORACLE)

**Repository:** `OneByJorah/LearnForge`
**Analysis Date:** 2026-07-05
**Analyst:** J1-PIPELINE ORACLE (read-only)
**Status:** Intent Reconstructed

---

## What This System Does

**LearnForge** (formerly IT Training System) is a self-hosted IT training management platform. It provides structured learning paths, automated AI-generated quizzes, progress tracking, and video ingestion — all running locally via Docker Compose with no external SaaS dependencies.

### Service Table

| Service | Role | Port | Technology |
|---------|------|------|------------|
| `training-api` | FastAPI backend — REST API for users, videos, quizzes, learning paths, events, Telegram webhook | `8080` | Python, FastAPI, SQLAlchemy |
| `ollama` | Local LLM inference — quiz generation, summarization, semantic Q&A | `11434` | Ollama (llama3) |
| `qdrant` | Vector store — semantic search over training content | `6333` | Qdrant |
| `minio` | S3-compatible object storage — training video/media files | `9000` (API), `9001` (Console) | MinIO |

### Operational Role

The system is consumed by:
- **Trainees** — access learning paths, watch videos, take quizzes, track progress
- **Managers** — view team overview dashboards, monitor completion rates and scores
- **Telegram Bot users** — interact via `/my_training`, `/next_lesson`, `/quiz`, `/ask`, `/team_progress` commands
- **Hermes Agent** — orchestrates training workflows via 6 skill definitions (ingestion, quiz generation, learning path engine, progress tracking, content creation, Telegram bot)

---

## Why This Was Built

### Real Problem

Organizations need to deliver IT training to their teams — onboarding new engineers, upskilling existing staff, maintaining compliance knowledge. Commercial training platforms (Docebo, TalentLMS, LearnUpon, 360Learning) are expensive on a per-seat basis, require data to leave the organization's infrastructure, and offer limited customization for AI-powered features like auto-generated quizzes from internal training videos.

### Why Existing Tools Were Insufficient

- **SaaS training platforms** (Docebo, TalentLMS, Cornerstone) — per-seat licensing costs scale poorly for growing teams; data residency and privacy concerns for sensitive internal training content; limited API surface for custom automation.
- **LMS-only solutions** (Moodle, Canvas) — heavy, PHP-based, require significant administration; no native AI/LLM integration for auto-quiz generation or semantic search over video content.
- **Video platforms** (YouTube, Vimeo) — no structured learning paths, no progress tracking, no quiz capabilities.
- **Manual training** — no scalability, no audit trail, no standardized assessment.

### What Triggered Development

The initial commit (`a075316` — "Initial training system design") created the core schema, Docker Compose stack, and FastAPI skeleton. Development was triggered by the need for a lightweight, self-hosted training platform that could:
1. Ingest internal training videos and auto-transcribe them (via Whisper/Ollama)
2. Generate quizzes automatically from video transcripts
3. Track individual and team progress
4. Integrate with Telegram for notifications and interaction
5. Be orchestrated by Hermes Agent for automated workflows

The repo was built as part of the **JorahOne LLC** ecosystem, where Hermes Agent (the organization's AI agent platform) needed a training management subsystem to onboard and upskill team members.

### Ecosystem Fit

```
JorahOne / OneByJorah Ecosystem
├── Hermes Agent OS — AI agent orchestration platform
├── LearnForge — Training management (this repo)
│ ├── Hermes Skills (6) — Workflow automation for training pipeline
│ ├── FastAPI Backend — REST API
│ ├── Ollama — Local LLM inference
│ ├── Qdrant — Vector search
│ └── MinIO — Media storage
├── Other JorahOne repos — Broader infrastructure
```

The 6 Hermes skills (`training-ingestion`, `quiz-generator`, `learning-path-engine`, `progress-tracker`, `content-creator`, `telegram-training-bot`) define the automated workflows that Hermes Agent executes against this system. The `ops/hermes-wiring.md` file explicitly documents the integration points.

---

## Operational Classification

**Classification: PROTOTYPE / BETA**

Evidence:
- **Version**: `0.2.0` (declared in `api/app.py` — pre-1.0, early stage)
- **CI/CD**: Single GitHub Actions workflow that only lints the Docker Compose file — no test execution, no deployment pipeline, no security scanning
- **Health checks**: No health checks defined in `docker-compose.yml` (no `healthcheck` stanza on any service)
- **Database**: Defaults to SQLite (`sqlite:///./app.db`) — Postgres mentioned as future upgrade path but not configured
- **Documentation**: Several docs are placeholder/stub content (`docs/overview.md`, `docs/setup.md`, `docs/observability.md`, `docs/composer-cli.md` contain incomplete or garbled text)
- **AGENTS.md**: Contains only a garbled 2-line fragment — not a real agent configuration
- **Monitoring**: No observability stack (no Prometheus, Grafana, logging aggregator)
- **Backup**: No backup strategy documented
- **Secrets**: Default credentials in `.env.example` (`changeme`, `admin`/`changeme` for MinIO)
- **Security**: `SECURITY.md` exists with reporting policy, but no secrets scanning, no SBOM, no dependency auditing in CI
- **Community readiness**: `CODE_OF_CONDUCT.md`, `CONTRIBUTING.md`, `LICENSE` (MIT) all present — signals intent for open collaboration
- **Deployment**: Single-host Docker Compose only — no Kubernetes manifests, no multi-region, no HA

---

## Key Architectural Decisions

1. **Docker Compose single-host deployment** — Simplest operational model for a small team. No Kubernetes overhead. Trade-off: no horizontal scaling, no built-in HA.

2. **SQLite default with Postgres upgrade path** — Zero-config startup for evaluation/development. Postgres recommended for production but not enforced. The schema (`db/schema.sql`) is SQLite-compatible (no Postgres-specific features).

3. **Local-first AI via Ollama** — All LLM inference runs locally (llama3 model). No API keys, no data sent to third parties, no per-token costs. Trade-off: requires GPU or sufficient CPU/RAM.

4. **Telegram as the notification/chat interface** — Ubiquitous, free, mobile-friendly. Webhook-based integration. No need to build a custom mobile app.

5. **Hermes Agent skills for workflow automation** — The 6 skills define the training pipeline as composable, agent-executable workflows. This is the primary integration point with the broader JorahOne ecosystem.

6. **Qdrant for semantic search** — Lightweight, Docker-native vector database. Enables semantic search over training content (transcripts, lessons) without a heavy Elasticsearch stack.

7. **MinIO for video storage** — S3-compatible API means the storage layer can be swapped for AWS S3, GCS, or any S3-compatible backend without code changes.

8. **FastAPI with SQLAlchemy** — Modern async Python stack. Auto-generated OpenAPI docs at `/docs`. SQLAlchemy provides ORM flexibility across SQLite/Postgres.

---

## Repository Structure

```
LearnForge/
├── api/ # FastAPI backend
│ ├── app.py # App entry point (v0.2.0)
│ ├── Dockerfile # Python 3.11-slim container
│ ├── requirements.txt # Python dependencies
│ ├── routes/
│ │ └── training.py # All REST endpoints (users, videos, quizzes, paths, events)
│ └── bots/
│ └── telegram.py # Telegram webhook handler
├── db/
│ └── schema.sql # SQLite schema (10 tables)
├── docs/ # Documentation (several stubs)
│ ├── overview.md # Stub — 2 lines
│ ├── setup.md # Stub — 2 lines
│ ├── deploy.md # Production setup guide (complete)
│ ├── observability.md # Stub — garbled
│ ├── composer-cli.md # Stub — garbled
│ ├── skill-authors.md # Partial — skill authoring reference
│ └── reference.md # Pipeline config reference
├── ops/ # Operations
│ ├── roadmap.md # 4-week deployment roadmap
│ └── hermes-wiring.md # Hermes Agent integration guide
├── scripts/ # Utility scripts
│ ├── bootstrap.sh # First-run setup (env + compose up + ollama pull)
│ └── test_api.sh # Smoke test (health, create user, upload video)
├── skills/ # Hermes Agent skill definitions (6 skills)
│ ├── training-ingestion/
│ ├── quiz-generator/
│ ├── learning-path-engine/
│ ├── progress-tracker/
│ ├── content-creator/
│ └── telegram-training-bot/
├── .github/workflows/
│ └── ci.yml # CI — compose lint only
├── docker-compose.yml # 4 services + 4 volumes
├── compose.env.example # Environment variable template
├── Makefile # Build automation (bootstrap, up, down, test, deploy, clean)
├── AGENTS.md # Stub — garbled 2 lines
├── README.md # Primary documentation
├── LICENSE # MIT
├── CODE_OF_CONDUCT.md # Contributor Covenant v2.1
├── CONTRIBUTING.md # Contribution guide
├── SECURITY.md # Security policy (90-day disclosure)
└── .gitignore # Ignores .env, media files, cache
```

---

## Notes

- **AGENTS.md is a stub** — Contains only garbled text ("Postgres/OVitalfilesystem -- flagged Hermes Hermes."). This file should either be removed or populated with actual agent configuration.
- **Several docs are stubs** — `docs/overview.md`, `docs/setup.md`, `docs/observability.md`, `docs/composer-cli.md` contain incomplete or garbled placeholder text. Only `docs/deploy.md` and `ops/` files are substantive.
- **No model definitions file** — The `api/app.py` imports model classes (`LearningPath`, `User`, `Video`, `Quiz`, etc.) but these are not defined in the current codebase. They likely live in a missing `models.py` or are generated by SQLAlchemy from the schema. This is a gap — the app would fail to import as-is.
- **CI is minimal** — Only validates Docker Compose syntax. No unit tests, no integration tests, no security scanning, no build verification.
- **No health checks in compose** — Services have `restart: unless-stopped` but no `healthcheck` stanza. Docker has no way to know if the API is actually responding.
- **Default SQLite** — The schema uses SQLite syntax (`INTEGER PRIMARY KEY AUTOINCREMENT`). Switching to Postgres would require schema changes.
- **Git history** — 14 commits. Initial commit created the skeleton. Subsequent commits added routes, skills, docs, and README polish. Recent commits include dependency bumps and a security audit (email sanitization). No branches other than `master`.
- **No test framework** — Only a shell script smoke test (`scripts/test_api.sh`). No pytest, no unit tests, no integration tests.
- **Repo renamed to LearnForge** — Formerly `it-training-system`. All references updated.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.PHONY: help bootstrap up down restart logs test shell deploy clean
SHELL := /bin/bash
COMPOSE := docker compose
PROJECT := it-training-system
PROJECT := LearnForge

help:
@echo "Commands: bootstrap, up, down, restart, logs, test, deploy, clean"
Expand Down
Loading