|
|
|
@@ -4,9 +4,9 @@ This is an Acai CMS website project. Follow these instructions when working with
|
|
|
|
|
|
|
|
|
|
## Environment
|
|
|
|
|
|
|
|
|
|
- The site runs in Docker, typically at **http://localhost:8080**
|
|
|
|
|
- You can make HTTP requests to test pages, APIs, or form submissions
|
|
|
|
|
- If you need to inspect the live site, use browser tools (Playwright MCP) or HTTP requests to localhost:8080
|
|
|
|
|
- The site runs on Acai Forge — get the live editable URL with the `get_web_url` MCP tool (never assume a fixed domain)
|
|
|
|
|
- You can make HTTP requests to test pages, APIs, or form submissions against that URL
|
|
|
|
|
- If you need to inspect the live site, use browser tools (Playwright MCP) or HTTP requests to the Forge URL
|
|
|
|
|
|
|
|
|
|
## Project Structure
|
|
|
|
|
|
|
|
|
@@ -28,13 +28,7 @@ This is an Acai CMS website project. Follow these instructions when working with
|
|
|
|
|
│ ├── data/schema/ # Database table schemas (JSON)
|
|
|
|
|
│ ├── lib/plugins/ # CMS plugins
|
|
|
|
|
│ └── uploads/ # Uploaded media files
|
|
|
|
|
├── .acai # Project config (domain, tokens, DB credentials)
|
|
|
|
|
├── .docker/
|
|
|
|
|
│ ├── .env # Docker environment (DB credentials)
|
|
|
|
|
│ ├── docker-compose.yml
|
|
|
|
|
│ ├── tunnel-url.txt # Public tunnel URL (if active)
|
|
|
|
|
│ └── bore-db-url.txt # Database tunnel URL (if active)
|
|
|
|
|
└── database.sql # Database dump
|
|
|
|
|
└── .acai # Project config (domain, tokens, DB credentials)
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Key Concepts
|
|
|
|
@@ -89,28 +83,9 @@ Rule of thumb:
|
|
|
|
|
|
|
|
|
|
See [docs/hooks-and-api.md](docs/hooks-and-api.md) for usage.
|
|
|
|
|
|
|
|
|
|
## Database Access
|
|
|
|
|
|
|
|
|
|
When the site is running in Docker, you can connect to the database:
|
|
|
|
|
|
|
|
|
|
- **Host:** `127.0.0.1`
|
|
|
|
|
- **Port:** Check `.docker/docker-compose.yml` for the mapped port (usually 3307+)
|
|
|
|
|
- **Credentials:** Read from `.docker/.env`:
|
|
|
|
|
- `DB_USERNAME`
|
|
|
|
|
- `DB_PASSWORD`
|
|
|
|
|
- `DB_DATABASE`
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
docker exec -it dw-<project-name>-db mysql -u root -p<password> <database>
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
**Important:** Table names in CmsApi/Twig do NOT use the `cms_` prefix. The primary key is always `num`, never `id`.
|
|
|
|
|
|
|
|
|
|
## Acai Core (web-base)
|
|
|
|
|
|
|
|
|
|
The project workspace contains only the **customization layer** (modules, hooks, schemas, uploads). The CMS core (routing, rendering engine, admin panel, APIs) lives in a separate directory called **web-base** that is mounted as a Docker volume.
|
|
|
|
|
|
|
|
|
|
The web-base path can be obtained via: `GET http://localhost:9090/api/web-base-path`
|
|
|
|
|
The project workspace contains only the **customization layer** (modules, hooks, schemas, uploads). The CMS core (routing, rendering engine, admin panel, APIs) lives in a separate, shared directory called **web-base**.
|
|
|
|
|
|
|
|
|
|
Do NOT modify web-base files — they are shared across all projects.
|
|
|
|
|
|
|
|
|
|