Smart Lock - ECO PBC
A full smart-locker infrastructure built for automated vending machines, combining a real-time admin platform, an Android machine application, a backend API, and a super admin interface to manage sales, lockers, stock, monitoring, and machine operations at scale.
Date: 5/2025
Tags: Next.js, React Native, Express.js, Prisma, Socket.IO
Hero image: https://naikho.com/api/media/portfolio/2b212c85-8125-4d9f-95d7-65773045d404.png
Project content
## Overview Smart Lock EcoPBC is a full infrastructure designed to operate automated smart-locker vending machines. The system combines several connected parts: - an admin platform for machine and business management - an Android machine application used directly on the lockers - a backend API handling the core business logic - a super admin interface for global monitoring and support The goal of the project was to allow operators to configure machines, manage lockers and stock, track sales activity, and let end users purchase products directly from the machine interface. Once a purchase is completed, the correct locker opens automatically so the customer can collect the product. ## Product scope This project was much more than a standard web application. It was a real product ecosystem built around hardware interaction, real-time synchronization, operational tooling, and transactional workflows. The infrastructure includes: - machine fleet management - locker configuration and control - stock and pricing management - payment and transaction monitoring - refill workflows - error reporting and activity logs - real-time machine connectivity tracking - organization and user management - super admin controls for support and maintenance ## Admin platform The admin side is the main control center of the system. It allows operators to: - monitor overall machine activity through dashboards - view revenue, transactions, average basket size, and sales performance - access a sales-oriented dashboard with monthly projections - create and organize sites - manage machines and their configuration - configure lockers individually - define locker status such as available, unavailable, or system locker - control locker opening remotely - manage stock and pricing - view machine-specific and site-specific performance - monitor logs, errors, and customer reports - manage organizations, users, and permissions A granular permission system was also implemented so each user can be allowed or restricted from specific areas of the application depending on their role. ## Machine application The machine-side application was built for Android tablets embedded into the vending machines. It provides the customer-facing purchasing flow and supports different machine behaviors: - single-product lockers - multi-product lockers - automatic locker opening after payment - maintenance mode - branded home screen with carousel and custom labels - customer-side error reporting The machine interface is synchronized with the backend in real time, which allows the admin system to know whether a machine is online, disconnected, or actively processing events. ## Super admin A super admin interface was also added to manage the infrastructure at a higher level. It provides a global operational view and allows internal administrators to inspect machines, access detailed information, and assist with support or maintenance across organizations. One especially useful part of this interface is the ability for the super admin to access the same detailed machine view as the organization using it, which makes troubleshooting much easier. ## My role I built the project end to end. My work included: - backend development - admin frontend development - machine application development - UI and design work - system architecture decisions - real-time event handling - locker and stock management logic - organization and permission management - pairing and machine identity logic - operational tooling and monitoring features I was also highly involved in product thinking. The client did not always have a fully defined specification, so I proposed and designed a significant part of the product logic and several workflows that were eventually integrated into the system. This project was also my first fully serious mobile application built with `React Native`, which made it a major technical milestone for me. ## Technical challenge Two parts were especially challenging. The first was the locker control system itself. At the beginning, the project relied on an external provider and its API to communicate with the machines. Over time, that approach became too unstable, so the architecture evolved toward a more controlled internal solution using our own hardware library and backend-driven locker management. That change significantly improved reliability and gave us much more control over when and how lockers open. The second major challenge was real-time machine synchronization. The system needed to know at all times: - whether a machine was connected - what event had just happened - when a locker was opened - when a refill was performed - when an error was reported - when a payment succeeded I used `Socket.IO` to handle this real-time communication, but achieving a stable implementation took time. Reconnection behavior, persistence across routes, and overall reliability required several iterations before the system became fully dependable. ## Technical highlights Some of the most interesting parts of the project include: - real-time machine connectivity with `Socket.IO` - OTP-based pairing between a machine and the backend - persistent machine identification using the hardware ID of the tablet - locker configuration and remote opening - refill workflows and locker state management - stock assignment and automatic pricing propagation - operational logs, error monitoring, and customer reports - dashboards with business metrics and sales projections - super admin support tooling - organization and granular role management One detail I particularly liked was the pairing system. Instead of requiring manual technical intervention for every machine setup, I designed a flow similar to smart TV activation. An OTP code can be generated from the admin side, entered on the machine, and then the association persists over time through the hardware identity of the device. This made deployment and maintenance much smoother. ## Why this project matters Smart Lock EcoPBC is one of the most complete and atypical projects in my portfolio. It demonstrates my ability to work across: - frontend - backend - mobile - real-time systems - hardware-adjacent workflows - business tooling - product design - operational reliability It also shows that I can handle more than traditional web interfaces and build systems where software interacts with physical devices, real-world operations, and critical business flows. ## Status The project is live, stable, and actively used. It is being prepared for broader deployment across additional companies and machines. The repository is private and there is no public demo available.
Gallery
Similar project: U-Academy






