
Dafolle
Full-Stack SaaS Engineering | Enterprise System Integration | Real-time Data Architecture | Subscription Management Systems | Microservices | API Development

Dafolle OS is an enterprise-grade project management SaaS platform engineered from the ground up to serve Dafolle's design agency operations managing €1.2M annual revenue and 30+ concurrent client projects. As the lead architect and sole developer, I designed and implemented a microservices-inspired architecture centered on Supabase (PostgreSQL) as the single source of truth, eliminating the unreliable dual-database pattern that previously caused data integrity issues.
The technical stack comprises: PostgreSQL with Row-Level Security (RLS) policies for multi-tenant data isolation, Supabase Edge Functions (Deno runtime) for serverless webhook processing and business logic execution, React.js with Redux for state management on the frontend, TypeScript for type-safe development across the entire codebase, and Docker containerization for consistent development and deployment environments. The platform integrates seven external services through custom-built adapters: Orchestra (project management REST API and webhooks), Stripe (payment processing and subscription management), Airtable (legacy data migration and sync via WhaleSync), Cal.com (calendar scheduling API), Claap (video recording metadata), Fillout (form submissions), and Ontbo (AI-powered context extraction from documents and conversations).
Real-time data synchronization is achieved through a custom webhook orchestration system that handles 500+ daily events from Orchestra task updates, processing them through Supabase Edge Functions with automatic retry logic, dead letter queuing for failed events, and comprehensive logging for debugging production issues. The system maintains sub-second latency for UI updates using Supabase's real-time subscriptions over WebSockets, ensuring designers see task changes instantly without manual refresh.

Database architecture features 24 interconnected tables with carefully designed foreign key relationships, junction tables for many-to-many relationships (e.g., project-client-designer assignments), and materialized views for complex reporting queries. Implemented automated subscription lifecycle management including: trial period creation with expiration tracking, plan upgrade/downgrade with prorated billing calculations, pause/resume functionality preserving billing cycles, and automated renewal processing with Stripe webhook verification. Built custom audit logging system capturing all CRUD operations with user attribution, timestamp precision to milliseconds, before/after snapshots for data forensics, and tamper-proof append-only architecture.
Developed Orchestra integration layer handling edge cases including: drag-and-drop task movements that weren't triggering webhooks (discovered and reported bug to vendor), duplicate event deduplication using idempotency keys, task hierarchy synchronization maintaining parent-child relationships, and custom field mapping between Orchestra's data model and internal schema. Implemented Stripe webhook validation with signature verification, implemented automatic invoice generation tied to subscription cycles, handled failed payment retry logic with exponential backoff, and built reconciliation scripts to detect and fix billing discrepancies between Stripe and internal records.
Created Ontbo integration for automated context extraction, processing client emails and documents through their API to populate project briefs, extract deliverable requirements, and identify key stakeholders without manual data entry. Built rate-limiting middleware to stay within API quotas, implemented caching layer using Redis to reduce redundant API calls, and designed fallback mechanisms when external services are unavailable.
Performance optimizations include: database query optimization reducing complex report generation from 8+ seconds to under 500ms using proper indexing and query planning, implementing connection pooling through PgBouncer to handle concurrent user sessions efficiently, lazy loading and code splitting on frontend reducing initial bundle size by 40%, and CDN integration for static assets with proper cache headers.