Yuvi GD
YUVI

D-Record

D-Record is a multi-role delivery management platform built on Vue.js, Supabase, and PostgreSQL with Supabase Row Level Security enforcing data isolation between customers, riders, and admins. Order scheduling, push notifications, and PDF invoice generation are handled server-side without manual intervention.

Technologies Used

Vue.jsTypeScriptSupabasePostgreSQLSQLWebhookAPI IntegrationPush Notifications

Web Project Info

Completed
startDate: 2025-06-01
deployment: Render

Gallery

image
1 / 2
D-Record Admin Dashboard

Administrator interface for managing orders and users

D-Record started as a manual order-tracking spreadsheet for a local dairy delivery operation. The first architectural decision was to move the authoritative data model into PostgreSQL with Supabase Row Level Security so that access policies could be declared at the database layer rather than enforced piecemeal in the application.

Each role (customer, rider, admin) has a distinct RLS policy set. Customers can only read and write their own orders. Riders can read orders assigned to them. Admins have unrestricted access. This means even if application-level auth is bypassed, the database rejects unauthorized queries at the connection level.

Order scheduling is handled by a Supabase Edge Function that runs on a cron trigger each morning. It queries all pending orders, groups them by delivery zone, and creates rider assignments. Customers receive push notifications through the Web Push API when their order status changes. Notification payloads are generated server-side and pushed to the browser via a service worker, keeping no persistent WebSocket connection open.

PDF invoice generation uses a server-side PDF library called from an Edge Function. The invoice data is fetched from PostgreSQL, formatted into a PDF buffer, and returned as a binary response. This avoids client-side PDF generation, which is unreliable across mobile browsers.

Key Features

PostgreSQL Row Level Security enforcing data isolation at the database layer

Supabase Edge Function cron for automated morning delivery scheduling

Web Push API notifications via service worker for order status updates

Server-side PDF invoice generation from Edge Function

Multi-role dashboard (Admin, Rider, Customer) with role-specific RLS policies

Real-time order tracking via Supabase real-time subscriptions

User Experience

User Flows

Customer registration and daily product ordering
Automated delivery scheduling and notifications
Rider assignment and zone-based routing
Admin oversight and order management

Accessibility

Mobile-responsive design for on-the-go ordering
Push notifications for order updates without app installation
Simple navigation designed for non-technical users

Architectural Implementation

Database-Layer Access Control via RLS

Rather than relying on application-level authorization checks, all access policies are declared as Supabase RLS policies directly on the PostgreSQL tables. auth.uid() is matched against row ownership columns for customer and rider tables. This ensures unauthorized data access is rejected by the database even if application routing is misconfigured.

Server-Side Scheduled Delivery Assignment

A Supabase Edge Function runs on a cron schedule each morning. It queries all pending orders, groups them by delivery zone using a ST_DWithin PostGIS query on customer coordinates, and writes rider assignments back to the orders table. The function also fires push notification payloads to affected customers via the Web Push VAPID protocol.

Outcomes

5,000+ orders processed within the first 1-2 months of deployment

300+ active customers with consistent daily delivery coverage

Full transition from manual spreadsheet tracking to automated scheduling

Performance Benchmarks

Morning cron assignment completes under 2 seconds for 300+ active orders

Real-time order status updates via Supabase subscriptions with sub-500ms latency

Yuvi GD

Game Developer & 3D Artist crafting immersive digital experiences. Pushing the boundaries of interactive technology.

Services

  • Game Development
  • Technical Art & Pipeline
  • Full-Stack Web Development
  • Custom Software Solutions
  • Utilities & Network Systems

Get In Touch

Email:
Yuvi_GD@outlook.com

Discord:
yuvi_gd

© 2026 Yuvi GD. All rights reserved.

Built with Next.js, Three.js & Tailwind CSS