VELORA
A daily mission platform designed to turn consistent action into measurable progress.
The Problem Space
Most gamified habit apps allow trivial client-side spoofing, have brittle reward engines, and fail to provide verifiable proof of completion.
Systemized Implementation
Built a secure, server-authoritative web platform where every mission submission, photo proof, XP reward, and streak increment is evaluated through atomic PostgreSQL procedures and Row-Level Security.
How It Operates in Production
Implemented using Next.js 16 App Router with React 19 server components. Integrated Supabase for PostgreSQL database, authentication, and encrypted object storage for photo proofs. Designed a relational schema enforcing streak continuity via automated triggers.
Engineered an automated cron-driven mission publisher, Supabase Storage photo-proof pipeline with client compression, and strict RLS policies ensuring users can only read their authorized scopes.
VELORA // GAMIFICATION STATE MACHINE & POSTGRES TRANSACTIONS
Daily Mission Generation
Automated UTC midnight cron job publishes randomized, balanced quest rotations with verified XP weights.
Proof Upload & Direct S3/Supabase
Browser compresses photo evidence to <250KB before issuing direct presigned URL upload to storage.
Atomic Verification & XP Transaction
PostgreSQL stored procedures evaluate timezone boundary and execute atomic balance credits with row locking.
Live Leaderboard Broadcast
Calculates global and weekly rank deltas, streaming instant updates to connected subscriber clients via WebSocket.
Data Flow & Infrastructure
The client layer communicates with Next.js Server Actions and Route Handlers, validating inputs with TypeScript schemas. The database layer consists of PostgreSQL with Row-Level Security (RLS) policies, database triggers for streak updates, and scheduled Supabase Edge Functions for daily reset routines.
Rewards are enforced server-side, with PostgreSQL security policies designed to prevent players from manipulating their own progress.
Core System Features

Today Dashboard & Habit Streak Matrix
Daily quest overview, dynamic level progression, XP balance, and consecutive login multipliers.

Missions Directory & Habit Categorization
Exploration catalog categorized by discipline (Fitness, Coding, Mindfulness) with verifiable reward tiers.

Mission Completion & Proof Upload Modal
Client-side image compression workflow before issuing presigned URL uploads directly to encrypted Supabase Storage.

Competitive Leaderboard & Live Rank Deltas
Real-time competitive rankings filtered by global tier and weekly rolling scores streamed via WebSockets.

Administrator Control Plane & Live Telemetry
Real-time user engagement graphs, mission completion velocity, and audit log telemetry.

Mission Authoring Engine & XP Calibration
Administrative interface for scheduling quest rotations and setting difficulty multipliers.