Rakib Logo
Work
Blog
About
Contact
RESUMEGITHUB
Back to Works
E-Commerce Solution

InputGears—TechGadgetStore

Full-stack e-commerce platform with multi-role admin panel, Redis caching, domain-driven architecture, and Stripe payments. Handles inventory, coupons, wishlists, and shipping zones.

Client

Independent Build

Year

2025

Role

Lead Full Stack Developer

LIVE
CODE
Input Gears — Tech Gadget Store

The Challenge

Building a complex shopping cart system that persists state across reloads without hydration errors, while ensuring secure user authentication and inventory synchronization with a PostgreSQL database.

TECHNOLOGIES USED

🎨 Frontend
Next.js 16TypeScriptTailwind CSS v4Shadcn UIFramer MotionZustandRecharts
⚙️ Backend
Server ActionsBetter-AuthStripe WebhooksUpstash RedisZod Validation
🗄️ Database
PostgreSQLPrisma ORM
🚀 DevOps
VercelCloudinary

The Solution

→ Zustand state management for instant cart interactions. → Better-Auth for secure, type-safe credential & social logins. → Next.js 16 App Router + Prisma ORM for ACID-compliant order transactions. → Stripe integration for secure webhook-based payments.

typescript.ts
Loading code...
0%

Type Safety

0ms

State Updates

Powered by Upstash Redis Caching

0/100

Performance Score

System Architecture & Security

Domain-Driven Design (DDD)src/
src/├── app/                  # Next.js App Router│   ├── (admin)/          # Secure Dashboard Routes│   ├── (home)/           # Public Storefront│   └── api/              # Backend API & Webhooks├── components/           # Global Reusable UI├── lib/                  # Core Configurations│   ├── prisma.ts         # Database ORM Client│   └── redis.ts          # Upstash Caching Layer└── modules/              # Domain-Driven Core (DDD)    ├── admin/            # RBAC & Inventory Logic    ├── auth/             # Better-Auth Integration    ├── cart/             # Zustand State & Actions    ├── checkout/         # Stripe Payment Flows    └── products/         # Catalog & Search Logic

Security Model

Role-Based Access Control

SUPER_ADMIN

Full system and database access.

MANAGER

Inventory, order fulfillment, and coupon management.

CONTENT_EDITOR

Product descriptions and review moderation.

USER

Cart, wishlist, and personal order history.

Secured via Better-Auth sessions and middleware edge-routing.

Key Decisions

Why Better Auth over Clerk?

Full control over auth logic, no vendor lock-in, type-safe session management.

Why Upstash Redis?

Serverless-compatible rate limiting and caching without managing infrastructure.

Why Domain-Driven Modules?

Features scale independently. Each module owns its own logic — easier to maintain and extend.

What I Learned

Hardest Part

Multi-role access control with 4 permission levels across storefront and admin — getting the middleware logic right took significant planning.

Biggest Insight

Redis caching strategy matters more than raw database optimization for read-heavy e-commerce pages.

Do Differently

I would implement optimistic UI updates for the cart actions to make the user experience feel even more instantaneous.

Key Highlights

Multi-Role Admin

Comprehensive role-based access control and inventory management dashboard.

Redis Caching

Lightning-fast data retrieval and session management using Upstash Redis.

Stripe + COD

Flexible checkout options supporting both secure Stripe payments and Cash on Delivery.

Domain-Driven Design

Scalable architecture separating core business logic from UI components.

Next Project

Sneho - Child Care Connect

View Case Study