[My Projects]

Multipurpose Inventory & Business Management System

A full-stack, all-in-one platform built to solve one core problem: how do you fit retail, restaurant, and service-based businesses into a single inventory system without breaking the data model?The ProblemMost inventory software is built around one assumption — that a "product" is a fixed, sellable unit sitting on a shelf. That works fine for a retail shop, but it completely breaks down the moment you try to apply it to other business types:A retail business sells finished products directly from stock.A restaurant doesn't sell "products" in that sense — it buys raw ingredients, combines them into prepared items through a recipe-like process, and only then sells the final dish. Stock here isn't static, it's transformed.A service business doesn't have physical stock at all. It sells time, skill, or a service package — yet it still needs to be tracked, invoiced, and reported on alongside everything else.These three models have fundamentally different data structures, different stock behavior, and different sales logic. Most existing tools force you to pick one model and hack around the rest. I wanted to build a system where all three could coexist in the same database, the same dashboard, and the same reporting layer — without one business type's logic corrupting another's.The Core Design ChallengeThe real engineering problem wasn't building CRUD screens. It was designing a schema and workflow that could answer questions like:How do you track "stock" for something that doesn't physically exist (a service)?How do you connect a sale to inventory when the sold item (a prepared dish) is made from other inventory items (raw ingredients) that need to be deducted automatically?How do you keep one unified dashboard, one wastage report, and one sales report that make sense regardless of which business type generated the data?The SolutionI split the domain into distinct but connected modules instead of forcing everything into one generic "product" table:Product — for standard retail items sold as-is.Raw Product — for restaurant-style ingredients purchased in bulk.Prepared Product — items built from raw products through a defined composition, so selling one automatically deducts the correct quantity from the linked raw materials.Service — a separate sellable entity with no physical stock, but still fully integrated into invoicing, sales, and reporting.All four flow into the same purchase, sale, invoice, and dashboard layer, so a business owner running a hybrid operation — say, a restaurant that also sells packaged retail goods and offers catering as a service — can manage everything from one place instead of three disconnected tools.Core FeaturesInventory and StockSeparate tracking for products, raw materials, and prepared itemsAutomatic raw material deduction when a prepared product is soldWastage reporting and manual stock adjustmentsSales and PurchasesPurchase management with supplier recordsSales processing with customer due trackingInvoice generation covering products, prepared items, and services in one billReturn and refund handlingDashboard and ReportingUnified business overview regardless of business typeKPI cards and sales/purchase trend chartsActivity log for accountability across all modulesAccess ControlRole-aware modules with a foundation for staff permissions, still is not included yet.Tech StackLayerTechnologyFrontendNext.js, React, Tailwind CSS, TanStack QueryForms/ValidationReact Hook Form + ZodUIShadcn UI pattern componentsBackendNode.js, Express.js, Prisma ORMDatabasePostgreSQLAuthJWT-based patternsToolingTypeScript, pnpm workspaces, Docker, VitestArchitectureBuilt as a modular monorepo:inventory/├── multipurpose-inventory-backend/   -> Express + Prisma API└── multipurpose-inventory-management/ -> Next.js dashboard appThe backend models each business type as its own domain (product, raw product, prepared product, service) but joins them at the transaction level — purchase, sale, and invoice — so the frontend dashboard never has to know or care which business type generated a given record.Core Modulesaccount, activity log, auth, category, customer, dashboard, invoice, prepared product, product, purchase, raw product, return, sale, service, staff, supplier, trash, unit, wastageCurrent StatusThe core workflows for all three business models — dashboard, product management, purchases, sales, and supplier/customer tracking — are functional and live in production. The staff role and permission system is not included yet.This project came from a genuine gap I noticed: most inventory tools assume one business type. Building a schema that could honestly represent retail stock, restaurant transformation, and service-based sales in one coherent system was the hardest and most rewarding part of this build.

Next.jsTailwind CSSTanStack QueryReact Hook FormZodShadcnExpress.jsPrismaPostgreSQL
Single Vendor E-Commerce — Microservices Architecture

