Building this project involved designing secure authentication, implementing business workflows, and creating complete project documentation, including a detailed PRD and README.
Feedback is always welcome. Thanks for reading!
Just completed my latest full-stack project: Prepaid Wallet POS System.
Built with Next.js, TypeScript, MongoDB, and JWT, it helps businesses manage members, digital wallets, billing, inventory, and reports.
Thread
Prepaid Wallet System
Members module done Parallel $in queries for wallets/cards, computed readiness badges, and countDocuments() for instant stats.
Week 5: Cards—member assignments will automatically flip readiness to green. #buildinpublic#NextJS#MongoDB
Prepaid Wallet Syaytem
• Single detail endpoint with parallel member, wallet & card queries
• Lean list response, rich detail response
• null card assignment treated as a valid business state
#buildinpublic#NextJS#MongoDB
Prepaid Wallet System
Built the Members module with atomic member + wallet creation using MongoDB transactions.
Configured a single-node replica set to enable transactions in local development.
Optimized member-wallet lookups using the $in + Map pattern for O(1) mapping.
Prepaid Wallet System
Built Staff Management with CRUD operations.
Added debounced search, role/status filters, and detail panel.
Implemented URLSearchParams and contextual empty states.
#buildinpublic
Prepaid Wallet System
Built Admin Password Reset (PATCH /api/staff/[id]/password)
Invalidated user sessions using tokenVersion
Learned Admin Reset vs Self Password Change flow
Reused checkUpdateHierarchy() to avoid duplicate authorization logic
#buildinpublic
Prepaid Wallet System
Built staff update + status toggle using dynamic PATCH routes
Learned Next.js 15 dynamic params are async and must be awaited
Added instant single-row UI updates without re-fetching the full list
#buildinpublic
Prepaid Wallet System
Built the Staff Management module with pagination, search, and role-based staff creation.
Used Promise.all() to speed up list endpoints.
Enforced hierarchy rules: Super Admin → Admin, Admin → Cashier.
#buildinpublic
Prepaid Wallet POS System
built a dashboard shell with a persistent sidebar, role-based navigation, CSS Grid layout, and active link highlighting.
Learned why filter().map() is cleaner than map() with null returns.
Used typed NAV_ITEMS for scalable, data-driven navigation.
Prepaid Wallet system
Built the auth system for my Prepaid Wallet POS (Next.js + TS + MongoDB): JWT auth, RBAC, React Context sessions, profile management, and token rotation.
5 days focused on security: bcrypt, JWT verification, session invalidation, and secure logout.
Prepaid Wallet System
- Built My Account features for a Next.js POS system.
-Added token rotation to invalidate old sessions after password changes.
-Updated React Context for instant UI sync without re-fetching session data.
Prepaid Wallet Sysytem
Built RBAC for a Next.js POS system with requireRole() & database-backed authorization.
Explored Edge Runtime limitations & why middleware.ts can't read localStorage.
Used React Context to centralize session verification & eliminate duplicate auth checks.
Prepaid Wallet System
Built JWT + DB-based authentication for a Next.js POS system.
Added tokenVersion checks to block logged-out and deactivated accounts.
Implemented global logout with MongoDB's atomic $inc to invalidate all active tokens instantly.
Prepaid wallet System
Built Super Admin setup for a prepaid wallet POS.
bcrypt password hashing
Service-layer validation
React form state management
#typescript#nextjs