How inkithai/erp-system works
Purpose and Runtime
A small PHP/MySQL ERP application for managing customers and items, plus operational reports. It is intended to run on Apache and MySQL via XAMPP; the database schema/data is imported from MySQL Database/ERP.sql.
HTTP Entry and Navigation
index.php is the likely application landing page and main request entry. Page-oriented PHP scripts implement the UI and operations directly, with shared navigation likely provided by sidebar.php. Styling is supplied by style/index.css; static visual assets reside in img.
Database Boundary
Connection.php centralizes PHP-to-MySQL connectivity and is the primary persistence boundary used by application pages. MySQL Database/ERP.sql defines the required ERP database, so schema changes and local environment initialization flow through that SQL artifact rather than application migrations.
Customer Management Module
Customer-facing CRUD/read flows are split across dedicated server-rendered pages:
• viewCustomer.php displays/searches customer records.
• editCustomer.php handles customer creation or updates.
• Connection.php supplies database access.
Requests are expected to submit form data to PHP pages, which validate/process it inline and execute MySQL operations before rendering a response or returning to a list view.
Item Management Module
Item lifecycle management follows the same page-per-operation model:
• viewItem.php presents item records.
• editItem.php updates item data.
• registerItem.php adds inventory/item records.
These pages form the main item-data write/read boundary and depend on the shared database connection in Connection.php.
Reporting Pipeline
Reporting is separated from transactional maintenance:
• reports.php serves as the reports area or report-selection page.
• itemReport.php generates item-oriented output.
• invoiceItemReport.php generates invoice/item-oriented output.
Report pages query MySQL data through Connection.php and render results as HTML, making the database schema and its customer/item/invoice relationships the key reporting dependency.
Architectural Characteristics
The repository is a traditional multi-page, server-rendered PHP application rather than an API/service architecture. Control flow is browser request → individual PHP page → MySQL query/update → HTML response. Apache/PHP and MySQL are material runtime dependencies; Bootstrap, CSS, and JavaScript support the presentation layer, with repository-local CSS at style/index.css.
Main entry points: Connection.php MySQL connection · index.php Application entry · sidebar.php Shared navigation · viewItem.php Item list
Components 17
Runtime
- Browser
- Apache / PHP · Hosts the multi-page PHP application.
Server-rendered UI
- Application entry
index.php - Shared navigation
sidebar.php - Customer list & search
viewCustomer.php - Customer create / edit · Processes customer form writes inline.
editCustomer.php - Item list
viewItem.php - Item edit
editItem.php - Item registration
registerItem.php - Application styles
style/index.css - Visual assets
img
Reporting
- Reports area
reports.php - Item report
itemReport.php - Invoice item report
invoiceItemReport.php
Data
- MySQL connection · Centralizes database access for application pages.
Connection.php - ERP MySQL database · Stores customer, item, and invoice relationships.
- ERP schema & seed data · Initializes the required local database.
MySQL Database/ERP.sql
Connections 22
- Browser → Apache / PHP: HTTP requests
- Apache / PHP → Application entry: serves
- Application entry → Shared navigation: navigation
- Shared navigation → Customer list & search: customer navigation
- Shared navigation → Item list: item navigation
- Shared navigation → Reports area: report navigation
- Customer list & search → Customer create / edit: create / edit
- Item list → Item edit: edit
- Item list → Item registration: register
- Reports area → Item report: selects
- Reports area → Invoice item report: selects
- Customer list & search → MySQL connection: reads
- Customer create / edit → MySQL connection: reads / writes
- Item list → MySQL connection: reads
- Item edit → MySQL connection: reads / writes
- Item registration → MySQL connection: writes
- Item report → MySQL connection: queries
- Invoice item report → MySQL connection: queries
- MySQL connection → ERP MySQL database: MySQL operations
- ERP schema & seed data → ERP MySQL database: imports schema and data
- Application entry → Application styles: loads
- Application entry → Visual assets: uses