Skip to content
konnn04Public

About

The online examination platform includes proctoring: remote recording from the test machine, camera/screen streaming via WebRTC (LiveKit), egress recording, AI-powered violation detection, evidence storage (clips/snapshots), and support for playback monitoring — all within the architecture's microservices.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

12 Commits

Folders and files

Repository files navigation

Foxy Exam — Online Proctored Examination Platform

Laravel React Electron LiveKit Python Go Docker

Nền tảng thi trực tuyến có giám sát (proctoring) bao gồm: thu telemetry từ máy thí sinh, phát luồng camera/màn hình qua WebRTC (LiveKit), ghi hình egress, phát hiện vi phạm bằng AI, lưu bằng chứng (clip/snapshot), hỗ trợ giám thị xem lại — tất cả trong kiến trúc microservices.

Visuals

(TBD: Thêm ảnh chụp màn hình Dashboard giám thị hoặc luồng LiveKit tại đây)

Description

Repository sử dụng Git Submodules. Mỗi service có repo riêng tương ứng với kiến trúc Microservices của hệ thống:

Service Directory Tech Stack Port Description
exam-sys exam-sys/ Laravel 12, PHP 8.2+, Inertia/React, PostgreSQL, Redis 8090, 8091 Backend chính: API, Admin/Teacher dashboard, WebSocket (Reverb), Queue workers, LiveKit webhook
exam-client exam-client/ Electron 35, React 19, Vite, TypeScript — Desktop client cho thí sinh: làm bài, lockdown, telemetry, LiveKit publisher
face-services face-services/ Python 3.11, FastAPI, InsightFace, ONNX GPU 8095 Đăng ký & xác thực khuôn mặt sinh viên
object-service object-service/ Python 3.11, FastAPI, YOLO 26, PyTorch CUDA 8096 Phát hiện vật cấm qua camera (điện thoại, sách, laptop...)
supervisor-agent supervisor-agent/ Python 3.11, LiveKit Agents SDK host network Bot server-side giám sát realtime camera thí sinh
media-encoder-service media-encoder-service/ Go 1.22+, Gin, FFmpeg 8097 Ghép video (stitch), cắt clip vi phạm, trích snapshot

Architecture

┌─────────────────────────────────────────────────────────────────┐
│                        Foxy Exam Platform                       │
├──────────────┬──────────────┬───────────────┬───────────────────┤
│  exam-client │   exam-sys   │  LiveKit SFU  │  AI & Workers     │
│  (Electron)  │  (Laravel)   │  (WebRTC)     │                   │
│              │              │               │  supervisor-agent  │
│  React/Vite  │  Inertia     │  7880 HTTP    │  (Python bot)     │
│  TypeScript  │  React       │  7881 TCP     │                   │
│  MediaPipe   │  REST API    │  7882 UDP     │  face-services    │
│  Lockdown    │  WebSocket   │  Egress       │  (FastAPI :8095)  │
│              │  Queue Jobs  │               │                   │
│              │  :8090 API   │               │  object-service   │
│              │  :8091 WSS   │               │  (FastAPI :8096)  │
│              │              │               │                   │
│              │              │               │  media-encoder    │
│              │              │               │  (Go+FFmpeg :8097)│
└──────────────┴──────────────┴───────────────┴───────────────────┘

Installation

Prerequisites

Yêu cầu Version
PHP 8.2+
Composer 2.x
Node.js 18+ (khuyến nghị 20+)
pnpm 9+
Docker & Docker Compose Latest
PostgreSQL 15+
Redis 7+
FFmpeg 6+ (cho media-encoder local)
Python 3.11+ (cho AI services)
NVIDIA GPU nvidia-container-toolkit (cho Docker GPU)

1. Clone with submodules

git clone --recursive git@github.com:konnn04/foxy-exam.git
cd foxy-exam

# If already cloned without --recursive:
git submodule update --init --recursive

2. Start infrastructure (Docker)

# Face verification service (GPU)
cd face-services && cp .env.example .env && docker compose up -d

# Object detection service (GPU)
cd ../object-service && cp .env.example .env && docker compose up -d

# LiveKit + Redis + Egress + Supervisor Agent
cd ../exam-sys && docker compose -f docker-compose.livekit.yml up -d

# Media encoder service
cd ../media-encoder-service && docker compose up -d

3. Start Backend (exam-sys)

cd exam-sys
composer install && pnpm install
cp .env.example .env
php artisan key:generate
php artisan migrate --seed
bash start-dev.sh

4. Start Client (exam-client)

cd exam-client
pnpm install
cp src/.env.example src/.env
pnpm run dev

Usage

Development Ports Mapping

Port Service Protocol Description
8090 exam-sys HTTP Laravel API + Inertia SSR
8091 exam-sys WebSocket Laravel Reverb (realtime broadcast)
8095 face-services HTTP Face verification API
8096 object-service HTTP Object detection API
8097 media-encoder-service HTTP FFmpeg encode API
7880 LiveKit Server HTTP/WS Signaling + REST API

WebRTC and HTTPS (Cloudflare Tunnel)

WebRTC yêu cầu HTTPS. Cho môi trường thực tế, hãy cấu hình Cloudflare Tunnel:

exam-local.konnn04.dev    → http://127.0.0.1:8090
ws-exam-local.konnn04.dev → http://127.0.0.1:8091

Documentation

Document Description
ARCHITECTURE.md System architecture & upgrade roadmap
docs/README-run.md Step-by-step local run guide
KTLN_DOC/ Thesis documentation (Vietnamese)
exam-sys/README.md Backend setup & API reference
exam-client/README.md Desktop client build & config
face-services/README.md Face verification service
object-service/README.md Object detection service
supervisor-agent/README.md LiveKit proctoring agent
media-encoder-service/README.md Video encoding service
observability/README.md Logging & Monitoring Config
protos/README.md Protocol Buffers definitions

Support

Nếu bạn gặp vấn đề trong quá trình cài đặt, vui lòng tạo Issue trên GitHub hoặc tham khảo tài liệu docs/README-run.md.

Roadmap

Vui lòng xem chi tiết lộ trình phát triển và nâng cấp hệ thống tại: ARCHITECTURE.md (Roadmap)

Contributing

Dự án được thực hiện như một Đồ án Tốt nghiệp tại Đại học Cần Thơ (CTU). Mọi đóng góp (Pull Request) đều được hoan nghênh. Vui lòng tạo Issue mô tả lỗi hoặc tính năng trước khi gửi PR.

Authors and acknowledgment

Konnn04 — GitHub

Xin gửi lời cảm ơn đến quý Thầy Cô tại trường Đại học Mở TP.HCM đã hỗ trợ trong quá trình thực hiện Đồ án Tốt nghiệp này.

License

Dự án được phân phối dưới dạng Đồ án Tốt nghiệp . Các thành phần mã nguồn mở được sử dụng tuân thủ theo giấy phép tương ứng của chúng (MIT/Apache 2.0).

Project status

Bảo trì / Đang hoàn thiện báo cáo (Maintenance / Reporting Phase). Hệ thống đã hoàn thiện tính năng cốt lõi và đang trong giai đoạn viết khóa luận tốt nghiệp.

About

The online examination platform includes proctoring: remote recording from the test machine, camera/screen streaming via WebRTC (LiveKit), egress recording, AI-powered violation detection, evidence storage (clips/snapshots), and support for playback monitoring — all within the architecture's microservices.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages