Rakib Logo
Work
Blog
About
Contact
RESUMEGITHUB
Back to Works
Full Stack / B2B SaaS

CiscoChemicals-B2BManufacturingPlatform

A B2B procurement platform featuring RAG-powered AI assistance, automated RFQ workflows, dynamic PDF invoicing, and Stripe-secured checkout. Built with Next.js 15, Payload CMS 3.0, and PostgreSQL (NeonDB).

Client

Concept Project

Year

2026

Role

Lead Full Stack Developer

LIVE
CODE
Cisco Chemicals - B2B Manufacturing Platform

The Challenge

The core challenge was bridging the gap between static content and dynamic AI interactions. Implementing a RAG-based AI assistant that accurately retrieves real-time product specs from PayloadCMS was complex. Additionally, orchestrating the 'Quote-to-Invoice' workflowβ€”where approved quotes automatically trigger PDF generation and email dispatch via Server Actionsβ€”required precise state management to prevent data inconsistencies.

TECHNOLOGIES USED

🎨 Frontend
Next.js 15 (App Router)TypeScriptTailwind CSS v4Shadcn UIRecharts
βš™οΈ Backend
PayloadCMS 3.0Google Gemini AI (RAG)Stripe PaymentsReact PDFResend
πŸ—„οΈ Database
Neon DBDrizzle ORM
πŸš€ DevOps
Vercel

The Solution

β†’ Next.js 15 + PayloadCMS 3.0 + Neon DB for a robust, type-safe architecture. β†’ Google Gemini 1.5 Flash (RAG) for AI-driven live inventory intelligence. β†’ Stripe + Payload Hooks + Resend for automated quoting and invoicing workflows.

typescript.ts
Loading code...
0%

Type Safety

0%

Email Automation

0+

Core Integrations

System Architecture & Security

Domain-Driven Design (DDD)src/
src/β”œβ”€β”€ app/                    # Next.js App Routerβ”‚   β”œβ”€β”€ (app)/              # Client routes (Cart, Checkout, Profile)β”‚   β”‚   β”œβ”€β”€ (home)/         # Public homepage & pricingβ”‚   β”‚   β”œβ”€β”€ checkout/       # Client checkout UIβ”‚   β”‚   └── quick-order/    # Bulk ordering routeβ”‚   β”œβ”€β”€ (payload)/          # CMS admin dashboard routerβ”‚   └── api/chat/           # RAG streaming endpointβ”œβ”€β”€ collections/            # Payload CMS schemasβ”‚   β”œβ”€β”€ Products.ts         # Inventory & filtersβ”‚   β”œβ”€β”€ Quotes.ts            # RFQ workflow + email hooksβ”‚   β”œβ”€β”€ Orders.ts            # Order recordsβ”‚   └── Users.ts              # Auth + RBAC schemaβ”œβ”€β”€ modules/                 # Domain logic (auth, checkout, dashboard)└── providers/                # Global state (Currency, Theme, Query)

Security Model

Role-Based Access Control

ADMIN

Full system access, including database records and the Executive Analytics Dashboard.

SALES_MANAGER

Add/update products and categories, approve and modify bulk quote pricing.

USER / CUSTOMER

Browse products, manage profile, submit orders and RFQ (Request for Quote) submissions.

Secured via Payload CMS access control and collection-level field permissions.

Key Decisions

Why PayloadCMS over WordPress?

Needed a developer-first, headless CMS that seamlessly integrates with a modern Next.js stack while providing strong typing via TypeScript.

Why RAG for the AI?

LLMs hallucinate. By using Retrieval-Augmented Generation, we forced the AI to only answer using the exact stock data from our database.

Why React PDF?

We needed pixel-perfect, automated invoice generation. React PDF allowed us to build invoices using the same component logic we use for the web.

What I Learned

Hardest Part

Orchestrating the post-purchase webhook lifecycle where Stripe confirms payment, triggers Payload hooks, generates a PDF, and emails the client via Resend.

Biggest Insight

Serverless databases (Neon) are incredible for scaling, but managing connection pooling in serverless functions is critical to prevent cold start timeouts.

Do Differently

I would introduce a queueing system like Upstash/Redis for the email processing to ensure the checkout UI resolves instantly regardless of third-party API delays.

Key Highlights

B2B RFQ System

Complete 'Request for Quote' workflow allowing admins to approve custom prices & quantities.

AI Product Assistant

RAG-based Chatbot using Gemini 1.5 Flash that answers queries based on live inventory data.

Dynamic Invoicing

Automated generation of downloadable PDF invoices with unique transaction IDs post-payment.

Admin Analytics

Visual dashboard using Recharts to track monthly sales, quote conversion rates, and inventory.

Next Project

Input Gears β€” Tech Gadget Store

View Case Study