<p align="center">
  <a href="https://melsoftzim.co.zw" target="_blank">
    <img src="public/assets/img/logo.png" width="180" alt="Melsoft Logo">
  </a>
</p>

<h1 align="center">Melsoft Quanta</h1>

<p align="center">
  Enterprise-grade accounting, finance, inventory, and reporting platform — built on Laravel.
</p>

<p align="center">
  <a href="https://melsoftzim.co.zw" target="_blank">melsoftzim.co.zw</a>
  ·
  <a href="https://www.zienetzim.co.zw" target="_blank">zienetzim.co.zw</a>
</p>

---

## Overview

Melsoft Quanta is a web-based accounting and operations system designed to give teams real-time visibility into financial activity, structured controls around posting and approvals, and a consistent reporting layer for decision-making.

This repository contains the Laravel application powering Quanta, including authentication, role/permission management, multi-currency configuration, core ledgers (customers/suppliers/GL), inventory, document generation, and PDF/Excel exports for key reports.

## Product Capabilities

The application is organized into modules commonly deployed in SME-to-enterprise finance environments:

- **Security & Access Control**: Users, roles, permissions, and session timeout enforcement.
- **Master Data**: Chart of accounts, tax setup, projects, warehouses, UoM categories/conversions, price lists.
- **Customers & Sales**: Customer categories, customer transactions, statements, sales collections, ageing, daily transaction reports, outstanding sales, invoicing.
- **Suppliers & Purchases**: Supplier categories, supplier accounts/transactions, ageing, daily transaction reports, payments, supplier invoices.
- **General Ledger & Journals**: GL transactions, general journals, customer/supplier journals, inventory journals.
- **Cashbook**: Cashbook and cashbook entry workflows, daily transaction reporting.
- **Inventory**: Inventory categories, stock movements, transfers, stock valuation, stock level, stock management reporting.
- **Documents**: Document previews, reprints, and PDF generation (where configured).
- **Reporting**: Sales analysis, project listing, warehouse transfer, inventory movement, and more via exportable reports.

## Tech Stack

- **Backend**: PHP ^8.1, Laravel ^10
- **Auth**: `laravel/ui` auth scaffolding + `laravel/sanctum` (API tokens when enabled)
- **PDF**: `barryvdh/laravel-dompdf`
- **Frontend**: Vite, Bootstrap 5, Axios, Sass
- **Data**: MySQL (default), Redis (optional)

## Getting Started (Local Development)

### Prerequisites

- PHP 8.1+
- Composer
- Node.js + npm
- MySQL (or compatible database)

### Setup

```bash
composer install
cp .env.example .env
php artisan key:generate
```

Configure your database connection in `.env`, then run:

```bash
php artisan migrate
php artisan db:seed   # optional (only if seeders are configured)
```

Install frontend dependencies and build assets:

```bash
npm install
npm run dev
```

Start the application:

```bash
php artisan serve
```

## Environment Configuration

Key `.env` variables you will typically set:

- `APP_NAME`, `APP_ENV`, `APP_URL`
- `DB_CONNECTION`, `DB_HOST`, `DB_PORT`, `DB_DATABASE`, `DB_USERNAME`, `DB_PASSWORD`
- `REDIS_HOST`, `REDIS_PORT` (optional)

## Testing

```bash
php artisan test
```

## Deployment Notes

- Run `php artisan config:cache` and `php artisan route:cache` in production.
- Ensure `storage/` and `bootstrap/cache/` are writable.
- Use a process manager (e.g., Supervisor) if queue workers are enabled.
- Configure HTTPS and secure cookies for production environments.

## Team

- **Lead Engineer**: Marcus Ruhinga
- **Deputy Lead Engineer**: Tadiwa Ashley Gwena

## Support & Contact

- Email: `info@melsoftzim.co.zw`
- Website: https://melsoftzim.co.zw

## Security

If you discover a security vulnerability, please report it privately to the maintainers and avoid opening a public issue with sensitive details.

## License

Copyright © Melsoft Private Limited.

This codebase is provided under the terms specified in this repository’s license (if present). If no license file is included, treat the source as proprietary by default.
