Projects A loyalty and rewards system any app can plug into
A loyalty and rewards system any app can plug into
Stamps, vouchers and QR codes, built as a service that connects to any web or mobile app.

- How long
- 2020
- My role
- Software ArchitectureDevelopment, Q&A, Support
- Kind of project
- IntegrationLarge project
The problem.
A business wanted to run a loyalty and rewards program, stamps for actions like purchases, vouchers once enough stamps are earned, without building that logic into their main app from scratch, and without locking it to one frontend.
What I built.
A dedicated API service that any web or mobile app can connect to. It lets a business set up loyalty programs with their own rules: how many stamps are needed, when vouchers expire, whether a program is shared with a group or community. Vouchers can be generated automatically once the requirements are met, or created manually, for example a birthday voucher. Stamps can also be issued by scanning a QR code.
What they got.
A loyalty and rewards engine that’s independent of any one app, and flexible enough to run multiple programs, with automatic or manual voucher rules.
For your technical person
Stack. Node.js and Express.js API, with MongoDB chosen so the data schema could change as requirements evolved. Any web or mobile frontend could connect to it. The server logic was mapped in flow charts first, and the data design normalised before the routes were built.
Loyalty programs. A program set how many stamps earned a voucher, how many vouchers were available (a fixed number, or generated automatically), unique voucher names, and a schedule: start date, end date, repeat interval and repeat until. Programs could belong to a group or community, and users could share a program with friends.
Stamps. Each program defined which action earned a stamp, such as a purchase, and joining a program could issue one too. A generated QR code worked as a stamp: scanning it added the stamp to the user's account. Users could see their progress towards the next voucher.
Vouchers. Once a user had enough stamps, the stamps converted into a voucher to redeem for a reward. Vouchers could also be created by hand for special cases, such as a birthday voucher. Users could see their open and redeemed vouchers, and a facility could see every voucher it had issued.
API coverage. More than 40 routes in eight groups. Users: login, logout, logout of all sessions, find, update and delete. Stamps: submit, join, get and submit QR stamps, and participation progress. Vouchers: a user's open and redeemed vouchers, all vouchers for a facility, redeem, create from stamps, and disable. Programs: find, create and delete, community programs with their members, and the programs a user belongs to or manages. A separate admin set managed program membership, a user's stamps, generic and birthday vouchers, and the programs each admin runs.
Security. Server-to-server and user-to-server token authentication, every route token-protected, and URL and data sanitisation throughout.
Timeline. 4 months, 2020.
Related work.
Running into the same problem? Tell me about yours.
+27 87 150 9305Monday to Friday, 09:00 to 20:00 SAST. Or email info@antondevilliers.com.


