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
{{ message }}
Repository navigation
Commit decfac6
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: AGENTS.md
+19-42Lines changed: 19 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,9 +29,9 @@ This document provides essential context for AI models interacting with this pro
29
29
-`/src/hooks`: Custom React hooks (e.g., `useFuseSearch.ts` for fuzzy search).
30
30
-`/src/store`: Zustand state management store.
31
31
-`/src/lib`: Utility functions and helpers.
32
-
-`/build-scripts`: Advanced meta.json processing tools with CLI options and JSON schema validation.
32
+
-`/build-scripts`: Metadata tooling — `generate-meta.js` (aggregates and validates every `blueprints/<id>/meta.json` into the served `meta.json` artifact) and `explode-meta.js` (one-shot migration reference).
33
33
-`/.github/workflows`: CI/CD workflows for validation, preview builds, and deployments.
- Root level: There is NO root `meta.json` in the repo — each template's metadata lives in `blueprints/<id>/meta.json` and the global registry is generated at build time.
35
35
-**Module Organization:** Node.js scripts for metadata processing, React components for frontend UI, Docker Compose files for service definitions, TOML files for Dokploy configuration. Frontend uses component-based architecture with hooks for business logic and Zustand for global state.
36
36
37
37
## 4. Coding Conventions & Style Guide
@@ -42,7 +42,7 @@ This document provides essential context for AI models interacting with this pro
- Template IDs: lowercase, kebab-case (`activepieces`, `ghost`) - **MUST** be unique across repository
45
-
- Files: snake_case for scripts (`dedupe-and-sort-meta.js`), PascalCase for React components (`TemplateGrid.tsx`), kebab-case for directories (`build-scripts`)
45
+
- Files: kebab-case for scripts (`generate-meta.js`), PascalCase for React components (`TemplateGrid.tsx`), kebab-case for directories (`build-scripts`)
46
46
- Docker services: **MUST** match blueprint folder name exactly (e.g., `ghost` service in `blueprints/ghost/`)
47
47
-**API Design:**
48
48
-**Backend:** Procedural scripting approach with CLI interfaces. Template system uses declarative configuration over imperative code.
@@ -65,17 +65,15 @@ This document provides essential context for AI models interacting with this pro
65
65
## 5. Key Files & Entrypoints
66
66
67
67
-**Main Entrypoints:**
68
-
-**Backend:**`dedupe-and-sort-meta.js` - Primary script for processing meta.json file.
68
+
-**Backend:**`build-scripts/generate-meta.js` - Aggregates and validates all `blueprints/<id>/meta.json` files into the served `meta.json` artifact (`app/public/meta.json`, gitignored).
-`.github/workflows/validate-meta.yml` - Validates meta.json structure, duplicates, and sort order.
76
+
-`.github/workflows/validate-meta.yml` - Validates every `blueprints/<id>/meta.json` (via `generate-meta.js --check`) and rejects a committed root `meta.json`.
79
77
-`.github/workflows/build-preview.yml` - Builds preview deployments for PRs.
80
78
-`.github/workflows/deploy-preview.yml` - Deploys previews to Cloudflare Pages.
81
79
@@ -92,58 +90,37 @@ This document provides essential context for AI models interacting with this pro
92
90
cd app && pnpm install
93
91
```
94
92
95
-
- **Process meta.json** (CRITICAL: Run after ANY meta.json edits)
93
+
- **Validate template metadata** (CRITICAL: run after adding/editing any `blueprints/<id>/meta.json`)
96
94
```bash
97
-
npm run process-meta
98
-
# or
99
-
make process-meta
100
-
# or
101
-
node dedupe-and-sort-meta.js
95
+
node build-scripts/generate-meta.js --check
102
96
```
103
-
- **Validate without modifying**
97
+
- **Generate the served meta.json artifact** (done automatically by `pnpm dev` / `pnpm build`in`app/`)
- TypeScript compilation errors caught during build
133
110
- ESLint forcode qualityin frontend
134
111
- **CI/CD Process:**
135
-
- **On meta.json changes:** Validates structure, checks for duplicates, verifies sort order, compares processed vs original.
112
+
- **On blueprint changes:** Validates each template's metadata (required fields, id/folder match, logo file exists) and rejects a committed root `meta.json`.
136
113
- **On PR creation:** Builds preview deployment, generates base64 import for testing in Dokploy.
137
114
- **Preview testing:** Use PR description link → Search template → Copy base64 → Import in Dokploy instance.
138
115
139
116
## 7. Specific Instructions for AI Collaboration
140
117
141
118
- **Contribution Guidelines:**
142
119
- Follow existing Dokploy template structure strictly. Each blueprint must be independent with no shared state.
143
-
- **CRITICAL:**Always run `node dedupe-and-sort-meta.js`or `npm run process-meta` after ANY meta.json edits.
120
+
- **CRITICAL:** Template metadata lives in `blueprints/<id>/meta.json` (one object per template). Never create or edit a root-level `meta.json` — it is generated at build time. Run `node build-scripts/generate-meta.js --check` after any metadata edits.
144
121
- Test templates in Dokploy preview before submitting PRs (use base64 import from PR preview).
145
122
- Add logo file (SVG preferred, ~128x128px) to blueprint folder.
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,16 +73,16 @@ To add a new template, follow these steps:
73
73
"""
74
74
```
75
75
76
-
4. **Update `meta.json`**: Add an entry for your template in the root `meta.json`. Include:
76
+
4. **Add `meta.json` in your template folder**: Create `blueprints/<id>/meta.json` with a single JSON object describing your template. Do NOT create or edit a root-level `meta.json` — the global registry is generated automatically at build time from every `blueprints/<id>/meta.json` (this is what makes template PRs conflict-free). Include:
77
77
78
-
- `id`: Folder name (e.g., "grafana").
78
+
- `id`: Folder name (e.g., "grafana") — must match the folder exactly.
79
79
- `name`: Display name.
80
80
- `version`: Image/tag version.
81
81
- `description`: Brief overview.
82
82
- `logo`: Filename of the logo (e.g., "grafana.svg").
83
-
- `links`: Object with `github`, `website`, `docs` (URLs).
83
+
- `links`: Object with `github`, `website`, `docs` (URLs; use `""` if not applicable).
84
84
- `tags`: Array of categories (e.g., ["monitoring"]).
85
-
- Example:
85
+
- Example (`blueprints/grafana/meta.json`):
86
86
```json
87
87
{
88
88
"id": "grafana",
@@ -101,7 +101,7 @@ To add a new template, follow these steps:
101
101
102
102
5. **Add a Logo**: Place an SVG or PNG logo (e.g., `grafana.svg`) in the template folder. Keep it simple and representative (ideally 512x512 or similar).
103
103
104
-
6. **Run Validation**: Before pushing, run `node dedupe-and-sort-meta.js` (if available) or manually check for syntax errors in YAML/TOML/JSON.
104
+
6. **Run Validation**: Before pushing, run `node build-scripts/generate-meta.js --check` to validate every template's metadata (same check CI runs), and manually check for syntax errors in YAML/TOML.
105
105
106
106
7. **Commit and PR**: Push your branch and open a PR. Include:
107
107
- A description of the template.
@@ -195,7 +195,7 @@ If issues arise, debug locally or in the preview. Fix and update your PR.
195
195
## Updating Existing Templates
196
196
197
197
- Follow the same structure as adding new ones.
198
-
- Bump `version` in `meta.json` and update `docker-compose.yml` image tags.
198
+
- Bump `version` in the template's `blueprints/<id>/meta.json` and update `docker-compose.yml` image tags.
0 commit comments