How desug/jinbi-lesson-management works
Jinbi is a split UniApp/Vue student and administrator lesson-management app backed by FastAPI, SQLAlchemy, and MySQL. The main workflow is administrator login, student/grade management, and lesson-hour adjustments that update balances and create records; students can log in to view profiles and lesson records. An optional administrator AI query feature is documented. The graph reflects indexed backend imports and documented capabilities; frontend page-to-API wiring and unsampled student services are not verified in the excerpts.
Main entry points: main.py FastAPI app · models Domain models · auth_service.py Authentication · admin_service.py Admin operations
Components 24
UniApp frontend
- App shell
frontend/App.vue - Admin pages
frontend/pages/admin - Student pages
frontend/pages/student - Login pages
frontend/pages/login/index.vue - API clients
frontend/api
API and identity
- FastAPI app
backend/app/main.py - Auth routes
backend/app/routers/auth.py - Admin routes
backend/app/routers/admin.py - Student routes
backend/app/routers/student.py - AI route
backend/app/routers/admin_ai.py - Authentication
backend/app/services/auth_service.py
Lesson management
- Admin operations
backend/app/services/admin_service.py - Student queries
backend/app/services/student_service.py - Natural-language queries
backend/app/services/ai_query_service.py - Shared domain helpers
backend/app/services/common.py - Class types
backend/app/services/class_types.py
Data and integrations
- Database sessions
backend/app/core/database.py - Domain models
backend/app/models - JWT security
backend/app/core/security.py - Configuration
backend/app/core/config.py
Other components
- Administrator
- Student
- MySQL database
- DeepSeek-compatible service
Connections 28
- FastAPI app → Auth routes: registers routes
backend/app/main.py - FastAPI app → Admin routes: registers routes
backend/app/main.py - FastAPI app → Student routes: registers routes
backend/app/main.py - FastAPI app → AI route: registers routes
backend/app/main.py - Auth routes → Authentication: delegates to
backend/app/routers/auth.py - Admin routes → Admin operations: delegates to
backend/app/routers/admin.py - Student routes → Student queries: delegates to
backend/app/routers/student.py - AI route → Natural-language queries: delegates to
backend/app/routers/admin_ai.py - Authentication → JWT security: creates tokens
backend/app/services/auth_service.py - Authentication → Shared domain helpers: builds profile
backend/app/services/auth_service.py - Authentication → Domain models: queries accounts
backend/app/services/auth_service.py - Admin operations → Domain models: updates records
backend/app/services/admin_service.py - Admin operations → Shared domain helpers: uses helpers
backend/app/services/admin_service.py - Admin operations → Class types: uses class rules
backend/app/services/admin_service.py - Student queries → Domain models: queries records
- Natural-language queries → Domain models: queries lesson data
backend/app/services/ai_query_service.py - Natural-language queries → Configuration: reads configuration
backend/app/services/ai_query_service.py - Database sessions → Configuration: reads database config
backend/app/core/database.py - Domain models → Database sessions: uses model base
backend/app/models/student.py - Database sessions → MySQL database: connects to
backend/app/core/database.py - Natural-language queries → DeepSeek-compatible service: queries model
README.md - Administrator → Login pages: signs in
- Student → Login pages: signs in
- Admin pages → API clients: requests data
- Student pages → API clients: requests data
- API clients → FastAPI app: calls API
- Administrator → Admin pages: manages lessons
README.md - Student → Student pages: views lesson data
README.md