# SNYT ERP — Project Status

**Last verified:** 2026-10-19
**Baseline commit:** `d85fc58c8ee040cc0e875c893350dd0460ad0e81`

## Architecture

- Backend: Laravel 12 / PHP 8.2+ / MariaDB.
- Independent installation and database per customer.
- Multiple legal companies are required inside an installation.
- Flutter remains a separate repository; mobile builds require a separate build service.
- ERP document root is `ERP/public`.
- Catalog and Van production applications are out of scope and were not changed.
- Core workflows must remain functional without AI.

## Verified foundation

- Production environment and database connection are operational.
- All 13 repository migrations are recorded as applied.
- Git working tree was clean and both configured remotes referenced the same baseline commit.
- Protected pre-P0 database and application backups were created on 2026-10-19.
- A non-public staging working copy was created at `/home/snyt/public_html/SubDomain/ERP/storage/app/private/SNYT-ERP-p0-p1`.

## Existing prototype

- Companies, branches and memberships
- Roles, permissions, departments, assignments, teams and activation links
- Partial access audit logging
- Products, categories, catalogs, images and CSV/XLSX preview/import
- Authenticated Blade administration pages

These items are prototypes, not completed roadmap phases.

## Critical remediation

- Remove all first-company assumptions and implement validated active-company context.
- Add warehouse ownership and warehouse-scoped authorization.
- Move business authorization into policies/services and cover it with isolation tests.
- Standardize immutable audit events.
- Define the product-master boundary before extending product tables.
- Add versioned API conventions before Flutter integration.

## Current phase

P0 baseline and architecture hardening is in progress on branch `p0-p1-baseline`. No new production migration is authorized until staging tests and the P1 schema review are complete.

See `P0_BASELINE_AUDIT.md` and `docs/adr/`.
