How yyoshda/pi_1_semestre works
1. System type and runtime
- This is a Java desktop application built with Maven and a Swing-based UI.
- The project is a monolithic client that runs locally, boots from br.maua.Main, and uses AppConfig for application wiring/configuration.
2. Overall purpose
- The app implements “Jornada Mauá”, a gamified academic platform for classroom activities.
- It supports two main roles: professor and aluno.
- The gameplay/learning model appears to revolve around classes, tasks, questions, answers, submissions, and a board/progression layer.
3. Presentation layer
- All user interaction lives under br.maua.presentation.
- The UI is organized into many Swing screens and modal dialogs such as login, cadastro, professor home, student questions, task creation, grading/correction, class management, and profile views.
- The .form files show these are GUI-builder-backed screens, not a web frontend.
4. Role-based navigation
- TelaLogin, TelaCadastro, and ControladorCredenciais form the entry path and authentication/identity flow.
- After login, the application branches into different navigation paths for professor and aluno.
- TelaNavegacao and the various “home”, “painel”, and “modal” screens indicate the app is organized around screen-to-screen transitions rather than a single-page flow.
5. Core academic/game domain
- The domain package contains the business model:
- People and identity: Usuario, Aluno, Professor
- Organization: Casa, Curso, Ano, Turma, Subturma, Secao
- Game/progression: Tabuleiro, Tarefa, Tentativa
- Assessment: Questao, Resposta, and variants for different question/answer types
- This suggests the platform models both course structure and game mechanics together.
6. Question and response polymorphism
- The codebase distinguishes several task/question types:
- QuestaoAlternativa, QuestaoDissertativa, QuestaoUpload
- RespostaAlternativa, RespostaDissertativa, RespostaUpload
- Alternativa as the choice option entity
- The UI mirrors this split: the task creation and student question screens include dedicated components for each question format.
- This is a key architectural boundary because task handling is type-specific throughout the app.
7. Service layer
- JornadaService and ArquivoService sit between UI and persistence.
- JornadaService likely orchestrates domain operations such as creating tasks, submitting responses, grading, and progress updates.
- ArquivoService handles file-related behavior, which is important because the app supports upload-based tasks and stored student submissions.
8. Persistence layer
- The infrastructure.DAO package contains one DAO per main entity or relationship.
- Examples include AlunoDAO, ProfessorDAO, QuestaoDAO, RespostaDAO, TurmaDAO, TarefaDAO, TentativaDAO, and specialized DAOs for each question/answer subtype.
- ConnectionFactory centralizes database connections, and jornadamauadbmodel.sql provides the database schema/model.
- This is a classic DAO + relational database architecture, with the domain model mapped manually rather than through a heavy ORM layer.
9. File storage and uploads
- The repository includes both data/uploads/... and src/main/resources/... with student and professor files.
- This indicates the application persists uploaded artifacts on the local filesystem, not only in the database.
- The presence of assets/baixados and upload directories suggests two file flows: stored submission files and downloadable/template assets.
10. Corretions and submission lifecycle
- There are explicit screens for student submission and professor review:
- TelaQuestionarioAluno, TelaUploadAluno, TelaTarefaAluno
- TelaCorrecaoTarefa, TelaNotaAluno, TelasNotasProfessor
- This points to a lifecycle where professors create tasks, students respond through different formats, and professors later correct or score submissions.
- Tentativa likely represents repeated attempts or submission instances.
11. Class management and roster operations
- The app includes multiple screens for managing institutional structure:
- creating classes and sections, adding students, viewing students in a class, and class dashboards.
- TurmaSubturmaDAO suggests many-to-many or association logic between class groupings.
- This is the administrative backbone that ties users to tasks and game progression.
12. Board/game mechanics
- Tabuleiro and the dedicated board screen (TelaTabuleiro) imply a game board or progress map is part of the experience.
- Casa is likely a board tile or position concept used to represent advancement.
- Combined with tasks and attempts, the architecture supports a gamified loop: participate → answer → score → advance on board.
13. UI composition and reusable widgets
- Several screens have internal Components packages, such as quest panels and buttons.
- These reusable Swing components are used to render different task/question types and class/action rows consistently.
- That separation keeps the larger screens from owning all rendering logic directly.
14. Repository and build tooling
- The project is built with Maven (pom.xml) and has NetBeans metadata (nbactions.xml).
- target/ contains compiled outputs, confirming a standard Java build pipeline.
- .env.example suggests some configuration values may be externalized, even though the main architecture is still local desktop + DB + filesystem.
15. Key architectural boundaries to diagram
- UI boundary: screens/forms in presentation
- Application logic boundary: service and credential control
- Domain boundary: entities and enums in domain / enums
- Persistence boundary: DAOs + ConnectionFactory
- File boundary: upload/download storage under data/uploads and resources/assets
- The most important data flow is: user action in Swing UI → service/controller logic → DAO/database and file storage → updated screen state.
Main entry points: AlunoDAO.java DAOs · JornadaService.java JornadaService · TelaTarefaAluno.java Aluno Home · TelaNavegacao.java Navegação
Components 26
Bootstrap
Application entrypoint and wiring
Presentation
Swing screens and reusable UI components
- Login · Entry screen for authentication
src/main/java/br/maua/presentation/TelaLogin/TelaLogin.java - Cadastro · User registration screen
src/main/java/br/maua/presentation/TelaCadastro/TelaCadastro.java - Navegação · Role-based screen navigation
src/main/java/br/maua/presentation/TelaNavegacao.java - Home Prof · Professor landing and admin panel
src/main/java/br/maua/presentation/TelaHomeProfessor/TelaPainelAdministrativo.java - Aluno Home · Student task and progress entry point
src/main/java/br/maua/presentation/TelaTarefasAluno/TelaTarefaAluno.java - Criar Tarefa · Task authoring workflow
src/main/java/br/maua/presentation/TelaCriarTarefa/TelaCriarTarefa.java - Questionário · Student task answering screen
src/main/java/br/maua/presentation/TelaQuestionarioAluno/TelaQuestionarioAluno.java - Upload Aluno · File submission screen
src/main/java/br/maua/presentation/TelaUploadAluno/TelaUploadAluno.java - Correção · Teacher correction workflow
src/main/java/br/maua/presentation/TelaCorrecaoTarefa/TelaCorrecaoTarefa.java - Tabuleiro · Game board/progression view
src/main/java/br/maua/presentation/TelaTabuleiro/TelaTabuleiro1.java
Domain
Core academic and game model
- Usuário · Base person and identity model
src/main/java/br/maua/domain/Usuario.java - Turma/Curso · Academic organization and roster model
src/main/java/br/maua/domain/Turma.java - Questões · Question types and alternatives
src/main/java/br/maua/domain/Questao.java - Respostas · Student answer types
src/main/java/br/maua/domain/Resposta.java - Tarefa · Assignment and attempt lifecycle
src/main/java/br/maua/domain/Tarefa.java - Tabuleiro · Board and progress mechanics
src/main/java/br/maua/domain/Tabuleiro.java
Application
Services and orchestration
- JornadaService · Coordinates tasks, submissions and progression
src/main/java/br/maua/service/JornadaService.java - ArquivoService · Handles upload and file lifecycle
src/main/java/br/maua/service/ArquivoService.java - Credenciais · Authentication and credential flow
src/main/java/br/maua/controller/ControladorCredenciais.java
Persistence
Database access and connection handling
- ConnectionFactory · Creates database connections
src/main/java/br/maua/infrastructure/ConnectionFactory.java - DAOs · Entity-specific DAO layer
src/main/java/br/maua/infrastructure/DAO/AlunoDAO.java - SQL Model · Relational schema definition
jornadamauadbmodel.sql
Connections 32
- Main → AppConfig: boots · Main starts the application wiring
- AppConfig → Login: opens · Configuration leads to the initial screen
- Login → Credenciais: authenticates · Login delegates identity checks
- Cadastro → Credenciais: registers · Registration uses the credential flow
- Credenciais → Navegação: routes · Authentication selects the next screen by role
- Navegação → Home Prof: professor · Professor path opens admin/home screens
- Navegação → Aluno Home: aluno · Student path opens task screens
- Home Prof → Criar Tarefa: creates · Professor builds new tasks
- Home Prof → Correção: reviews · Professor corrects submissions
- Aluno Home → Questionário: answers · Student works on question-based tasks
- Aluno Home → Upload Aluno: uploads · Student submits file-based work
- Aluno Home → Tabuleiro: progresses · Student views board progression
- Criar Tarefa → JornadaService: uses · Task creation is coordinated by service logic
- Questionário → JornadaService: submits · Answers are handed to the application service
- Upload Aluno → ArquivoService: stores · Uploaded files are managed by file service
- Correção → JornadaService: grades · Corrections update attempts and scores
- JornadaService → DAOs: persists · Service layer writes and reads domain data
- JornadaService → ArquivoService: moves files · Service coordinates file-backed submissions
- DAOs → ConnectionFactory: connects · DAOs obtain database connections
- ConnectionFactory → SQL Model: targets · Connection layer serves the relational schema
- ArquivoService → Uploads: reads/writes · File service stores submission artifacts locally
- Criar Tarefa → Questões: composes · Task authoring builds polymorphic questions
- Questionário → Respostas: produces · Student interaction creates answers
- Tabuleiro → Tabuleiro: renders · Board screen reflects game progress model
- JornadaService → Tarefa: orchestrates · Service manages assignment lifecycle
- JornadaService → Tabuleiro: updates · Progress changes affect the board state
- DAOs → Usuário: stores · DAO layer persists users and roles
- DAOs → Turma/Curso: stores · DAO layer persists class and course structure
- DAOs → Questões: stores · DAO layer persists question variants
- DAOs → Respostas: stores · DAO layer persists answer variants
- DAOs → Tarefa: stores · DAO layer persists tasks and attempts
- Assets → Upload Aluno: templates · Bundled assets support downloadable task files