Delivered engagementSaaS & Infrastructure · $25k – $35k
Backend Test Suite

Social discovery platform · under NDA

Delivered engagement. Coralsoft designed and built this product end to end; figures below retain their evidence level.

WebBackendVitest 3.2 (Node env mode)Deno 2.xHono 4.x
Backend Test Suite
no usable image in library
The situation

What was in place before we started.

A full backend test suite built from scratch for a Deno-based Supabase Edge Functions API — unit tests, integration tests, schema validation, a production-grade mock layer, and CI/CD quality gates across 13 feature modules.

The client (covered under NDA) operates a social discovery platform for real-time, location-aware interaction — users discover nearby events, check in at venues, connect with attendees, and manage social profiles through a mobile app. The server side is a collection of Supabase Edge Functions: individually deployed, serverless TypeScript handlers behind a shared Hono routing layer, covering auth, events, profiles, venues, photo uploads, Stripe payments, and admin operations.

When Coralsoft joined the project, the backend had no test coverage. The challenge was not simply writing tests — it was building the testing infrastructure that made meaningful tests possible in a non-standard runtime. Edge Functions run on Deno; the natural test runner for TypeScript projects runs on Node. Bridging the two module systems without a transpilation step, mocking the Supabase query builder's fluent API faithfully, and doing all of this without ever touching a live database required deliberate infrastructure work before a single assertion could be written.

Constraint

The goal was not maximum coverage — it was reliable coverage of the most business-critical paths: auth, event participation, and Stripe webhook processing. The infrastructure built in this engagement makes raising coverage thresholds incrementally straightforward.

Timeline
6 months reconstructed
Team
5 people reconstructed
Budget
$25k – $35k reconstructed
Platforms
2
Stackrecorded
Vitest 3.2 (Node env mode)Deno 2.xHono 4.xSupabase JS SDKZod 3.xStripe webhooksTwilioGoogle MapsShort.iov8 coverageGitHub Actions
Challenges

Each constraint, and what we did about it.

Constraint

The goal was not maximum coverage — it was reliable coverage of the most business-critical paths: auth, event participation, and Stripe webhook processing. The infrastructure built in this engagement makes raising coverage thresholds incrementally straightforward.

What we did

Three pieces of custom infrastructure make the entire suite possible. First, a Vitest module alias layer maps Deno-style ESM import URLs to their Node equivalents at resolution time — allowing Deno TypeScript to run through Vitest in Node environment mode without a transpilation step. Second, a Deno environment shim installs a Deno global that proxies env.get and env.set to a plain object reset between tests — no real credentials anywhere in the suite.

Results

Outcome, with the source of every figure.

50
Test files across 13 feature modules
self-reportedCoralsoft's own figure for its own delivery, stated in cases.ts. No third-party attestation in the sources.
26
Geofence edge case tests for nearby discovery flows
self-reportedCoralsoft's own figure for its own delivery, stated in cases.ts. No third-party attestation in the sources.
0
Live database calls in the entire test suite
self-reportedCoralsoft's own figure for its own delivery, stated in cases.ts. No third-party attestation in the sources.
Roadmap

How it was sequenced.

6 monthsreconstructed delivery
Weeks 1–4

Discovery & architecture

Pure utility logic — phone normalisation, Haversine geofence, age calculation, SMS templates, magic link tokens, env config.

  • Unit tests
Weeks 5–13

Core build

Zod contracts tested independently — required fields, conditional rules, format patterns, character limits, date ordering.

  • Schema tests
Weeks 14–18

Integrations & data

Full HTTP handler path — real Hono context, real Zod validation, mocked Supabase and external services.

  • Integration tests
Weeks 19–23

Hardening & QA

Vitest module aliases map Deno-style ESM import URLs to Node package names at resolution time — allowing Deno TypeScript to run through Vitest in Node mode without a transpilation step.

  • Deno-to-Node bridge
Weeks 24–26

Launch & handover

createMockSupabaseClient — a full reproduction of the Supabase JS query builder API as a tree of vi.fn() stubs.

  • Mock Supabase client

More work like this.

Every case study is a Coralsoft delivery story, with the evidence behind each figure kept visible.