- DevCraft Platform
- Documentation
- Development guide
Contributing
Development guide
This guide is for developers who change DevCraft Platform itself: where code lives, the rules every change must respect, the API conventions, the quality gates, and step-by-step recipes for the most common extensions. It assumes you have the local stack running as described in Getting started.
Repository layout
| Path | Contents |
|---|---|
backend/ | Laravel 12 API on PHP 8.4. Application code under app/Platform/<Module>; there is no app/Http. |
backend/config/platform.php | Platform settings (administrator, lockout, scripts, logs, transfer, packages, remote limits). |
backend/database/ | Migrations, factories, seeders. seeders/Platform/ holds the baseline family seeders; DemoDataSeeder.php the fictional demo records. |
backend/routes/api.php | All /api/v1 routes. routes/console.php: platform Artisan commands and the schedule. |
backend/tests/ | Pest: Feature (with RefreshDatabase), Unit, Arch (architecture rules). |
frontend/ | Vue 3 + TypeScript (strict) + Vite + Tailwind 4 + shadcn-vue (reka-ui) + TanStack Table + Pinia + Vue Router. |
runner/ | Background script runner: server.mjs, worker.mjs, test/. Node only, no npm dependencies. |
scripts/ | backend-test.sh, check-baseline.mjs. |
docs/ | Architecture, data model, security, roadmap, one document per feature area, docs/adr/ (decision records) and docs/analysis/ (baseline provenance). |
.github/workflows/ci.yml | The CI pipeline. |
compose.yaml | Local stack: api, scheduler, runner, pgsql, redis, mailpit. |
Backend modules
Each module under backend/app/Platform has its own Http, Models and Exceptions folders as needed.
| Module | Responsibility (main classes) |
|---|---|
Kernel | Request id middleware (AssignRequestId), problem details (ProblemDetails), PlatformException and its subclasses, ExecutionContext, identifier rules, health. Must not depend on feature modules. |
Access | Users, roles, authentication (Sanctum), tokens, RoleResolver, ExecutionContextFactory. |
Metadata | Dictionary: MetadataRepository (cached schemas), MetadataWriter, FieldTypes/, ConfigurationCatalog, LayoutResolver, form and list renderers, /meta and admin controllers. |
Records | RecordQuery, RecordWriter, Storage/ drivers (JsonbStorage, PhysicalStorage), Access/ (TableAccess, FieldAccess), Capture/RecordCapture, numbering, the Table API controller. |
Configuration | Versioning (ConfigVersioning), update sets (ChangeSetService), deterministic ids, canonical JSON. Must not depend on Metadata, Records or Access. |
Audit | AuditWriter. Same independence rule as Configuration. |
Logging | SystemLogger, LogContext, ContextSanitizer, LogPruner. |
Transfer | XML record export and import. |
Packaging | Update set packages: builder, parser, validator, previews. |
Remote | Remote instances, remote update sets, conflict resolution, application. |
Scripting | ScriptRunner and the admin scripts API. |
Portal | The Service Portal's server-side "mine" scope. |
Frontend folders (frontend/src)
| Folder | Contents |
|---|---|
api/ | contracts.ts, index.ts (mock or HTTP binding, liveContracts), http/, mock/ (mock datasets in mock/data). |
pages/ | Route components: records/ (generic list and form), config/ (update sets, packages, remote update sets), platform/ (Background Scripts, Flow Designer), settings/, prototype pages. |
records/ | Adapters for the generic screens: listColumns.ts, listUrlState.ts, encodedQuery.ts, recordRows.ts, actions/ (action registry). |
components/ | ui/ (shadcn-vue primitives, project code), data-table/, forms/, layout/, transfer/, remote/, code/ (Monaco), common/. |
definitions/ | ListDefinitions and FormDefinitions of the prototype screens, preferences.ts. |
navigation/ | modules.ts (module registry), navigation.ts (navigator). |
router/ | routes.ts, links.ts (route helpers, RESERVED_SEGMENTS). |
stores/ | Pinia stores (session, preferences, update sets, …). |
composables/ | usePreferenceEffects, useConfirm, … |
flows/ | Flow Designer document, registry and canvas. |
portal/ | Service Portal shell and pages. |
scripting/ | devcraft.d.txt, the DevCraft script API declarations. |
lib/, types/, assets/ | Helpers (formatting, downloads), shared types, main.css with tokens and pref-* classes. |
Icons come from @lucide/vue, not the deprecated lucide-vue-next.
Non-negotiable rules
These rules keep the metadata engine secure and consistent. Several are enforced by architecture tests in backend/tests/Arch/ArchitectureTest.php; the others are enforced in review.
| Rule | Why | Enforcement |
|---|---|---|
Every record read goes through RecordQuery, every record write through RecordWriter. No alternative paths. | Table access, field projection, validation, references, numbering, capture into update sets and audit live there. A second path would skip some of them. | review |
Every dictionary write goes through MetadataWriter. | It validates, versions (sys_config_version), captures into the current update set, audits and invalidates the metadata cache. | review |
| Table and field names come only from the metadata cache, never from request input into SQL. | The engine builds SQL from admin-defined names. A request names a field; the engine looks it up and fails with 400 before any SQL exists if it is unknown. Names pass ^[a-z][a-z0-9_]{0,62}$ at metadata write time. | design of RecordQuery and the drivers |
No DB::raw or query Expression outside App\Platform\Records\Storage (and, later, the schema synchronizer package). | The storage drivers are the only place where query expressions are built, from dictionary identifiers only. | architecture test: Illuminate\Database\Query\Expression only in App\Platform\Records\Storage |
No eval, exec, shell_exec, passthru, system, dd, dump, var_dump, print_r, ray. | No dynamic code execution in the platform process. Scripts run only in the runner. | architecture test |
| Records are not Eloquent models. | Eloquent assumes a static schema; records follow the dictionary. Eloquent is for Laravel-internal tables, the dictionary models (Metadata/Models, written only through MetadataWriter) and the thin auth User. | architecture test: nothing in App\Platform\Records extends Model |
| Access is deny by default and applies to filters, sorts and dot-walk hops, not only to output. | A filter on a field you cannot read is an oracle. A table without roles is reachable by admin only. A hidden field is indistinguishable from a field that does not exist. | TableAccess, FieldAccess, RecordWriter |
Controllers resolve a table with TableController::resolve (visible projection) or TableController::resolveFull (writers only). Never read a TableSchema for a request from the repository directly. | resolve applies table read access and removes unreadable fields; resolveFull returns the complete schema so RecordWriter can validate fields the caller cannot see. Unknown and retired tables look identical. | review |
admin and elevated roles are never derived from groups. | A user who can edit group membership must not be able to escalate anyone into administration. | RoleResolver |
Platform events are logged through the injected SystemLogger, never through Log:: directly and never into sys_audit. | SystemLogger redacts, bounds values, persists to syslog from the configured level and never fails the operation that logged. | review |
Only ConfigurationCatalog decides what is configuration. | Dictionary kinds plus records of configuration and environment tables, with one exclusion list. Captures happen inside the writers' transactions. | review |
| The Kernel does not depend on feature modules; Configuration and Audit know nothing about the dictionary or records. | Keeps the module graph acyclic. | architecture tests |
The security model behind these rules is described in Access control; the engine itself in Metadata engine.
API conventions
- Base path
/api/v1. Breaking changes create/api/v2; additive changes stay in v1. - Bodies are JSON with
camelCasekeys in responses, ISO 8601 timestamps with offset, UUID identifiers. Single objects are returned unwrapped; lists use{ items, total, page, pageSize }. - Authentication is a Sanctum session cookie (SPA:
GET /sanctum/csrf-cookiefirst, then sendX-XSRF-TOKEN) orAuthorization: Bearer <token>. - Errors are RFC 9457
application/problem+jsonwith a stable machine-readablecodeand therequestId. - Correlation: every response carries
X-Request-IdandX-Correlation-Id. A caller-supplied value of 8 to 64 characters from[A-Za-z0-9._-]is echoed and logged; otherwise the server generates one. - Rate limits:
throttle:api120 requests per minute per user or IP;throttle:login5 per minute per e-mail and IP.
{
"type": "about:blank",
"title": "Validation failed.",
"status": 422,
"detail": "...",
"instance": "/api/v1/auth/login",
"code": "validation_failed",
"requestId": "0192f...",
"errors": { "email": ["The e-mail address or password is incorrect."] }
}
To return a new error, throw a subclass of App\Platform\Kernel\Exceptions\PlatformException that fixes the status, the problemCode and the title; the message becomes detail and $extra adds members such as errors. ProblemDetails renders it. Plain HTTP exceptions map to generic codes (unauthenticated, forbidden, not_found, conflict, csrf_token_mismatch, account_locked, rate_limited, …). Clients depend on codes, so never rename one. The full list is in the REST API reference.
Quality gates
Run all relevant gates before finishing a change, and report only what actually ran.
| Gate | Command | Notes |
|---|---|---|
| Backend tests | scripts/backend-test.sh | Pest on PostgreSQL (devcraft_test) and on SQLite in memory. Arguments go to php artisan test, e.g. scripts/backend-test.sh --filter RecordWriter. BACKEND_TEST_DB=pgsql or sqlite runs one database only. |
| Code style | docker compose exec api vendor/bin/pint --test | Laravel preset (backend/pint.json). |
| Static analysis | docker compose exec api vendor/bin/phpstan analyse --memory-limit=1G | Larastan, level 6, over app, database, routes. |
| Frontend | npm run typecheck, npm run lint, npm test, npm run build (in frontend/) | vue-tsc -b (strict, noUncheckedIndexedAccess), ESLint, Vitest, production build. |
| Runner | npm test (in runner/) | Node's built-in test runner over test/*.test.mjs. |
| Baseline guard | node scripts/check-baseline.mjs (repository root) | Run before finishing any task; see Baseline and demo-data policy. |
Why scripts/backend-test.sh and never plain php artisan test
Inside the api container the Compose environment sets APP_ENV=local, the development database and Redis. phpunit.xml defaults to SQLite but does not force the database connection, and the feature tests use RefreshDatabase. A plain docker compose exec api php artisan test would therefore run against, and wipe, your development database and share the Redis cache with the running instance.
The script prevents that. It creates devcraft_test in the pgsql service when missing, then runs the suite twice with test-only settings passed explicitly:
-e APP_ENV=testing -e CACHE_STORE=array -e SESSION_DRIVER=array -e QUEUE_CONNECTION=sync \
-e MAIL_MAILER=array -e LOG_CHANNEL=null -e BCRYPT_ROUNDS=4
# pass 1: -e DB_CONNECTION=pgsql -e DB_DATABASE=devcraft_test
# pass 2: -e DB_CONNECTION=sqlite -e DB_DATABASE=:memory:
Running on both PostgreSQL and SQLite keeps the storage drivers honest on both JSON dialects.
Continuous integration
.github/workflows/ci.yml runs on every push to main and on every pull request, cancelling superseded runs of the same ref. Four jobs:
| Job | Steps |
|---|---|
| OOTB baseline guard | Node 24, node scripts/check-baseline.mjs. |
| Frontend | Node 24, npm ci, typecheck, lint, test, build. |
| Script runner | Node 24, npm test in runner/. |
| Backend | PHP 8.4 with a postgres:17-alpine service: composer install, Pint (--test), PHPStan level 6, migrations against PostgreSQL, Pest on PostgreSQL, then Pest on SQLite in memory. |
Recipes
Add a field type
A field type knows how to validate its configuration, coerce values, which operators it supports, how the JSON store compares it, and how the SPA renders it.
Create a class in
backend/app/Platform/Metadata/FieldTypes/implementingFieldType, usually by extendingAbstractFieldType. Implementkey(),coerce()(throwInvalidFieldValuefor bad values),operators()(constants ofOperator) andfrontendType(). OverridenormaliseAttributes()(userejectUnknownAttributes,optionalInt,optionalEnum),comparisonKind()(text,numericorboolean),sortable(),columnRenderer()andfilterKind()(text,boolean,selector null) as needed.Register an instance in the constructor of
FieldTypeRegistry. The registry is a singleton (AppServiceProvider) shared byMetadataWriter,RecordQuery,RecordWriter, the storage drivers, the renderers and the package validator.List column defaults need no client code.
FieldResourcebuilds thecolumnobject (sortable,renderer,filter,filterOptions) from the type'ssortable(),columnRenderer()andfilterKind(), the same mapping the list renderer applies. The SPA's column personalisation (src/records/listColumns.ts) uses it for any dictionary field. Keep that mapping in the backend type.On the frontend, add the key to
DictionaryFieldTypeinsrc/types/metadata.ts.frontendType()must return an existingFieldTypefromsrc/types/fields.tsandcolumnRenderer()an existingColumnRendererfromsrc/types/list.ts; add a renderer there only if none fits. Handle default parsing insrc/records/recordRows.tsif the stored form is not a plain string.Add unit tests for coercion and attributes and a feature test that creates a field of the type through the admin API and filters on it. Run the full gates.
Add a baseline table with a family seeder
Shipped metadata lives in the family seeders under backend/database/seeders/Platform/. They extend MetadataSeeder.
Establish provenance first. Every table and field in the seeders must be traceable in the baseline provenance analysis in
docs/analysis/, with a provenance mark: V verified in official public documentation, C community-sourced, D DevCraft decision, U unknown. Do not add fields or choice values without a source row there. If the status is unclear, do not add the item: document the uncertainty and ask.Pick the family seeder (
IdentitySeeder,AssetSeeder,CmdbSeeder,TaskSeeder,SystemTablesSeeder) or create a new class and add it toPlatformMetadataSeeder::FAMILIESin dependency order (referenced tables first).In
run(), call$this->boot(), then use the helpers. Each one creates the object only when it is missing and derives a deterministic id from its package key (DeterministicId::forKey):$table = $this->table([ 'name' => 'example_item', 'label' => 'Example item', 'label_plural' => 'Example items', 'display_field' => 'name', 'data_class' => 'operational', 'access' => ['read' => ['itil'], 'write' => ['itil'], 'delete' => []], ]); $this->fields($table, [ ['name' => 'name', 'label' => 'Name', 'type' => 'string', 'max_length' => 160, 'mandatory' => true, 'order' => 10], ['name' => 'owner_id', 'label' => 'Owner', 'type' => 'reference', 'reference_table' => 'sys_user', 'on_delete' => 'set_null', 'order' => 20], ]); $this->form($table, 'default', 'Example item', [ self::section('main', 'Example item', ['name'], ['owner_id']), ]); $this->list($table, 'default', 'Example items', [ 'columns' => [['field' => 'name', 'min_width' => 200], ['field' => 'owner_id', 'min_width' => 160]], 'default_sort' => [['field' => 'name', 'direction' => 'asc']], ]);Child tables use
'extends' => 'parent'; change an inherited field with$this->override()(which callsMetadataWriter::overrideField), never by redeclaring it. Numbering is thenumbertable attribute (['prefix' => …, 'digits' => …, 'start' => …]), composite uniqueness isunique_together, andmanaged_bymakes an adopted table read-only through the Table API. Reference data goes through$this->record(), which skips existing rows.Respect the naming rules: identifiers match
^[a-z][a-z0-9_]{0,62}$, and PostgreSQL reserved words (user,group,order,unique) are not allowed as field names; useuser_id,group_id.Never overwrite existing objects: the helpers are additive so instance customisations survive a re-seed. A change to an already shipped definition reaches installed instances only on a fresh seed or through the admin API.
Add a navigator entry if the table needs one (see Add a page or route; dictionary tables use
tableItem). Seed, check/{table}/list, run the gates and the baseline guard.
Add demo data
Add records to
backend/database/seeders/DemoDataSeeder.php, never to the platform seeders. Demo data stays apart from platform configuration and metadata.DatabaseSeederruns it only whenAPP_ENV=local.Write through
RecordWriterwithExecutionContext::cli(), as the existing methods do, so validation, references, numbering and audit apply. Keep the seeder idempotent (match by a natural key before creating).Use fictional, varied people and fictional organisations, departments, teams and locations. E-mail addresses use reserved example domains only:
example.com,example.org,example.netor a.examplesubdomain.Never hardcode a password anywhere: not in seeders, fixtures, tests or documentation.
Run
node scripts/check-baseline.mjs: it rejects e-mail addresses outside the allowed domains in demo-data locations (frontend/src/api/mock,backend/database,backend/tests, frontend test files).
Add a List or Form action
Every menu item of the generic list and form is a registered action. Menus render actionsFor(scope, context) and never hard-code items.
Create a module in
frontend/src/records/actions/(table-specific actions get their own file, likeremoteInstances.ts) and import it fromactions/index.tsso it registers at import time.Declare each
RecordAction: a stableid,label,iconfrom@lucide/vue,scopes(cell,header,list,selection,record),group(filter,sort,navigate,copy,configure,transfer,danger; rendered in that order with separators), optionalorder,tables,enabled,destructive, and the requiredappliesandrun.import { RotateCcw } from '@lucide/vue' import { api, liveContracts } from '@/api' import { registerActions } from './registry' registerActions([ { id: 'example.reopen', label: 'Reopen', icon: RotateCcw, scopes: ['record'], group: 'configure', tables: ['example_item'], destructive: true, applies: (ctx) => ctx.permissions.canWrite && liveContracts.includes('records') && ctx.record !== undefined, run: async (ctx) => { const ok = await ctx.confirm({ title: 'Reopen this item?', description: 'The item returns to the open state.', confirmLabel: 'Reopen', destructive: true }) if (!ok) return const { table, record } = ctx.record! await api.records.update(table, record.id, { state: 'open' }, record.version) ctx.notify.success('Reopened.') }, }, ])The call inside
runis illustrative; use the actualapi.*contract you need.Show nothing the backend would refuse: base
appliesonctx.permissions(canWrite,canDelete,isAdmin), on the capabilities the page wired (ctx.list?.transfer,removeRecords,personalization) and onliveContracts. Visibility is a convenience; the server still decides.Filters go through
ctx.list.addCondition(condition, label, replaceSameField), which updates the canonical filter and the URL state. Do not build query strings yourself.Destructive actions call
ctx.confirmfirst. Handlers call the API and report throughctx.notify; they never mutate rows locally.runActioncatches errors and shows them as a toast.Add a Vitest case next to
records/actions/actions.test.tsfor the gating and the call.
Add a user preference
Add the key and type to
UserPreferencesand its default toPREFERENCE_DEFAULTSinfrontend/src/definitions/preferences.ts.Add an item to the right group in
preferenceGroupswithcontrol(toggleorselectwithoptions),label,descriptionand an honesteffect:applied(the workspace reacts today),stored(saved, read by a later milestone, with anote) orplanned(control disabled, with anote). Never add a preference to a template; the page renders the definitions.For an
appliedpreference that changes styling, map it to a root class inROOT_CLASSESinsrc/composables/usePreferenceEffects.tsand add thehtml.pref-…rule tosrc/assets/main.css(existing:pref-compact,pref-striped,pref-large-text,pref-reduce-motion,pref-focus-outlines). Behavioural preferences readusePreferencesStore().values.Values are stored per user in the browser (
src/stores/preferences.ts) until the backend owns a preference table. ExtendUserPreferencesPage.test.ts.
Add a page or route
A dictionary table needs no page. It is served by the generic screens at
/{table}/list,/{table}/newand/{table}/{recordId}. Add a module tosrc/navigation/modules.tsand a navigator entry withtableItem(key, table, icon)insrc/navigation/navigation.ts.An application page owns an explicit path. Add the route to
src/router/routes.tswithmeta.title,meta.moduleKeyandmeta.breadcrumbs, and a lazily imported component.Use a hyphenated path where possible (table names never contain hyphens). Add the first path segment to
RESERVED_SEGMENTSinsrc/router/links.ts, so the segment can never be read as a table name, and extendrouter/routes.test.ts.Register the module in
modules.ts(status: 'implemented'or'placeholder') and reference it withitem(key, routeName, icon)innavigation.ts. Every navigation item must resolve to a real route, implemented or placeholder.Build table and record links only with
listRoute,newRecordRouteandrecordRoutefromsrc/router/links.ts. Screens callapi.*only; prototype-only behaviour is visibly labelled.
Add an API endpoint
Put the controller in the module's
Httpfolder underbackend/app/Platform/<Module>, never inapp/Http. Type-hintExecutionContextto get the caller's context.Resolve tables with
TableController::resolve(orresolveFullfor writes), read withRecordQuery, write withRecordWriter, change the dictionary withMetadataWriter. Report errors asPlatformExceptionsubclasses with a stable code.Register the route in
backend/routes/api.phpinside thev1group with the right middleware (auth:sanctum,throttle:api,role:adminfor administration, token abilities where relevant) andwhereconstraints for path parameters.Return unwrapped resources or the
{ items, total, page, pageSize }envelope withcamelCasekeys.Keep
docs/BACKEND.mdsection 3 in sync withroutes/api.php: add the endpoint row (method and path, auth, purpose) and any new problem code.Add the HTTP implementation and the mock to the matching contract in
frontend/src/api. Write Pest feature tests including authorisation, and run the gates.
Emit a system log
Inject App\Platform\Logging\SystemLogger and name the component with withSource():
public function __construct(private readonly SystemLogger $logger) {}
// ...
$this->logger->withSource('example.import')->info('Imported example items', [
'table' => 'example_item',
'record_id' => $id,
'duration_ms' => $elapsed,
]);
- Levels:
debug,info,notice,warning,error,critical;exception($e, $message, $context)for throwables;forExecution($id)for script runs, jobs and flows. - Reserved context keys map to columns of
syslogand are removed from the stored context:source,execution_id,correlation_id,table,record_id,duration_ms,http_status,exception,user_id. - Events go to the Laravel channel and, from
PLATFORM_LOG_PERSIST_LEVEL(defaultinfo), to thesyslogtable. The logger redacts secrets, bounds values, never throws and never fails the operation that logged. Do not put request bodies, passwords or documents in the context. - There is no custom log viewer:
syslogis a read-only adopted table served by the generic List & Form at/syslog/list. Retention isplatform:logs:prune(7 days by default). See Operations.
Baseline and demo-data policy
The binding policy is docs/OOTB_BASELINE.md. DevCraft is an independent platform built on general, publicly documented concepts of enterprise service platforms. The platform baseline must stay generic.
- Only verified concepts enter the baseline. A table, field, choice, role, layout or behaviour is added only when it is verified in reliable public documentation or an independently established clean baseline, or when it is an explicit DevCraft decision labelled as such. Every baseline table and field is traceable to the provenance analysis.
- Customer environments are never a source. Screenshots, exports, instance configurations and customer records may serve as visual references for layout and interaction only. They never establish fields, labels, choice values, applications, groups, roles, rules, workflows, identifiers or terminology.
- Uncertain means out. Document the uncertainty and ask instead of adding the item.
- Do not misattribute. Nothing is described as a verified baseline concept unless it is verified; DevCraft decisions are labelled as DevCraft decisions.
- No proprietary material: no copied source code, confidential configuration or customer data.
- Reference screenshots stay outside the repository. Screenshots of other platforms may be used only to explain user-interface elements. They are never committed to the repository, and no data shown in them, private data above all, is used anywhere in code, seeders, tests or documentation. Keep them outside the repository or in the git-ignored
references/folder..gitignoreignores images and PDFs,scripts/check-baseline.mjsrefuses any image that is not listed in itsALLOWED_FILES, and the pre-commit hook in.githooks/runs that check before every commit (enable it once per clone withgit config core.hooksPath .githooks). - Review before completion. Every change ends with a review of the diff for customer-specific contamination; unresolved cases are reported, not hidden.
Demo and test data (seeders, factories, frontend mocks, API examples, fixtures, tests, documentation examples) uses fictional, varied people, fictional organisations and locations, and reserved example domains. The only real identity allowed is the DevCraft project owner's administrator account, for the local-development administrator or a clearly identified owner profile. Passwords are never hardcoded. Mock datasets live under frontend/src/api/mock/data, seeders under backend/database/seeders.
scripts/check-baseline.mjs enforces the regression part: it scans every tracked file for a list of known prohibited identifiers and, in demo-data locations, for e-mail addresses outside the allowed domains. It runs as the first CI job. When a new prohibited identifier is found, add it to the script's PROHIBITED list and a row to the audit log in docs/OOTB_BASELINE.md.
Architecture decisions and ADRs
Some decisions are expensive to change later. They are listed in docs/ARCHITECTURE.md section 12, and changing any of them requires an ADR in docs/adr/ first:
| # | Decision |
|---|---|
| 1 | Record storage strategy (interim JSONB store behind a storage driver, ADR 0004) |
| 2 | Inheritance strategy |
| 3 | Primary keys (UUIDv7) |
| 4 | Scope on all metadata |
| 5 | ACL default (deny by default) |
| 6 | Audit written in the write transaction |
| 7 | Tenancy (single tenant per installation) |
| 8 | Identifier rules (^[a-z][a-z0-9_]{0,62}$, scoped prefixes, reserved words) |
| 9 | Filter contract (JSON condition AST) |
| 10 | Scripting (sandboxed runtime scripts, never PHP eval) |
| 11 | Metadata-as-code format |
| 12 | API shape (/api/v1/table/{table}, RFC 9457 errors) |
| 13 | Records are not Eloquent models |
| 14 | Open-source licence (AGPL-3.0-only) |
| 15 | Vendor prefix for bundled apps (x_dc_) |
An ADR is also the right tool for any other decision that changes a contract or a cross-cutting rule. To write one:
Create
docs/adr/NNNN-short-kebab-title.mdwith the next number (0001 to 0005 exist).Start with a title line (
ADR NNNN — Title) and a short header list: Status (proposed, accepted with date), Amends (the section or decision it changes) and Related (other ADRs and documents).Write the sections Context (the forces and the problem), Decision (numbered, concrete), Consequences (what changes, limitations, the path forward) and, where useful, Alternatives rejected.
Update the amended document (for example
ARCHITECTURE.mdsection 12) to point at the ADR once it is accepted.
The accepted decisions are summarised in Decisions.
Licence and contributions
DevCraft Platform is free software under the GNU Affero General Public License, version 3 only (SPDX AGPL-3.0-only); the full text is in LICENSE at the repository root, and backend/composer.json and frontend/package.json declare the same identifier. You may use, study, modify and redistribute it. If you run a modified version as a network service, you must offer its source to the users of that service. See the licence text at gnu.org.
Relicensing would require every contributor's consent, which is why the licence is one of the recorded architecture decisions.