A professional inventory management and Point of Sale (POS) system built with vanilla PHP. This application follows a clean architecture by separating backend business logic from frontend presentation.
- Inventory Management: Real-time tracking and management of stock levels.
- Point of Sale (POS): Streamlined interface for processing sales and transactions.
- Transaction History: Detailed logs and records of all historical transactions.
- Clean Architecture: Decoupled server-side logic and client-side views.
The project is structured into three primary layers:
Handles the core business logic, data access, and API endpoints.
config/: Database connection and application configuration.controllers/: Request handling and application flow control.database/: Schema definitions and stored procedures.models/: Data access objects (DAO) for database interaction.routes/: API route definitions.tests/: Concurrency and availability testing scripts.
Contains the user interface and presentation logic.
views/: PHP templates and layouts rendered for the user.assets/: Static resources including CSS and frontend scripts.
The public-facing entry point of the application.
index.php: Bootstrap file that initializes the application.
Ensure your environment meets the following requirements:
- PHP: version 7.4 or higher.
- Extensions:
PDO_MYSQLmust be enabled. - Database: MySQL Server.
Ensure your MySQL server is active. Update the database credentials if necessary in the following files:
server/config/database.phpserver/setup_database.php
The default configuration uses localhost, root as username, and an empty password.
Initialize the database schema, tables, and stored procedures by running the setup script from the project root:
php server/setup_database.php-
Navigate to the
publicdirectory:cd public -
Start the built-in PHP development server:
php -S localhost:8000
-
Access the application in your browser: http://localhost:8000