A scalable, niche-agnostic e-commerce engine built on a microservices backend.  This project is a single-vendor e-commerce platform designed not for one specific niche, but as a reusable commerce engine — flexible enough to power a fashion store, an electronics shop, a beauty brand, or a grocery business, all with the same underlying architecture.The core focus wasn't just "build an online store" — it was build a scalable, service-oriented system that could grow without collapsing under its own complexity.Why Microservices?A typical monolithic e-commerce app works fine at small scale, but breaks down when:Product catalog logic starts mixing with cart/session logicInventory updates need to stay consistent under order loadDifferent teams need to work on different domains independentlySo instead, I split the backend into independent, purpose-built services, connected through an API Gateway.Backend ServicesServiceResponsibilityapi-gatewayCentral routing, public API accessuser-serviceAuthentication, users, account logicproduct-serviceProduct catalog managementcart-serviceShopping cart behavior via Redisinventory-serviceStock and inventory validationorder-serviceOrder creation, processing, paymentsCore FeaturesCustomer ExperienceProduct browsing, search, and detail pagesRedis-powered cart for fast, session-based shoppingFull checkout and order flowAuthenticated customer accountsStore ManagementProduct creation and inventory trackingOrder management and sales monitoringAdmin-friendly dashboardsBrand/storefront customization supportTech StackLayerTechnologyBackendNode.js, NestJS, TypeScriptDatabasePostgreSQL, MongoDB (per-service)Cache/CartRedisFrontendNext.js, React, TypeScript, TailwindInfraDocker, Docker ComposeArchitectureMicroservices + API Gateway🧩 Key Engineering DecisionsService isolation: Each domain (users, products, cart, orders, inventory) is independently deployable and scalableRedis for cart: Chosen for speed and to avoid unnecessary database writes during active shopping sessionsShared protocol definitions: Used for consistent internal service-to-service communicationDocker Compose orchestration: For reproducible local development matching production topologyThis project was built to sharpen my understanding of distributed system design — service boundaries, inter-service communication, and building a backend that can genuinely scale, not just run.

Node.jsNestJSTypeScriptPostgreSQLMongoDBRedisNextJSRedisDockerSocket.io
About Dhaka — Digital City Discovery Platform

A modern city discovery and digital directory platform for Dhaka, powered by AI. Dhaka is one of the busiest megacities in the world, yet finding reliable information about hospitals, restaurants, transport, and local services remains surprisingly difficult. About Dhaka was built to solve this — a single digital ecosystem that brings scattered city information into one searchable, AI-powered platform.This isn't just a directory. It's a step toward making Dhaka smarter, more connected, and more digital.The ProblemResidents and visitors of Dhaka often struggle with:Finding trustworthy medical care and specialists nearbyNavigating bus routes without centralized transit infoDiscovering local restaurants, places, and servicesGetting quick answers without digging through scattered sourcesThe SolutionI built a Next.js-based city platform that centralizes local information and layers an AI assistant on top for natural language search — so instead of browsing five different pages, a user can simply ask:"Which cardiologist is near Dhanmondi?"...and get a relevant, contextual answer instantly.Key FeaturesCity Discovery & DirectoryBrowse hospitals, doctors, restaurants, places, and vet clinicsCategory and area-based filteringLocal blog and city storiesSmart Transit SupportBus route and nearest stop lookupRoute-aware navigation assistance for commutersAI City AssistantNatural language queries for hospitals, restaurants, places & transportSmart intent detection built with Groq/OpenAI integrationContext-aware, fast local recommendationsPC Builder ToolPersonalized component suggestions based on user needs and budgetAdmin DashboardFull CRUD management for hospitals, doctors, restaurants, shops, blogs, and bus dataSecure admin authentication flowTech StackLayerTechnologyFrontendNext.js 16, React 19, TypeScript, Tailwind CSSBackend/DBMongoDB + MongooseData FetchingTanStack QueryUIShadcn-style componentsAIGroq / OpenAI integrationMapsLeafletMediaCloudinaryArchitecture HighlightsThe platform combines four major layers into one cohesive system:Public-facing city portal — for general discovery and browsingData-heavy service directory — structured listings across multiple categoriesAI assistant layer — natural language interface over the same datasetAdmin dashboard — for publishing and managing all city dataRoadmapReal-time bus/transit data integrationUser-generated reviews and ratingsMap-based navigationDeeper personalization in AI recommendationAbout Dhaka reflects my interest in building practical, locally-relevant products — combining modern web architecture with AI to solve a real, everyday problem for an entire city.

Next.jsTypeScriptTailwind CSSMongoDBTanStack QueryShadcnAI integrationLeaflet
Bengal Booking

