Skip to content

pasmin401/printflow

Repository files navigation

PrintFlow — Print Shop Order Management System

A full-featured print shop management web application built with PHP, MySQL, HTML, and CSS.


📋 Features

  • Dashboard — Stats overview, workflow pipeline, recent orders & live activity feed
  • Orders — Create, view, update status, delete, filter, search, paginate orders
  • Customers — Manage customer list (add, edit, delete)
  • Track Order — Track any order by order number with visual progress bar & timeline
  • Authentication — Secure login/logout with PHP sessions and hashed passwords
  • Live Search — AJAX quick-search from the dashboard

🚀 Setup Instructions

Requirements

  • PHP >= 7.4 (PHP 8.x recommended)
  • MySQL >= 5.7 or MariaDB >= 10.3
  • Apache or Nginx with mod_rewrite (or PHP built-in server for dev)

1. Database Setup

Import the SQL schema:

mysql -u root -p < database.sql

Or run the SQL file from phpMyAdmin: import database.sql.


2. Configure Database Connection

Edit includes/db.php and update your credentials:

define('DB_HOST', 'localhost');
define('DB_USER', 'root');       // ← your MySQL username
define('DB_PASS', '');           // ← your MySQL password
define('DB_NAME', 'printflow'); // ← database name

3. Run the Application

Option A — PHP built-in server (for development):

cd printflow
php -S localhost:8000

Then open: http://localhost:8000

Option B — XAMPP / WAMP / MAMP: Copy the printflow folder to your htdocs (XAMPP) or www (WAMP) directory. Then open: http://localhost/printflow

Option C — Apache virtual host: Point the document root to the printflow directory.


4. Login

Default credentials:

  • Email: admin@printflow.com
  • Password: password

To change or add admin users, update the users table in MySQL (passwords must be bcrypt-hashed via password_hash()).


📁 File Structure

printflow/
├── index.php          # Dashboard
├── orders.php         # Order management (list, view, create, delete)
├── customers.php      # Customer management
├── track.php          # Public order tracking
├── login.php          # Login page
├── logout.php         # Logout handler
├── database.sql       # Database schema + seed data
├── includes/
│   ├── db.php         # Database connection (PDO)
│   ├── auth.php       # Auth helpers, session, utilities
│   └── nav.php        # Navigation component
├── assets/
│   └── css/
│       └── app.css    # Main stylesheet
└── api/
    └── search.php     # AJAX search endpoint

🎨 Tech Stack

Layer Technology
Frontend HTML5, CSS3 (custom), Vanilla JS
Backend PHP 8 (procedural + PDO)
Database MySQL / MariaDB
Fonts Plus Jakarta Sans, JetBrains Mono (Google Fonts)

🔧 Order Workflow

Orders move through these stages:

PendingPlatingPrintingFinishingPackingCompleted

Each status change is logged automatically in the activity timeline.


🛡️ Security Notes

  • All user inputs are parameterized (PDO prepared statements) — safe from SQL injection
  • Output is HTML-escaped with htmlspecialchars()
  • Passwords are hashed with password_hash() / password_verify()
  • All pages require login (session check)

💡 Customization Tips

  • Add more users: Insert into the users table with a bcrypt-hashed password
  • Currency: Search for $ in PHP files and replace with your currency symbol
  • Logo: Replace the 🖨️ emoji in nav.php with an <img> tag
  • Colors: Edit CSS variables in assets/css/app.css under :root

About

Print Management flow for CSM Printing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors