# ArtWall — Multi-Tenant Art Gallery Platform

A PHP/MySQL SaaS platform where art galleries manage their artwork catalogues, and the public browses/discovers artworks across all participating galleries. Three user roles: public visitors (no login), gallery admins (tenant staff managing their own gallery), and a superadmin (platform operator).

**Full technical documentation lives in [`docs/`](docs/README.md) — start there.** This file is a short orientation only; `docs/` is the maintained, authoritative reference (architecture, full database schema, security model, and complete feature list), kept in sync with the code as a standing requirement (see [`CLAUDE.md`](CLAUDE.md)).

> Several other `.md` files at this repository's root (`00_READ_ME_FIRST.md`, `PROJECT_STATUS.md`, `PAGES_BUILT.md`, `ADMIN_FEATURES.md`, and others) are historical planning/status notes from earlier development phases and have drifted from what the code actually does today — treat `docs/` as the source of truth, not those files.

## Quick facts

- **Stack:** PHP 8.2, MySQL/MariaDB via PDO, Bootstrap 5.3, vanilla JS (no build step), TCPDF, AWS SDK for PHP. See [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md).
- **Local dev:** XAMPP on Windows, no git repository.
- **No automated test suite** — verification is manual (`php -l`, Playwright browser sessions, direct SQL checks). Don't assume a CI pipeline exists.

## Getting started (local XAMPP)

1. Copy `.env.example` to `.env` and fill in DB credentials + any service keys you have (AWS S3, Midtrans — both optional, features degrade gracefully without them).
2. Create the database and run migrations in order: `database/schema.sql` is a rough historical baseline only (**it does not match the live database** — see [`docs/DATABASE.md`](docs/DATABASE.md) for why), so after loading it, run every `scripts/run-migration-0XX-*.php` script in numeric order (`php scripts/run-migration-001-....php`, etc.) — each is idempotent.
3. Visit `http://localhost/artwall/public/` (visitor site), `http://localhost/artwall/gallery/` (tenant login), `http://localhost/artwall/admin/` (superadmin login).

## Where to go next

| Question | Read |
|---|---|
| "How is this app structured / what's the tech stack?" | [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md) |
| "What does table X actually look like / does column Y exist?" | [`docs/DATABASE.md`](docs/DATABASE.md) |
| "What are the security rules I need to follow when adding code?" | [`docs/SECURITY.md`](docs/SECURITY.md) |
| "What does this product actually do today?" | [`docs/FEATURES.md`](docs/FEATURES.md) |

## License

Proprietary.
