Inspiration

Spaza shops are the backbone of South African township economies, serving millions daily, yet almost none have any digital presence. We wanted to build something that gave these informal but essential businesses the same online tools that big retailers take for granted, while keeping the experience rooted in community trust

What it does

Deliva connects local spaza shops with their customers through a full e-commerce experience. Customers discover nearby shops using a live radar style locator, browse products, add to cart in real time, check out securely via PayFast, and track their delivery status live. Shop owners get a complete dashboard to manage products, inventory, staff, orders, and customers. Shops can post deals and updates to a community feed that followers see instantly, and customers can rate and review shops after delivery

How we built it

The frontend is built with Next.js and Tailwind, with Zustand for state and Socket.io for real-time updates across cart, orders, and the community feed. The backend runs on Node.js and Express, with PostgreSQL for transactional data and Redis handling session caching and atomic stock reservation via Lua scripts to prevent overselling under concurrent load. The entire stack is containerised with Docker Compose for reproducible deployment

Challenges we ran into

Keeping Redis-cached stock in sync with PostgreSQL across concurrent cart additions was the trickiest problem, solved with atomic Lua scripts and careful cache invalidation. Wiring Socket.io rooms correctly so real-time events reached the right users without leaking data was another hurdle. We also had to carefully design the cart to order lifecycle so abandoned checkouts didn't lock a user's cart permanently

Accomplishments that we're proud of

Building a genuinely fullstack, end-to-end commerce platform in the time available, not a demo with broken buttons. Every flow works: discovery, ordering, payment, tracking, dashboard management, and community engagement through reviews and the shop feed. We're especially proud of the store locator, which turns an abstract "community platform" pitch into something visual and tangible

What we learned

We learned how much real-time infrastructure (Redis, Socket.io) changes the feel of a product, even for an MVP. We also learned the importance of designing for South Africa's specific context, like province-based delivery pricing and WhatsApp-first communication patterns, rather than copying generic e-commerce templates.

What's next for Deliva

We want to add WhatsApp order notifications, since many township customers are more reachable there than email. We'd also like to expand the community feed into a discovery surface in its own right, add a loyalty points system for repeat customers, and onboard real spaza shop owners for a pilot in a single Johannesburg neighbourhood to validate the model with real usage data.

Built With

Share this project:

Updates