# Sterna Service Manager

Internal web application for the printing company **Стерна** — manages printers,
customers, and service history, replacing the previous Excel workflow.

Phase 1 provides the foundation: authentication, roles (Administrator /
Technician), the corporate white/red UI, and a scalable architecture. Business
modules and the QR workflow arrive in later phases.

## Requirements
- PHP 8.3+
- Composer, Node 20+
- SQLite (local) / MariaDB (production)

## Local setup
```bash
composer install
npm install
cp .env.example .env
php artisan key:generate
touch database/database.sqlite
php artisan migrate --seed
npm run build      # or: npm run dev
php artisan serve
```
Seeded logins: `admin` / `password`, `tehnicar` / `password`.

## Production deployment (cPanel / Apache / MariaDB)
1. Upload the project; point the domain's document root at `public/`.
2. `composer install --no-dev --optimize-autoloader`
3. Configure `.env` for MariaDB (see the commented block in `.env.example`).
4. `php artisan key:generate` (once), `php artisan migrate --force`
5. `npm ci && npm run build` (or build locally and upload `public/build`).
6. `php artisan storage:link`
7. `php artisan config:cache && php artisan route:cache && php artisan view:cache`

## Roles
- **Administrator** — full access (all navigation modules), lands on the dashboard.
- **Technician** — no dashboard; lands on a mobile-first printer search/scan
  screen instead.

Roles are a `UserRole` enum stored on `users.role`, enforced via the `role:`
middleware. The UI is in Macedonian throughout; users authenticate with a
username (not an email address).