Full-stack Event Discovery & Ticket Booking Platform (MVP)Bengal Booking is an event marketplace designed to connect event organizers with people looking for things to do. Users can browse published events by category, location, and search terms, select different ticket types, and reserve tickets through a short-lived pending booking. Sellers can create and manage their own events and inventory, while super administrators have full control over users, categories, locations, events, tickets, and payments.The project was built as a separate Next.js frontend and NestJS backend with a strong focus on a reliable booking foundation. The core challenge was preventing two users from successfully reserving the same ticket during concurrent checkout attempts. This was solved using ticket-level inventory, immediate Redis-backed distributed locks, a ten-minute payment window, payment confirmation, and automatic expiry handling.Key FeaturesFor UsersBrowse and filter published events by category, division/area, and text searchView detailed event information including venue, dates, ticket types, prices, and booking limitsRegister with email/password or Google OAuth and verify emailReserve available tickets, submit buyer details, and confirm paymentView personal booking history and statusFor SellersCreate and manage owned eventsConfigure event dates, venue details, booking/cancellation deadlines, payment type, and max tickets per bookingCreate multiple ticket types with name, description, price, and inventoryTrack bookings and view seller dashboardFor Super AdminsManage users and account statusManage categories, divisions, and areasOversee all events, tickets, and paymentsAccess platform-level dashboard summariesTechnical HighlightsConcurrency control: Redis locks (ticket_lock:{ticketId}) ensure only one booking can hold a ticket at a time. Locks are acquired before creating a pending booking and released on confirm, expire, or failure.Booking lifecycle: Select tickets → Acquire Redis locks → Create pending booking (10-min expiry) → Confirm payment (tickets marked SOLD) or Expire (tickets released back to AVAILABLE).No waiting queue: Unavailable tickets fail immediately instead of putting users in an indefinite queue.Role-based authorization with JWT (HttpOnly cookie) and Google OAuth.Clean separation of concerns with dedicated modules for Auth, Booking, Event, Ticket, Payment, Dashboard, etc.Tech StackFrontend: Next.js 15 (App Router), React 19, TypeScript, Tailwind CSS, TanStack Query, Zustand, React Hook Form, Zod, RechartsBackend: NestJS 11, TypeScript, Prisma ORM, Passport JWT, Google OAuth2, class-validator, VitestDatabase & Cache: PostgreSQL + Redis (ioredis)Infrastructure: Docker Compose for local developmentMy ContributionI designed and implemented the complete booking system — from ticket selection and Redis locking to pending bookings, payment confirmation, expiry handling, and role-based access control. The focus was on building a dependable foundation that keeps ticket availability consistent under concurrent load while remaining simple and maintainable.System DesignView detailed System DesignThis is currently an MVP. The core domain model and concurrency-sensitive booking flow are complete. Future work includes real payment-provider integration, email notifications, richer dashboards, and additional production hardening.

Next.jsTypeScriptTailwind CSSTanStack QueryZustandReact Hook FormZodRechartJWTOAuth2PostgreSQLPrismaRedisDocker
Microservice-based URL Shortener

