A decentralized, single-tenant document intelligence node.
Sync your cognitive stream directly to an immutable, private GitHub-hosted vault.
- Architectural Flow
- Deployment Prerequisites
- Environment Configuration
- Data Storage Schema
- Client-Side Integration (Chrome)
- Asset Generation
- Verification Checklist
- Troubleshooting
- Input Vector: Chrome Extension or Web Editor captures text/image blobs.
- Transport: Secure transmission to Vercel-hosted API routes utilizing Next.js 16 asynchronous routing.
- Authentication: Auth.js (NextAuth v5) validates identity against the private GitHub instance.
- Committal: The API executes a repository commit (JSON/Markdown) directly to the storage node.
- Rendering: Client-side components ingest raw markdown, strip frontmatter safely, and perform AST-safe rendering.
- Node.js
v18.0.0+ - Next.js
16.3.1 - Vercel-compatible CI/CD environment
- GitHub account (Personal or Organization)
Define the following variables within your deployment environment (e.g., Vercel Project Settings):
| Key | Purpose |
|---|---|
GITHUB_ID |
OAuth Client Identifier |
GITHUB_SECRET |
OAuth Client Secret |
NEXTAUTH_SECRET |
32-Byte Salt/Hash Key |
NEXTAUTH_URL |
Production Canonical Domain |
GITHUB_TOKEN |
(Optional) PAT for high-speed public API execution |
TinyMind-4ndr0666 is a Private Sovereign Node. Unlike public instances, this architecture implements Zero-Trust Access for all core writing and configuration tasks. The application never stores credentials; it requests a transient access token (JWT) via OAuth2.
- Scopes: The system specifically requests
repoandworkflowscopes. - Privacy: Data resides in a private repository; you retain 100% control over access lists.
- API Integrity: All internal routes (
/api/github/*) utilize Auth.js v5auth()checks. If the session cookie is invalidated, read/write operations fail instantly.
Stored as a monolithic array in content/thoughts.json.
{
"id": "1779161512136",
"content": "Raw markdown content...",
"timestamp": "2026-05-19T03:31:52.136Z"
}
Stored as individual Markdown files in content/blog/.
- Parsing: Handled via custom utilities and
BlogPostContent.tsx. - Frontmatter: Strict, hardened YAML parsing utilizes
try/catchfallbacks to strip quotes and gracefully handle malformed dates without throwing RangeErrors. - ID Generation: URL-safe IDs are explicitly stripped of curly braces and non-alphanumeric punctuation to prevent directory traversal and routing hydration failures.
The Chrome extension acts as an autonomous input agent, engineered to work seamlessly with Vercel's strict cookie security.
- Clone the extension repository.
- Execute
npm install. - Load the
tinymind-extension/directory into Chrome (chrome://extensions→ Load Unpacked). - Environment Check: Ensure the
API_BASEandSESSION_APIconstants inbackground/service-worker.jsmatch your production URL.
The extension requires no API keys to be stored locally. To bypass Vercel's Host-Only cookie restrictions, the extension authenticates by sending a cross-origin fetch directly to the /api/auth/session endpoint with credentials: 'include', forcing the browser to securely attach the authjs.session-token.
To customize the branding of your Sovereign Node, use the included interactive Python script:
python3 mkicons.py
This utility performs LANCZOS resizing for square targets and center-crop-to-ratio resizing for banners to prevent distortion.
- Safe Backups: If an icon collision is detected, the script interactively prompts you to define a backup name (defaulting to
[name]_original.png) before atomic replacement.
- OAuth application registered with
reposcope. - Vercel environment variables fully populated.
-
content/thoughts.jsoninitialized as[]in the private repo. - Chrome extension manifest
host_permissionsallow your explicit Vercel domain. - Verified session persistence via NextAuth v5
auth().
| Symptom | Diagnosis | Remediation |
|---|---|---|
500 Internal Server Error |
Sync access of Async Params | Ensure params and searchParams in page.tsx use React.use() or are awaited. |
Infinite Spinner on Load |
Hydration Mismatch (id="undefined") |
Ensure Client Components check `if (!id |
Extension Perpetual Login |
Host-Only Cookie Issue | Reload extension in Chrome to ensure the /api/auth/session fetch mechanism is active. |
Client-side exception |
Markdown AST crash | Wrap content in Markdown code blocks (```text). |
