Documentation
When you want to add a new guide to this portal, you must never write it directly as a final webpage. Instead, you create a "raw" content file, register its title and details in our compiler list, and
When you want to add a new guide to this portal, you must never write it directly as a final webpage. Instead, you create a "raw" content file, register its title and details in our compiler list, and
Adding New Documentation Pages
To add a new guide to this portal, create a raw content file, register its details in the compiler list, and let the build script automatically package and deploy it with the correct styles and layout.
During Phase 1, only the Developer Guide is actively maintained.
New feature documentation defaults to a dev page under /developer-guide/.
User-guide pages are deferred until the platform reaches post-phase-1 stability.
See Documentation Site Structure — Authoring Priority for the full decision (ADR-018 Amendment).
When you want to add a new guide to this portal, you must never write it directly as a final webpage. Instead, you create a "raw" content file, register its title and details in our compiler list, and let our build script automatically package, format, and deploy it with the correct styles and layout.
📝 Adding New Pages to RAIA™ (Real estate Artificial Intelligence Agent) Documentation
Operational Spec (SOP-DOCS)To prevent layout drift, double-compilation loops, and technical styling debt, RAIA™ (Real estate Artificial Intelligence Agent) enforces a strict, unified compilation pipeline for all developer-facing documentation pages. Hand-rolled CSS and direct production HTML edits are blocked. All document pages must flow through our central unify_docs compiler to automatically inherit brand-approved responsive layouts, mobile sidebars, glossary tooltips, and secure gatekeeper scripts.
1. Compilation and Sync Pipeline
The documentation lifecycle is governed by a unified build-and-sync loop. Below is the technical path showing how raw markdown or HTML bodies are compiled, verified, and synchronized across our database and Nginx servers:
2. Standard Operating Procedure (SOP)
Follow these precise steps to create, format, and deploy a new documentation guide:
-
1Create the Raw Content File
Create your physical file only under
/root/projects/raia/docs/raw/<slug>.html. This raw file must only contain the inner content body—never write<!DOCTYPE html>,<head>, or<body>tags. Wrap your inner segments in standard Tailwind-spacing classes. -
2Register in DOCS_METADATA & Prepend Index Number
Open
/root/projects/raia/docs/unify_docs.py. Navigate to theDOCS_METADATAarray (around line 375) and append your new page's metadata structure.
CRITICAL MANDATORY RULE: The"title"key inDOCS_METADATAmust have the exact chapter/section index number prepended (e.g.,"3.9 Authoring & Deploying New Documentation Guides") and match the entry insidegenerate_index.py1:1. The compiler will use this to automatically build matching browser tab titles and<h1>headings.{ "slug": "your-new-slug", "title": "3.9 Authoring & Deploying New Documentation Guides", "subtitle": "Detailed developer-facing subtitle.", "badge": "Operational Spec (SOP-DOCS)", "category": "technical", "audience": "developer", "file_path": "./projects/raia/docs/developer/your-new-slug.html" } -
3Map the Subdirectory Location
In the same file (
unify_docs.py), navigate to theget_repo_details(slug)function (around line 830). Add a mapping key pairing your slug directly to its folder location under the repository root. This populates the **Repository Code** sidebar card:"your-new-slug": ("03_technology/path/to/folder/", "https://github.com/estateaigents/raia/tree/main/03_technology/path/to/folder") -
4Compile & Lint (Fail-Fast Gate)
Execute the unified c
Repository Code
The live codebase implementation for this specification sits within the following repository folder:
python3 /root/projects/raia/docs/unify_docs.py
Once compiled without warnings, synchronize your content directly to the Supabase database and push to the live tailscaled Nginx servers:
# Synchronize to Supabase database python3 /root/projects/raia/docs/run_insert.py # Push static copies to tailscale Nginx document roots bash /root/projects/raia/docs/deploy.sh
Commit your raw page, compiled outputs, and modified database insert scripts to preserve a clean tracking history:
git add . git commit -m "docs(): create specifications" git push origin main
3. Strict Linters and Anti-Slippage Rules
Our compiler actively blocks direct formatting slips. When authoring pages (either as a human dev or an autonomous AI agent), the build loop enforces these strict checks:
Raw files must never contain tailwindcss[.]com references. The compiler supplies full styles natively.
Avoid using <style> tags. Hardcoded styling blocks variable-themes. Always update docs.css instead.
Do not use raw hex codes (e.g. #fff, #000) in your diagrams. Bind strokes/fills directly to adaptive CSS variables.
Repository Code
The central unification compiler, deployment runner, and database sync utilities sit within the following folder:
Architecture Details
The security architecture implements a defence-in-depth model with perimeter authentication, internal authorisation, data encryption, and audit logging at every layer. Access is gated through a layered security model: Tailscale identity verification at the network level, followed by role-based access control within the application.
- Core Component: Security gate guard and RBAC enforcement
- Data Flow: Request → Tailscale Gate → Authentication → Authorisation → Audit Log → Response
- Integration Points: Tailscale ACLs, Supabase Row-Level Security, session tokens, and audit log sinks
Configuration Reference
Key configuration parameters for this system:
| Parameter | Type | Default | Description |
|---|---|---|---|
| gate_enabled | boolean | true | Enable Tailscale gate guard for all pages |
| allowed_hosts | string[] | docs.estateaigents.com, localhost | Whitelist of permitted hostnames |
| session_ttl_minutes | integer | 60 | Session token time-to-live |
Figure 2: Security architecture — component interaction and data flow.
Troubleshooting
| Issue | Cause | Resolution |
|---|---|---|
| 401 Unauthorized on tailnet | Tailscale not running or wrong node | Verify Tailscale is connected and node is authorised |
| Gate guard redirect loop | Hostname not in allowed_hosts list | Add hostname to the gate guard whitelist |
This component is part of the RAIA (Real estate Artificial Intelligence Agent) platform mono-repo. Implementation details, API contracts, and integration tests are available in the repository.