An educational assignment management system that integrates with self-hosted Git platforms (Forgejo and GitLab) to provide GitHub Classroom-like functionality.
- Classroom Management - Create and manage coding classrooms tied to platform organizations/groups
- Assignment Distribution - Create assignments from template repositories with automatic repo provisioning
- Student Management - Manage student rosters and link to platform accounts
- Team Support - Individual and team-based assignments with size limits
- Submission Tracking - Automatic tracking when students accept assignments
- Deadline Enforcement - Configurable deadlines per assignment
- Multi-Platform - Supports both Forgejo and GitLab backends through a unified platform abstraction
- REST API - Complete REST API for all operations
Class Forge follows a layered architecture with clear separation of concerns:
API Handlers -> Service Layer -> Repository Layer -> PostgreSQL
|
Platform Provider (Forgejo / GitLab)
- API Server (
cmd/fgc-server/) - REST API with Gin framework - CLI Tool (
cmd/fgc/) - Command-line interface - Service Layer (
internal/service/) - Business logic and validation - Repository Layer (
internal/repository/) - Data access with raw SQL - Platform Abstraction (
internal/platform/) - Provider interface for Git platforms - Models (
internal/model/) - Domain objects
- Go 1.21+
- PostgreSQL 14+
- A Forgejo or GitLab instance with API access
git clone https://code.forgejo.org/forgejo/classroom.git
cd classroom
make buildCreate config.yaml:
server:
port: 8080
mode: release
platform:
type: forgejo # or "gitlab"
forgejo:
base_url: https://your-forgejo.example.com
token: your-api-token
database:
host: localhost
port: 5432
user: classforge
password: secret
name: classforge
ssl_mode: disableOr use environment variables with the FGC_ prefix (e.g., FGC_PLATFORM_TYPE=forgejo).
# Set up PostgreSQL database
createdb classforge
# Start the server (migrations run automatically)
./bin/fgc-servercurl http://localhost:8080/healthz
# {"status":"ok"}See the Getting Started Guide for a complete walkthrough.
- Getting Started - Installation, configuration, first classroom
- Configuration Reference - All config options and environment variables
- API Reference - Complete REST API documentation
- Technical Design - Architecture, schemas, and implementation strategy
class-forge/
cmd/
fgc/ CLI application
fgc-server/ API server
internal/
api/ HTTP handlers and routing
config/ Configuration loading
database/ Database connection and migrations
model/ Domain models
platform/ Git platform abstraction
forgejo/ Forgejo provider
gitlab/ GitLab provider
repository/ Data access layer (SQL)
service/ Business logic
util/ Shared utilities
migrations/ PostgreSQL migration files
docs/ User documentation
# All unit tests
make test
# Specific package
go test ./internal/service/... -v
# With coverage
go test ./... -covermake build- Build CLI and server binariesmake test- Run unit testsmake test-integration- Run integration tests (requires Docker)make lint- Run lintersmake clean- Remove build artifacts
[License TBD]