Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP Transaction Application

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.

Core Features

  • 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.

Project Architecture

The project is structured into three primary layers:

1. Server-Side Logic (/server)

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.

2. Frontend Presentation (/client)

Contains the user interface and presentation logic.

  • views/: PHP templates and layouts rendered for the user.
  • assets/: Static resources including CSS and frontend scripts.

3. Web Root (/public)

The public-facing entry point of the application.

  • index.php: Bootstrap file that initializes the application.

Prerequisites

Ensure your environment meets the following requirements:

  • PHP: version 7.4 or higher.
  • Extensions: PDO_MYSQL must be enabled.
  • Database: MySQL Server.

Installation and Setup

1. Database Configuration

Ensure your MySQL server is active. Update the database credentials if necessary in the following files:

  • server/config/database.php
  • server/setup_database.php

The default configuration uses localhost, root as username, and an empty password.

2. Initialize Database

Initialize the database schema, tables, and stored procedures by running the setup script from the project root:

php server/setup_database.php

Running the Application

  1. Navigate to the public directory:

    cd public
  2. Start the built-in PHP development server:

    php -S localhost:8000
  3. Access the application in your browser: http://localhost:8000

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages