fastdata
Examples

Ringly (Postgres)

Ringly is a made-up SaaS company selling a cloud phone system (calls and SMS) to support and sales teams. This folder is a complete fastdata setup for it: a 15-table Postgres database, a read-only role, a connector config and a knowledge base.

The data is small on purpose: 6–7 rows per table, consistent across tables, so you can check every answer by hand.

Tables

AreaTables
Billingplans, subscriptions, invoices
Customers and staffaccounts, users, teams, team_members
Telephonyphone_numbers, contacts, calls, messages
Product and supportevents, integrations, support_tickets, nps_responses

Table and column comments are in the schema (initdb/01-schema.sql), and the knowledge base in knowledge/ describes each table, the business terms (MRR, answer rate, NPS) and verified example queries.

Run it

With Docker (Postgres 17 on localhost:5433, with the real read-only role):

cd examples/voicecall
./seed.sh                 # starts Postgres and loads the data; run again to reset
cp .env.example .env
fastdata doctor
fastdata

Without Docker (Postgres compiled to WASM, in memory; from the repository root):

npm install
npm run example:ringly    # leave it running
# in another terminal:
cd examples/voicecall
RINGLY_DB_URL=postgres://fastdata_ro:fastdata_ro@localhost:5433/postgres fastdata

PGlite does not enforce roles, so use Docker to test the read-only role itself.

Your own Postgres: create an empty database named ringly, then DATABASE_URL=postgres://owner@host/db ./seed.sh --url (needs psql), and point RINGLY_DB_URL in .env at the fastdata_ro role.

Questions to try

  • What is our current MRR by plan?
  • Which customers have the worst answer rate on inbound calls?
  • Which customers are at risk of churning, and why?
  • What is our NPS, and what do detractors complain about?
  • Which invoices are overdue or still open?
  • Which integrations are failing, and does it show in support tickets?

Some answers, for checking: MRR is $4,906 (ARR $58,872); NPS is 0 (2 promoters, 2 passives, 2 detractors); Nordwind Energie has a failing Zendesk integration, an urgent ticket about it and the lowest NPS score.

Files

PathWhat
initdb/01-schema.sqlTables, constraints and comments
initdb/02-seed.sqlThe data
initdb/03-readonly-role.sqlfastdata_ro: SELECT only, read-only by default, 30 s timeout
docker-compose.yml, seed.shLocal Postgres
pglite-server.mjsNo-Docker alternative
fastdata.yaml, .env.examplefastdata config using the built-in Postgres executor
knowledge/The knowledge base