How emiliom1983/delivery_app works
Project Type and Purpose
• This is a Java console‐based, layered “delivery-app” that simulates a food delivery platform.
• It is organized as a simple three‐tier system:
• Presentation (console UI)
• Business logic (services)
• Data access (repositories + MySQL)
File Structure Analysis
• Top-level:
• pom.xml – Maven build file
• README.md – Project description, GitFlow guidelines, module structure
• sql/ – DDL scripts and ER model for MySQL
• src/main/java/org/IngSoft/
– database/ – JDBC connection class
– models/ – POJOs (Client, Dealer, Order, Product, etc.)
– (expected but not yet present) repositories/, services/, ui/ per README
Key Insights from README
• The team follows GitFlow with branches for features (authentication, menus, orders, etc.).
• Directories to exist: database, models, repositories (DAO), services (business logic), ui (console interaction).
• The SQL folder holds the database creation and sample data scripts.
Core Components
a. Console UI Module (“ui”)
• Handles user prompts, reads input, displays output.
b. Service Layer (“services”)
• Implements business use cases (place order, process payment, track delivery).
c. Repository Layer (“repositories” / DAO)
• Encapsulates SQL/JDBC operations against MySQL (insert, update, queries).
d. Database Connection Module (“database/Conexion.java”)
• Single JDBC connector class reading credentials, providing Connection objects.
e. Domain Models (“models”)
• POJOs representing Clients, Orders, Payments, Products, Delivery, etc.
f. External System – MySQL Database
• Scripted schema + sample data in sql/*.sql
Relationships and Interactions
• UI → invokes → Service methods
• Service → uses → Repository DAOs
• Repository → calls → JDBC Connection → executes SQL on MySQL
• Models flow as method parameters/return types between all layers
Architectural Patterns and Principles
• Layered Architecture (Presentation → Business → Data Access)
• DAO Pattern in repositories to isolate SQL from business logic
• Single Responsibility for each package
• POJOs for data transfer (no logic in models)
Technologies and Frameworks
• Java (Maven project)
• JDBC (java.sql) for DB connectivity
• MySQL as relational database (scripts under sql/)
• Console I/O (java.util.Scanner or similar)
• Optional future: JUnit for tests, logging frameworks
Detailed Elements
• Component Blocks:
[Main.java / Launcher]
[org.IngSoft.ui.ConsoleUI]
[org.IngSoft.services.*Service]
[org.IngSoft.repositories.*DAO]
[org.IngSoft.database.Conexion]
[MySQL Database (sql schema & data)]
• Main → Conexion → MySQL
• ConsoleUI → Service methods → DAO → JDBC → MySQL → back up the chain
• Annotations:
• Package paths inside each block
• SQL scripts location (sql/Crea_db.sql) as initialization step