How migueloomar/aws_pe works
Project type and purpose
• This is a backend‐only RESTful API built with Node.js and Express.
• It exposes CRUD endpoints to manage two resources: “Alumnos” and “Profesores.”
File structure
• index.js: the entry point that boots the Express server.
• /routes: defines HTTP routes (alumnosRoutes.js, profesoresRoutes.js).
• /controllers: contains business logic for each resource (alumnosController.js, profesoresController.js).
• /models: defines data schemas/entities for Alumno and Profesor (e.g., Mongoose or any ORM).
• package.json / .gitignore: environment and dependency configuration.
README for additional insights
• Confirms use of Express and Node.js.
• Describes the three‐layer pattern: Models → Controllers → Routes.
• Mentions supported operations (CRUD for both resources).
a. Main components:
• API Consumers (e.g., front-end app, Postman, mobile client)
• Express HTTP Server (index.js)
• Route Handlers (routes/alumnosRoutes.js, routes/profesoresRoutes.js)
• Controllers (controllers/*Controller.js)
• Data Models/ORM (models/*.js)
• Database (e.g., MongoDB, PostgreSQL)
• Configuration/Environment (env files, connection setup)
b. Relationships and interactions:
1. Consumer → HTTP Request → Express Server
2. Server dispatches to Route Handlers
3. Route Handler calls Controller methods
4. Controller invokes Model layer to query/update the Database
5. Model returns data → Controller formats response → Server returns JSON to Consumer
c. Architectural patterns and principles:
• MVC-style layering (Routes → Controllers → Models)
• Single codebase, stateless HTTP endpoints
• Separation of concerns: routing vs. business logic vs. data access
d. Key technologies:
• Node.js runtime
• Express framework
• ORM/ODM library (e.g., Mongoose)
• Relational or NoSQL database (MongoDB, PostgreSQL, etc.)