mirror of
https://github.com/bitbaum/orangecat.git
synced 2026-12-05 11:08:20 +01:00
Production is fully self-hosted on the Hetzner box (bitbaum, behind Caddy) with self-hosted Supabase. This scrubs the remaining Vercel footprint: Code (src/ now has zero Vercel references): - security page: "Hosted on Vercel" → self-hosted infrastructure - FleetCrown URL fleetcrown.vercel.app → fleetcrown.orangecat.ch (entity registry + external-publish allowlist; the dead vercel.app subdomain was also a re-registration risk in an allowlist) - webhook-secret error + cron/env comments point at the box, not Vercel - corrected stale "Vercel kills the function on response" comments (false on a persistent server) to accurate await-before-respond reasoning Security/config: - supabase/config.toml: dropped dead *.vercel.app auth redirect URLs - @vercel/mcp-adapter dependency removed (unused) Artifacts removed: - scripts/auth/vercel-login.js, scripts/preview-url.sh, scripts/dev/merge-env.js, scripts/monitoring/deployment-monitor.js, scripts/db/setup-env.js, mcp-servers/vercel-openapi.json, .vercel/ - setup_vercel_secrets MCP tool in mcp-servers/github-server.js - .gitignore Vercel section; env scripts stripped of vercel-login/token Docs + .claude rules/commands rewritten to the self-host deploy flow (scripts/deploy-selfhost.sh / .github/workflows/cd.yml; env at /opt/orangecat/app/.env). Historical/archive records left intact. Verified: tsc 0 errors, SELF_HOST=1 build green, cron unit tests pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Development Documentation
Last Updated: 2025-12-30
Current Status: Production Ready
Build: Passing Database: Verified (3 groups, 17 actors, 3 members) Groups Unification: Complete Actor System: Implemented
Active Status Documents
- Production Readiness Handoff - Current production status & next steps
- Active Refactoring Tasks - Current work tracker
Architecture & Principles
- Engineering Principles - DRY, SSOT, best practices
- Modularity Improvements - Modular architecture patterns
- Code Simplicity - Simplicity guidelines
Analysis Documents
- Search Architecture Analysis - Search system deep dive
- Discover Page Analysis - Discover page architecture
- Entity Cards Unification - Entity cards DRY plan
Development Guides
Setup & Configuration
- Setup Guide - Development environment setup
- Environment Management - Environment variables
Code Patterns
- CLI Entity Creation - Entity creation via CLI
- Generic API Handlers - API handler patterns
- Type Safety Prevention - TypeScript best practices
- Type Safety Progress - Current type safety status
Workflows
- Git Workflow - Git branching and commits
- Code Review - Review process
- Error Handling - Error handling patterns
- Debugging - Debugging guide
Handoff System
- Handoff System - How handoffs work
- Handoff Template - Template for session handoffs
Key Architectural Decisions
Groups Unification (Completed)
- Circles and Organizations merged into unified
groupstable - Groups have
labelfield (circle, dao, company, network_state, etc.) - All queries use
groupstable only - no dual-table logic
Actor Model (Completed)
- Entities owned by
actor_id(unified ownership model) - Actors can be users or groups
- Future extensible for AI agents
Entity Cards (90% Complete)
- Single
EntityCardbase component with variants ProjectCardextends EntityCard with project-specific features- Old duplicate cards being phased out
Remaining Work
- TypeScript Errors - ~460 non-blocking errors remain
- Console.log Cleanup - ~160 statements to replace with logger
- Delete Old Components - ModernProjectCard, DashboardProjectCard after testing
- Remove Organizations Table - After verification period
File Locations
Services
src/services/groups/- Groups service (queries, mutations, permissions)src/services/actors/- Actor service (unified ownership)src/services/projects/support/- Project support system
API Routes
src/app/api/groups/- Groups APIsrc/app/api/organizations/- Backward-compatible wrapper
Components
src/components/entity/EntityCard.tsx- Base entity cardsrc/components/entity/variants/- Entity card variantssrc/components/groups/- Group components
Note: Stale documentation has been cleaned up. See docs/archive/ for historical docs if needed.