About the project
Sh*t yourself rich (or "Schijt je Rijk" in Dutch) started as a one-off. It was a ticketing site for a fundraiser I organised with my scouting group: a field is divided into a grid of numbered squares which people can buy up. On the day the event takes place, a cow is let loose on the field. Whoever owns the square it does its business on, wins the pot.
It has grown past that one edition since. I've spent some time improving the maintainability of the project and allowing organisers to run it themselves.
Squares have a set price and the pot grows with every one that's sold. The one thing that really has to hold, is that a square cannot be sold twice. Clicking one reserves it for a few minutes and the payment is tied to that reservation, so two people picking the same square in the same second can never both end up paying for it. It's basic ACID compliance, but really important here.
I don't like having to create accounts either. The platform only collects a name for identification and an email to send a confirmation & receipt to. Payments can be made using the Stripe integration, or cash by adding a new entry in the admin panel.
The event has a handful of states and the site behaves differently in each one. The sale opens and later closes, the cow goes onto the field, a winning square is declared. Payments are not possible in some states, and the board is displayed differently depending on the state too.
Organisers handle the entire process from an admin panel: change the state, search the purchases, correct a name, add a sale that was paid in cash. Prices, board size, rules, dates, texts and colours are editable there too, so next year's organisers can set up their own edition without me.
Technologies
Everything runs serverless on AWS. The event sells for a few weeks a year and sits idle the rest of the time, so it costs close to nothing when nobody is using it.
Used across frontend, backend and infrastructure
Public board and admin panel
CSS framework for styling
Payments and payment webhooks
Runs the API
Fronts the API, on the same origin as the site
Database for purchases, squares and editions
Static hosting, behind a CDN
Admin authentication
Infrastructure as code, four environments
Tests, infrastructure plans and deployments
Unit, integration and component tests