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.
- 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)
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
-
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.
-
Create the database schema:
�ash mysql -u root -p < database/init.sqlThe script creates all tables and inserts baseline application settings. -
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.
-
Start using the app:
- Dashboard: /
- Clients: /clients
- Services: /services
- Client assignments: /client-services
- Invoices: /invoices
- Payments: /payments
- Reports: /reports
- Settings: /settings
- 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.
- 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.
- 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.
- 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.