A modern Microservice-based URL Shortener built with Next.js, Node.js, Express, Prisma, Neon PostgreSQL, Upstash Redis, and Docker. The architecture focuses on scalability, loose coupling, high performance, and production-ready deployment.🔗 Live DemoFrontend: https://lily-link.vercel.appRepository: https://github.com/meheraj786/microservice-url-link-shortenerSystem-Design(HLD): https://meherajdev.vercel.app/system-designs/design-url-shortner🛠️ Tech StackFrontend (User Interface)Framework: Next.js 16 (App Router)Styling: Tailwind CSS v4 + HeroUI (formerly NextUI)HTTP Client: Axios with automatic JWT token injection via interceptorsDeployment: Vercel (Production Static Optimization)Backend (Microservices Core)Runtime: Node.js + Express + TypeScriptORM: Prisma (v6 & v7)Database: Neon PostgreSQLuser_schemaurl_schemaCaching: Upstash Redis (Serverless Distributed Cache)API Gateway: Dockerized NginxReverse ProxySSL HandshakingCustom CORS PreflightNative Rate Limiting (HTTP 429)Infrastructure & DevOpsContainerization: DockerOptimized Builds: Multi-stage DockerfilesLocal Orchestration: Docker ComposeCI/CD: GitHub ActionsDeployment Strategy:Backend → RenderFrontend → Vercel✨ Features🔐 JWT AuthenticationSecure user registration and login handled by the dedicated user-service.🔗 Logical Foreign KeysIndependent microservices communicate using loose-coupled userId string references without enforcing physical database foreign keys.⚡ Distributed CachingURL lookups first query Upstash Redis (O(1)), then fall back to PostgreSQL, significantly reducing database load.🌐 API GatewaySingle centralized gateway powered by Nginx, hiding downstream services behind one public endpoint.🛡️ DDoS ProtectionBuilt-in Nginx rate limiting automatically returns HTTP 429 Too Many Requests during excessive traffic.🚀 Monorepo CI/CDGitHub Actions deploy only affected applications based on commit prefixes.Commit PrefixActionbackend:Build & Deploy Backend to Renderfrontend:Build & Deploy Frontend to Vercel📂 Project Structurelily-link/│├── .github/│   └── workflows/│       └── ci-cd.yml│├── gateway/│   ├── nginx.conf│   └── Dockerfile│├── services/│   ├── url-service/│   │   ├── src/│   │   └── Dockerfile│   ││   └── user-service/│       ├── src/│       └── Dockerfile│├── frontend/│├── docker-compose.yml│└── .env.sample🚀 Local DevelopmentPrerequisitesDockerDocker ComposeNode.jspnpm1️⃣ Clone the Repositorygit clone https://github.com/meheraj786/microservice-url-link-shortener.gitcd url-shortener2️⃣ Configure Environment VariablesCreate a .env file in the project root by following the .env.sample template.3️⃣ Start All Servicesdocker compose up --build4️⃣ Verify API GatewayThe Nginx API Gateway runs on Port 80.Health Check:curl http://localhost/health📦 MicroservicesServiceResponsibilityuser-serviceAuthentication, User Management, JWTurl-serviceURL Shortening, Redirects, Redis CachegatewayReverse Proxy, CORS, Rate Limiting⚙️ Architecture HighlightsMicroservice ArchitectureDockerized InfrastructureShared PostgreSQL with Isolated SchemasDistributed Redis CacheCentralized API GatewayJWT AuthenticationConditional GitHub Actions CI/CDProduction Ready DeploymentLoose Coupling Between Services🛡️ SecurityJWT AuthenticationSecure Password HashingNginx Rate LimitingCustom CORS HandlingReverse Proxy IsolationEnvironment Variable Configuration🚀 DeploymentServicePlatformFrontendVercelBackendRenderDatabaseNeon PostgreSQLCacheUpstash RedisGatewayDocker + Nginx👨‍💻 AuthorMeheraj HosenGitHub: https://github.com/meheraj786📄 LicenseThis project is licensed under the MIT License.

NextjsTailwindCSSHeroUiAxiosNodeJsExpressJsPrismaPostgreSQLRedisDockerNginx
BUG Social App

A modern social media web application with features like posts, friends, messaging, groups, pages, and notifications – built using Vite + React + Tailwind on the frontend and Firebase on the backend.✨ Features👤 Account & ProfileEasy Signup / Login / LogoutComplete Profile Page (Photo, Cover, Bio, Location)Ability to post on own profile📝 Posts & FeedCreate Text + Image PostsFeed Tabs: Global / Following / GroupsEdit & Delete PostShare Post (with original content)Event / Job / Product type PostsAdd Story option & reply to story messages💬 InteractionLike / Reaction CountComment (Add / Edit / Delete)Share to Timeline👥 Friends & Follow SystemFriend Request (Send / Accept / Cancel)Friend List & Unfriend optionUser/Page Follow & Unfollow✉️ MessagingDirect Message (DM)Group Chat & Page Inbox MessagingQuick DM (Auto message from Interested/Buy/Apply click)Typing Tracker (see when someone is typing)🔔 NotificationsLike, Comment, Follow/Unfollow, Friend Actions & Message NotificationsUnseen Badge & Seen Support📄 Page SystemCreate Page & View ListPage Profile & Post as PageFollower CTA: Interested / Buy / Apply👨‍👩‍👧 Group SystemGroup Posts (Admin / Member / Anonymous)Group ChatSeparate Tab for My Group PostsPublic & Private Group System🔎 Search & NavigationSearch Box & Result ModalNavbar: Home / Notifications / Messages / Profile🎨 UI HelpersLoader, Skeleton, ToastFullscreen Overlay & Modal⚡ OthersCustom 404 PageProtected Route (Profile access only after login)🛠️ Tech StackFrontend: Vite + React + Tailwind CSSBackend: Firebase (Auth, Firestore, Storage, Realtime DB)

vitereacttailwindfirebase
© 2026 Mehraj Hosen. All rights reserved.