Spaces:
Runtime error
Runtime error
Greg
Claude Opus 4.7 (1M context)
Preparar despliegue en fly.io: monolito dockerizado + seeder demo
6aa6081 |
Download docs/architecture.md from Talosware/talos-access: direct link, hf CLI and curl.
- Browser
- Download file 2.1 kB
-
https://huggingface.co/spaces/Talosware/talos-access/resolve/main/docs/architecture.md
- Command line
-
hf download hf://spaces/Talosware/talos-access/docs/architecture.md
-
curl -L -o architecture.md https://huggingface.co/spaces/Talosware/talos-access/resolve/main/docs/architecture.md
2.1 kB
Architecture β Talos Access
System Overview
Talos Access is a multi-tenant school attendance management system with facial recognition, ID card design, and comprehensive role-based access control.
Layers
Frontend (React + TypeScript + Vite)
- Routing: React Router v6 with protected routes
- State: Zustand (auth store with localStorage persistence)
- HTTP: Axios instance with JWT token injection and 401 auto-redirect
- UI: Tailwind CSS with custom components
- Card designer: Fabric.js canvas
- Facial: Browser camera API with base64 image capture
Backend (Python + FastAPI)
- API: RESTful, versioned (
/api/v1) - Auth: JWT (HS256, 60min expiry) with HTTPBearer
- RBAC: Role-based access control at endpoint level; permission system for granular access
- DB: MySQL 8+ via SQLAlchemy ORM
- Migrations: Alembic
- Facial: Face encoding comparison (Euclidean distance)
Data Flow
- Client authenticates β receives JWT
- JWT included in
Authorization: Bearerheader for all requests get_current_userdependency decodes JWT and loads user from DB- RBAC middleware checks role/permissions
- Multi-tenant isolation via
account_idfilter on all queries
Key Patterns
- Repository-less: Endpoints query models directly (no service layer)
- Dependency injection: FastAPI
Depends()for auth, DB sessions, plan gating - Pydantic schemas: Request validation and response serialization
- CSV bulk import: Template download β upload β parse β transaction commit
Database Schema (Core Tables)
usersβ Students, teachers, admins, representatives, administrativos, obrerossectionsβ Class groups withmax_studentsandacademic_periodenrollmentsβ Student-to-section assignments (unique on section+student)attendancesβ Daily check-in/out records withaction(in/out) andnoteholidaysβ Non-instructional days (national, school, vacation)audit_logβ Action audit trail for compliancesection_schedulesβ Weekly class scheduling grid