Prixanda
A subscription and pricing operations platform: a Python engine behind gRPC keeps prices, promotions, prepaid passes and price increases as versioned changes, simulated, signed by someone other than their author and launched in one transaction; a GraphQL gateway serves a console for the commercial team and a public site, and PostgreSQL enforces the rules that must survive a bug.
- Type
- Personal project
- Area
- Operations & tools
- Main stack
- TypeScript · React · Next.js · GraphQL
Key features
- • Prices per market, promotions, prepaid passes and price increases as versioned changes
- • Simulation before signing, and approval by someone other than the author
- • Launches in one transaction that resume after a crash, with faults injected in the tests
- • A Python engine behind gRPC, and a GraphQL gateway with a public schema of its own
- • Rules enforced again by PostgreSQL, and a hash-chained audit log
- • The same engine in the browser on Pyodide and PGlite: the demo, with no server
- • 40 test suites, on Linux and Windows
About the project
A platform for the commercial team of a subscription business: the plans and what each one includes, the price of every plan in every market, promotions and who they are for, prepaid passes, and price increases for the people who already pay. Each of these is a change with versions: promotions and price increases are simulated before anyone signs them, every change is approved by someone other than its author, and a job launches it into the public catalog in one transaction, resuming from the step it reached after a crash, so the site never shows half a catalog.
A Python 3.13 engine owns the rules behind a gRPC contract written in Protocol Buffers, with generated code on both sides; a Node gateway with Apollo Server and DataLoader serves two GraphQL schemas, one for the console and a public one for the site, which cannot return an internal field. The console and the site are Next.js static exports with React, TanStack Query and Tailwind, and the console’s components live in Storybook. PostgreSQL 18, migrated by Flyway, enforces again the rules that must survive a bug: an exclusion constraint against overlapping prices, checks that refuse self-approval, and an audit log the engine can only append to, hash-chained so that a rewrite shows against a head exported earlier.
The scenario is Sonequo, an invented independent-music streaming service in Italy, France, Germany and the United Kingdom, with synthetic data; on the full dataset of 480,000 subscribers and 35 million rows of listening, monthly partitions and weekly sums bring the album release’s audience from 12.2 to 2.0 seconds.
The same engine also runs in the browser, on Pyodide over PGlite built from the same migrations, and that is the demo: 307 of the 313 service tests pass there unchanged. The check runs 40 suites on Linux and Windows, among them 821 engine tests, 12 faults injected into launches with no partial activation left behind, and axe on the site’s pages and the console’s stories.
It is the project in which I learned GraphQL and gRPC; by choice it takes no real payment and has no real sign-in, as people enter with a role whose permissions the server enforces.
Technologies used
TypeScript
React
Next.js
GraphQL
gRPC
Python
PostgreSQL
Protocol Buffers
Apollo Server
DataLoader
TanStack Query
Tailwind
Storybook
Flyway
Playwright
axe-core
Pyodide
PGlite
pytest
Hypothesis
GitHub Actions