You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Saaster is a CFML-based SaaS framework using Lucee 6, NGINX, and MySQL 8.1, containerized via Docker Compose. The codebase is modular, with clear separation between API, frontend, backend, and setup logic. Configuration is flexible and environment-driven.
5
+
6
+
## Architecture
7
+
-**Core directories:**
8
+
-`www/`: Main web app (entry points, config, API, resources)
9
+
-`api/`: API endpoints, JWT auth, Taffy REST framework
10
+
-`frontend/`: UI, themes, mail templates
11
+
-`backend/`: Admin, modules, business logic
12
+
-`setup/`: Installation wizard, mock data loader
13
+
-`config/`: Environment, NGINX, DB migrations, backups
14
+
-**Database migrations:**
15
+
- SQL files in `config/db/core/` and `config/db/dev/` for schema and test data
16
+
-**Modularity:**
17
+
- Features are added via modules in `backend/modules/`
18
+
19
+
## Developer Workflow
20
+
-**Local setup:**
21
+
- Use `compose-dev.yml` with Docker Compose
22
+
- Copy and edit config files from `config/` as described in the README
23
+
- Access Lucee admin at `/lucee/admin/server.cfm` for DB and SMTP setup
24
+
- Run setup wizard at `/setup/index.cfm` to initialize app and create sysadmin
25
+
-**Reload config:**
26
+
- Visit `/index.cfm?reinit=1` after changing `config.cfm`
27
+
-**Test data:**
28
+
- Import SQL from `config/db/dev/` or use `/setup/mockdata/index.cfm`
29
+
-**Custom Docker image:**
30
+
- Commit configured Lucee container and update `.env` with new image name
31
+
32
+
## Conventions & Patterns
33
+
-**CFML/CFM:**
34
+
- Application logic in `.cfc` (components), views in `.cfm` (templates)
35
+
- API follows Taffy REST conventions in `api/taffy/`
36
+
- JWT auth in `api/jwt/`
37
+
-**Config:**
38
+
- Environment variables in `.env`, app config in `www/config.cfm`
39
+
- NGINX config in `config/nginx/conf.d/`
40
+
-**Modules:**
41
+
- Extendable via `backend/modules/` and `api/jwt/models/`
42
+
-**Testing:**
43
+
- Manual via setup wizard and mock data; no automated test suite detected
44
+
45
+
## Integration Points
46
+
-**External:**
47
+
- SMTP (local via Inbucket)
48
+
- MySQL DB
49
+
- NGINX reverse proxy
50
+
-**Internal:**
51
+
- API endpoints communicate via REST (Taffy)
52
+
- Frontend and backend share config and DB
53
+
54
+
## Examples
55
+
- To add a new API endpoint: create a `.cfc` in `api/resources/` and register in Taffy
56
+
- To add a module: place in `backend/modules/` and wire up in config
57
+
- To update DB schema: add migration SQL to `config/db/core/`
- Comments and documentation should be in english. Never use german in code comments.
66
+
- Follow standard ColdFusion (Lucee 6) best practices script based.
67
+
- Use 4 spaces for indentation, no tabs.
68
+
- Instead of `var`, always use `local` to declare local variables, but only in functions.
69
+
- Instead of 'for' loops, prefer the cf tag 'loop'.
70
+
- In CF Script, SQL queries must always be built in this order: options, params, sql. The types should be like: {type: "string", value: arguments.importUUID}
0 commit comments