How sudokentucky/ipc2_proyecto3_20210106 works
Main Components
a. BackEnd Service:
• Located in the “BackEnd” directory.
• Contains an “app” folder with initialization files, a “data_storage.py” module, utility functions, and “views.py” which likely defines the API endpoints.
• A “models” directory holds domain-specific entities (Banco, Cliente, Factura, Pago) that represent the business logic/data model.
• The “run.py” script appears to be the entry point for starting the backend service (likely running on port 5000, as suggested by the READMEs API endpoint).
b. FrontEnd Application:
• Housed in the “FrontEnd” directory. Within that, there’s a separate “FrontEnd” project folder that includes standard Django files such as settings.py, urls.py, asgi.py, wsgi.py, and manage.py.
• Contains “templates” (various HTML files for different pages), “static” assets (CSS files), and custom views for handling requests.
• There is also a SQLite database (db.sqlite3) which indicates that the Django app is managing some local persistence.
c. Supporting/Documentation:
Understand the Relationships and Interactions
• The BackEnd exposes REST API endpoints (e.g., http://localhost:5000/api/consultarIngresos?fecha=03/2022) for client consumption. This service is responsible for handling business logic and data interactions using its model classes and data storage mechanisms.
• The FrontEnd, built with Django, serves web pages. It likely interacts with the backend API to fetch data (or in some configurations, might also incorporate business logic locally) and to render dynamic content via its templates.
• The FrontEnd also directly interacts with its local SQLite database for persistence.
Architectural Patterns
• For the BackEnd, there is a clear separation of concerns between “views” (which could be controller-like endpoints) and “models” (which define the domain). The “data_storage.py” might encapsulate data access logic, while “utils” contains helper functions.
• The Django FrontEnd follows the MVC (or more accurately, MTV) pattern where templates represent the view, URL patterns and views are the controller, and models (if any exist in this part) or the SQLite database is the data layer.
Relevant Technologies and Frameworks
• BackEnd: Likely a Python-based microservice framework (possibly Flask-like given the “run.py” and folder layout) that provides RESTful API endpoints.
• FrontEnd: A Django application (evident from settings.py, asgi.py, etc.) handling user interface rendering through HTML templates and static asset management.
• SQLite database: Employed by the Django app for data persistence.
• Communication is done via REST API calls (e.g., the “consultarIngresos” endpoint).