How moonslope/it6-proj-copy works
File structure
• Top-level directories and their intent:
• AdminUI, CashierUI – Presentation layer (PHP pages for Admin and Cashier workflows)
• Operations – Business logic and data-access operations (op_add_*, op_edit_*, op_delete_* scripts)
• Database – Connection script (db_connect.php)
• global – Shared includes (head.php)
• CSS, images – Static assets (style.css, image files)
• SQL files (cocop.sql, l300_copy1.sql) – Schema and data dumps
README
• Minimal metadata (“# IT6-PROJ-COPY”), confirming no pre-drawn architecture. We infer architecture solely from file structure.
Main components
a. Presentation Layer (UI)
• AdminUI module
• CashierUI module
b. Business Logic Layer
• Operations folder (CRUD scripts linking UI to DB)
c. Data Access Layer
• Database/db_connect.php & underlying MySQL database (schema from SQL dumps)
d. Shared Components
• global/head.php include
• CSS/style.css & images
e. External Actor
• Web browser (Admin/Cashier)
• Web server running PHP
Relationships and interactions
• Browser → HTTP request → PHP UI page
• UI page → include head.php → render HTML form/table
• Form submit → operations/op_*.php script → uses db_connect.php to run SQL
• Database ←→ operations scripts (CRUD queries)
• Results returned to UI → rendered to browser
• CSS/images served alongside UI pages
Architectural patterns and design principles
• Layered architecture (Presentation → Business Logic → Data Access)
• Entity-based modularization (each domain entity gets its own UI folder + operations)
• Shared includes for common UI elements (global/head.php)
• Separation of concerns but no service decoupling (monolith)