Skip to content

KMTStudioCom/KMT-Talks-Backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KMT Talks Backend

talks.kmt.studio is a headless Learning Management System (LMS) backend built with FastAPI, utilizing Supabase for database management and Cloudflare Stream for video content delivery.

Features

  • Authentication & Authorization

    • JWT-based authentication integrated with kmt.studio
    • Comprehensive permission management with roles and groups
    • Fine-grained access control for resources
  • Course Management

    • Course creation, retrieval, and updates
    • Video content management with Cloudflare Stream integration
    • Content status tracking and processing hooks
  • User Activity Tracking

    • Viewing history and progress tracking
    • Learning time analytics
    • User engagement metrics
  • Additional Features

    • Group management with role-based permissions
    • Media upload capabilities with Cloudflare R2
    • Redis caching for enhanced performance

Deployment

Docker

The project includes a Dockerfile for containerized deployment:

docker build -t talks-backend .
docker run -p 8080:8080 --env-file .env talks-backend

Development Environment

You'll need Poetry to manage dependencies for development:

  1. Install Poetry using pipx:
pipx install poetry
  1. Install Poetry dotenv plugin:
poetry self add poetry-dotenv-plugin
  1. Copy the environment template and configure your settings:
cp .env.example .env.dev
  1. Start the development server:
poetry run start

The API will be available at http://localhost:8080.

API Documentation

When running the server, API documentation is available at:

Project Structure

app/
├── endpoints/         # API routes organized by feature
│   ├── auth/          # Authentication endpoints
│   ├── courses/       # Course management
│   ├── groups/        # Group management
│   └── ...
├── utils/             # Utility functions and services
│   ├── cloudflare/    # Cloudflare integration
│   ├── permission/    # Permission handling
│   └── ...
└── main.py            # Application entry point

Development Status

The project is under active development. See the CHANGELOG.md for the latest updates.

Testing

Run tests using pytest:

poetry run pytest

About

KMT Talks 後端程式碼

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages