How allanamrtins/trabalho-final---es2 works
Afim Quest is a gamified learning platform for practicing affine functions, with teacher-managed activities and a FastAPI backend. Students authenticate, browse missions, submit answers for automatic correction and feedback, then review performance and gamification progress; teachers create and manage activities. The README documents a web interface, layered services and repositories, and SQLite persistence. Sampled source confirms the main API-to-service-to-domain/repository paths; other documented capabilities are included, but their unsampled implementation links are not asserted.
Main entry points: main.py API entry · resposta_service.py Answer and performance · atividade_service.py Activity management · models.py ORM entities
Components 23
Users and interface
- Web interface
app/static/index.html
HTTP API
- API entry
app/main.py - Authentication API
app/api/auth.py - Activity API
app/api/atividades.py - Function API
app/api/funcoes.py - Answer API
app/api/respostas.py - Gamification API
app/api/gamificacao.py
Application and domain
- Access control
app/api/deps.py - User accounts
app/services/usuario_service.py - Activity management
app/services/atividade_service.py - Answer and performance
app/services/resposta_service.py - Progress and ranking
app/services/gamificacao_service.py - Affine math
app/domain/funcao_afim.py - Gamification rules
app/domain/gamificacao.py - API contracts
app/schemas.py - Token security
app/core/security.py
Persistence
- Activity repository
app/repositories/atividade_repository.py - Response repository
app/repositories/resposta_repository.py - User repository
app/repositories/usuario_repository.py - ORM entities
app/models.py - SQLite database
app/core/database.py
Other components
- Student
- Teacher
Connections 33
- Student → Web interface: uses
README.md - Teacher → Web interface: uses
README.md - Web interface → API entry: sends HTTP/JSON
README.md - API entry → Authentication API: registers routes
app/main.py - API entry → Activity API: registers routes
app/main.py - API entry → Function API: registers routes
app/main.py - API entry → Answer API: registers routes
app/main.py - API entry → Gamification API: registers routes
app/main.py - Authentication API → User accounts: delegates to
app/api/auth.py - Activity API → Activity management: delegates to
app/api/atividades.py - Function API → Affine math: uses
app/api/funcoes.py - Answer API → Answer and performance: delegates to
app/api/respostas.py - Gamification API → Progress and ranking: delegates to
app/api/gamificacao.py - Access control → Token security: decodes tokens
app/api/deps.py - Access control → User repository: looks up user
app/api/deps.py - Activity management → Activity repository: uses
app/services/atividade_service.py - Activity management → Affine math: calculates answers
app/services/atividade_service.py - Answer and performance → Activity management: loads activity
app/services/resposta_service.py - Answer and performance → Response repository: records and queries
app/services/resposta_service.py - Answer and performance → Affine math: checks and advises
app/services/resposta_service.py - Answer and performance → Gamification rules: calculates XP
app/services/resposta_service.py - Progress and ranking → Response repository: reads results
app/services/gamificacao_service.py - Progress and ranking → Gamification rules: computes progress
app/services/gamificacao_service.py - User accounts → User repository: uses
app/services/usuario_service.py - User accounts → Token security: uses
app/services/usuario_service.py - Activity repository → ORM entities: persists activities
README.md - Response repository → ORM entities: queries responses
app/repositories/resposta_repository.py - User repository → ORM entities: queries users
app/repositories/usuario_repository.py - ORM entities → SQLite database: maps entities
app/models.py - API entry → SQLite database: creates tables
app/main.py - Activity API → API contracts: validates payloads
README.md - Answer API → API contracts: validates payloads
README.md - Gamification API → API contracts: formats responses
README.md