How fernandoasto04/ingsoft2 works
Project Type and Purpose
• This is a full-stack web application built with a Node.js/Express backend and a React/Vite frontend, backed by a relational database (models indicate Sequelize or a similar ORM).
• It implements an MVC‐style backend with a DAO pattern for data access and provides RESTful API endpoints for managing users, professors, areas, assignments, etc.
File Structure Analysis
• Top-level “backend” and “frontend” directories separate server and client.
• backend/ contains:
• server.js – entry point that wires routes, controllers, database.
• controllers/ – request handlers for each entity (Usuario, Profesor, etc.).
• models/ & database/ – ORM model definitions and DB connection.
• patrones/patronDAO/ – DAO factory, DAO implementations, and transfer objects (TO) for data layer abstraction.
• routes/ – Express route definitions mapped to controllers.
• frontend/ contains:
• src/ – React components and contexts.
• Service/ – client-side API wrappers.
• Vite config, public assets, styling.
• pruebasJest/ shows unit tests for DAO and model logic.
Key Architectural Patterns
• Layered architecture: Presentation (React), Application/API layer (Express controllers + routes), Domain layer (models + DAO), Persistence layer (database).
• DAO pattern abstracts CRUD operations behind factory/injectable interfaces.
• Context usage in React for state management (Trabajoscontext.jsx).
Main Components
• Frontend (React/Vite): UI components, Service layer.
• Backend API (Node.js/Express):
• Routes → Controllers → Service/DAO → Models → Database.
• Database: Relational DB (e.g. PostgreSQL/MySQL).
• External or Auxiliary: Unit Test Suite (Jest) – can be shown as a side component.
Relationships and Data Flow
• DAO Factory providing concrete DAO implementations to controllers.
• React Context distributing state to components.