YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

HMI - Learning Management System

Full-stack learning management system with FastAPI backend and Next.js frontend.

Project Structure

hmi/
β”œβ”€β”€ backend/          # FastAPI Python backend
β”œβ”€β”€ frontend/         # Next.js React frontend
└── .venv/           # Shared Python virtual environment

Quick Start

Prerequisites

  • Python 3.11+
  • Node.js 18+
  • MySQL 8.0+
  • Redis 6.0+

1. Setup Backend

# Install Python dependencies (venv already exists at root)
source .venv/bin/activate
pip install -r backend/requirements.txt

# Configure environment
cd backend
cp .env.example .env
# Edit .env with your database credentials

# Run backend
uvicorn app.main:app --reload --port 8000

Backend will run on http://localhost:8000

2. Setup Frontend

cd frontend
npm install
npm run dev

Frontend will run on http://localhost:3000

Features

Backend (FastAPI)

  • βœ… JWT Authentication with OAuth2
  • βœ… Role-based access control (Teacher/Learner)
  • βœ… RESTful API with async SQLModel ORM
  • βœ… MySQL database with async driver
  • βœ… Redis integration
  • βœ… Complete learning management schema

Database Schema

  • Users: Teachers and Learners
  • Courses: Created by teachers
  • Topics: Lesson categorization
  • Lessons: Course content with tutorial URLs
  • Enrollments: Learner course registration
  • Lesson Progress: Track completed lessons

Frontend (Next.js)

  • βš›οΈ React 19 with Next.js 16
  • 🎨 Tailwind CSS 4
  • πŸ“± Responsive design
  • πŸ” Authentication integration (to be implemented)

API Endpoints

See backend/README.md for complete API documentation.

Main Routes

  • /api/v1/login/access-token - Authentication
  • /api/v1/users/ - User management
  • /api/v1/courses/ - Course CRUD
  • /api/v1/lessons/ - Lesson management
  • /api/v1/topics/ - Topic management
  • /api/v1/enrollments/ - Course enrollment & progress

Development

Backend Development

cd backend
source ../.venv/bin/activate

# Run with hot reload
uvicorn app.main:app --reload

# Run tests (when implemented)
pytest

Frontend Development

cd frontend

# Development server
npm run dev

# Build for production
npm run build

# Lint code
npm run lint

Database Setup

-- Create database
CREATE DATABASE appdb;

-- Tables are auto-created by SQLModel on startup

For production, use migrations:

cd backend
pip install alembic
alembic init migrations
alembic revision --autogenerate -m "Initial migration"
alembic upgrade head

Environment Variables

Backend (.env)

DATABASE_URL=mysql+asyncmy://user:password@127.0.0.1:3306/appdb
REDIS_URL=redis://127.0.0.1:6379/0
SECRET_KEY=your-secret-key-change-in-production

Frontend (.env.local)

NEXT_PUBLIC_API_URL=http://localhost:8000

Docker Deployment (Coming Soon)

docker-compose up

Tech Stack

Backend:

  • FastAPI
  • SQLModel + SQLAlchemy (async)
  • MySQL (asyncmy driver)
  • Redis
  • Python-JOSE (JWT)
  • Pydantic validation

Frontend:

  • Next.js 16
  • React 19
  • Tailwind CSS 4
  • TypeScript

License

MIT

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support