How vchili hub Was Built
The engineering decisions, data architecture, and open methodology that power our hybrid community platform.
Payload CMS Owns the Database
Zero competing schema migrations or ORM overhead.
Payload CMS 3.x strictly defines and controls the single PostgreSQL schema. Models for Users, Resources, Pages, Members, and Community Contributions live in Payload.
The NestJS backend accesses the exact same tables using Drizzle ORM for stateless queries without generating competing migrations or Prisma dependencies.
Startup Catch-Up Protocol
Guaranteed message continuity across restarts and downtime.
Before connecting to the Discord WebSocket Gateway, the bot queries Postgres for the last_synced_timestamp.
It queries the Discord REST API to fetch any forum threads created between that timestamp and the present, ingesting missed threads as status: pending before actively listening to live events.
Hybrid Content Ingestion
Automated community feeds paired with manual admin override.
Every resource originates from either Discord (entrySource: 'discord') or direct administrative authoring (entrySource: 'manual').
Manual admin posts default immediately to official status. In contrast, Discord threads start as pending until approved via the /approve slash command.
Discord OAuth2 Live Role Sync
Real-time access synchronization tied to server roles.
Upon Discord sign-in, the system queries the Discord Guild API to inspect the user’s active roles.
Designated server roles grant instant access to the Staff Portal. If a user is removed or demoted in Discord, their web administrative privileges are immediately revoked on their next session.