Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fashion Client Management System (PHP Edition)

A full-stack PHP application for managing fashion clients, services, invoices, payments, and business settings. This refactor replaces the previous React/Next.js stack with a lightweight PHP MVC structure suitable for traditional shared hosting or XAMPP environments.

Requirements

  • PHP 8.1 or newer with PDO MySQL extension
  • MySQL 8 (or MariaDB 10.4+)
  • Web server (Apache/Nginx) pointing to public/
  • Optional: Composer (not required, no third-party dependencies)

Project Structure

app/ Controllers/ # Feature controllers Core/ # Framework utilities (router, view, request, db) Models/ # Data repositories Views/ # Blade-like PHP templates config/ # Application & database configuration public/ # Web root (index.php, assets) routes/web.php # Route definitions database/init.sql # MySQL schema & seed defaults

Setup

  1. Copy the sample environment file and adjust values: �ash cp .env.example .env

    • DATABASE_URL should match your MySQL credentials (e.g. mysql://root:password@127.0.0.1:3306/fashion_cms).
    • APP_URL and APP_TIMEZONE control generated links and default timezone.
  2. Create the database schema: �ash mysql -u root -p < database/init.sql The script creates all tables and inserts baseline application settings.

  3. Configure your web server:

    • XAMPP: point http://localhost/fashion-cms to the repository’s public/ directory.
    • Apache: set DocumentRoot to public/ and ensure AllowOverride enables .htaccess if you add rewrite rules.
    • Nginx: configure a ry_files rule that routes all requests to public/index.php.
  4. Start using the app:

    • Dashboard: /
    • Clients: /clients
    • Services: /services
    • Client assignments: /client-services
    • Invoices: /invoices
    • Payments: /payments
    • Reports: /reports
    • Settings: /settings

Key Features

  • Dashboard metrics calculated directly from MySQL data.
  • Client CRM with detailed profiles, service history, invoices, and payments.
  • Service catalogue with categories, pricing, and availability controls.
  • Client service assignments with scheduling, status tracking, and custom pricing.
  • Invoice builder supporting assigned services and custom line items, with automatic totals.
  • Payment tracking with invoice reconciliation.
  • Configurable business, invoice, and backup settings stored in �pp_settings.
  • Reports for revenue trends, top clients, and invoice status summaries.

Development Notes

  • Routing is defined in outes/web.php and handled by App\Core\Router.
  • Controllers extend App\Core\Controller and use repositories for persistence.
  • Views are plain PHP templates rendered through App\Core\View with a shared layout.
  • CSRF protection is handled via csrf_token() helper included in forms.
  • Assets use Tailwind via CDN for styling; adjust �pp/Views/layouts/main.php if you prefer a local build.

Testing & Troubleshooting

  • Enable PHP error reporting during development (display_errors=On).
  • Ensure the web server user can write session files (default PHP session handling).
  • If database credentials change, update .env and restart the web server.

Deployment

  • Upload the repository excluding development helpers directly to your server.
  • Keep the public/ directory as the only web-accessible path.
  • Run database/init.sql (or a migration derived from it) on your production database.
  • Update .env with production credentials and regenerate APP_URL if needed.

The application is now framework-free PHP, making it easy to host on classic LAMP stacks without Node.js or Docker dependencies.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages