Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VendorBridge

VendorBridge is a comprehensive procurement ERP system that digitizes the entire vendor lifecycle. From initial Request for Quotation (RFQ) to vendor bidding, managerial approvals, purchase order generation, and final invoice settlement, VendorBridge replaces manual, spreadsheet-based processes with a structured, role-based workflow.

Built for the Odoo x KSV Hackathon.

Live Demo: https://vendorbridgeerp.vercel.app


Live Demo

Link Description
vendorbridgeerp.vercel.app Production deployment

Test accounts — password for all: Test@1234

Seed the database with 4 accounts and 7 ready-made scenarios by running:

cd backend
npm run scenarios
Email Role What you can do
admin@test.com Admin Full system access — see everything
officer@test.com Officer Create RFQs, view quotation comparisons
manager@test.com Manager Approve / Reject / Send-back quotations
vendor@test.com Vendor Submit quotations, view your POs & remarks

Pre-built scenarios (loaded by npm run scenarios)

# RFQ State
S1 Laptop Procurement Q3 2026 PENDING → decide as manager@test.com
S2 Office Stationery Bundle APPROVED + PO → vendor@test.com sees PO
S3 Packaging Materials Q2 2026 RETURNED with remark → vendor@test.com sees remark
S4 Data Centre Server Hardware REJECTED
S5 Security Camera Upgrade DRAFT (officer only, not yet published)
S6 Meeting Room Furniture OVERDUE (deadline passed, no quotes)
S7 Fleet Management Software APPROVED + 2nd PO for vendor

Suggested manual test flow (after running npm run scenarios)

  1. Manager (manager@test.com) → Quotations → open Laptop Procurement → Approve, Reject, or Send Back
  2. Vendor (vendor@test.com) → Purchase Orders → see the auto-generated PO (2 already exist from S2 + S7)
  3. Vendor → Quotations → see the RETURNED remark on Packaging Materials (S3)
  4. Officer (officer@test.com) → RFQs → open the DRAFT and publish it, or create a fresh RFQ
  5. Admin (admin@test.com) → full view of vendors, approvals, reports, activity log

Tech Stack

Category Technology Version
Frontend Framework Next.js (App Router) 16.x
UI Library React 19.x
Language TypeScript 6.x
Styling Tailwind CSS v4
UI Components shadcn/ui (Radix UI) Latest
Icons Lucide React Latest
Charts Recharts v3
Data Fetching TanStack React Query v5
Authentication NextAuth.js v4
HTTP Client Axios v1
PDF Export jsPDF + jspdf-autotable Latest
Toast Notifications Sonner Latest
Forms React Hook Form + Zod Latest
Backend Framework Express.js v5
ORM Prisma v6
Database PostgreSQL (Neon) Latest
File Uploads AWS S3 + Multer Latest
Email Nodemailer (Gmail SMTP) Latest
Deployment Vercel Latest

Dev ports: Frontend 3000 - Backend API 5000


Project Structure

VendorBridge/
├── frontend/          # Next.js 16 App Router
│   ├── src/
│   │   ├── app/          # Pages (dashboard, rfqs, vendors, invoices...)
│   │   ├── components/   # AppShell, UI components (shadcn/ui)
│   │   ├── hooks/        # TanStack Query hooks
│   │   ├── repositories/ # Data access layer
│   │   ├── lib/          # Auth, permissions, formatters
│   │   ├── store/        # Notifications store
│   │   └── types/        # Domain types
├── backend/           # Express + Prisma REST API
│   ├── src/
│   │   ├── controllers/  # Route handlers
│   │   ├── routes/       # Express routers
│   │   ├── middleware/   # JWT auth, file upload
│   │   ├── services/     # Business logic (auth)
│   │   └── utils/        # Prisma client, mailer, S3
│   └── prisma/
│       ├── schema.prisma # Database schema
│       └── seed.ts       # Demo data seeder
└── README.md

Local Setup

Prerequisites

  • Node.js 18+
  • PostgreSQL database (or Neon free tier)
  • Gmail account with App Password enabled
  • AWS S3 bucket (for file uploads)

1. Clone the repository

git clone https://github.com/RhythmItaliya/VendorBridge.git
cd VendorBridge

2. Backend Setup

cd backend
npm install

Copy and fill in the environment file:

cp .env.example .env

Edit .env with your values (see Environment Variables section below).

Run database migrations and seed demo data:

npx prisma migrate dev
npm run seed

Start the development server:

npm run dev
# API running at http://localhost:5000

3. Frontend Setup

cd frontend
npm install

Copy and fill in the environment file:

cp .env.example .env.local

Start the development server:

npm run dev
# App running at http://localhost:3000

Environment Variables

Backend — backend/.env

NODE_ENV=development
PORT=5000

# PostgreSQL connection string
DATABASE_URL="postgresql://user:password@localhost:5432/vendorbridge"

# JWT
JWT_SECRET="your-jwt-secret-key"

# Frontend URL (for CORS)
FRONTEND_URL=http://localhost:3000

# SMTP - Gmail App Password
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your-email@gmail.com
SMTP_PASS=your-app-password
SMTP_FROM="VendorBridge <noreply@vendorbridge.com>"

# AWS S3
AWS_REGION=ap-south-1
AWS_ACCESS_KEY_ID=your-access-key-id
AWS_SECRET_ACCESS_KEY=your-secret-access-key
AWS_S3_BUCKET=your-bucket-name

Frontend — frontend/.env.local

# Backend API URL
NEXT_PUBLIC_API_URL=http://localhost:5000/api
NEXT_PUBLIC_APP_ENV=development

# NextAuth
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your-nextauth-secret

Production: Set all variables in your Vercel dashboard under Project -> Settings -> Environment Variables. Update FRONTEND_URL, NEXTAUTH_URL, and NEXT_PUBLIC_API_URL to your Vercel deployment URLs after the first deploy.


The 8-Step Procurement Workflow

Step Actor Action Result
1 Admin Register vendors and users
2 Officer Create RFQ, assign vendors ACTIVE
3 Vendor View RFQ, fill unit prices, submit PENDING
4 Manager Compare quotations side-by-side
5a Manager Approve quotation APPROVED + PO auto-created
5b Manager Reject quotation (optional remark) REJECTED
5c Manager Send Back with mandatory remark RETURNED
6 Vendor Re-submit after send-back (sees remark) PENDING
7 Vendor Fulfil PO by delivery deadline
8 Officer Mark invoice paid PAID

Role Access Matrix

Page Admin Officer Manager Vendor
Dashboard Yes Yes Yes Yes
Vendors Yes Yes view
RFQs Yes Yes + create Yes track only
Quotations Yes compare compare submit
Approvals Yes decide view only Yes decide
Purchase Orders Yes Yes create view view
Invoices Yes Yes pay view view
Reports Yes Yes Yes
Activity Yes Yes Yes Yes

API Reference

All routes require Authorization: Bearer <token> except /api/auth/*.

POST   /api/auth/sign-in
POST   /api/auth/sign-up

GET    /api/vendors            POST /api/vendors
GET    /api/vendors/:id

GET    /api/rfqs               POST /api/rfqs
GET    /api/rfqs/:id

GET    /api/quotations         POST /api/quotations
PATCH  /api/quotations/:id/approve
PATCH  /api/quotations/:id/reject
PATCH  /api/quotations/:id/send-back

GET    /api/approvals
POST   /api/approvals/:id/approve
POST   /api/approvals/:id/reject

GET    /api/orders
GET    /api/orders/:id

GET    /api/invoices
PATCH  /api/invoices/:id/pay

GET    /api/activity
GET    /api/reports/spend
GET    /api/notifications
PATCH  /api/notifications/read-all

Key Conventions

  • Money: All amounts stored as BigInt paise (1 INR = 100 paise). Frontend converts with Number(p) / 100.
  • Status enum: DRAFT | ACTIVE | PENDING | APPROVED | REJECTED | COMPLETED | PAID | OVERDUE
  • Roles: ADMIN | OFFICER | VENDOR | MANAGER (Prisma/DB) vs admin | officer | vendor | manager (frontend)
  • Cross-page links: Orders to Invoices use ?open=<id> URL param read by useSearchParams.

Contributors

Name GitHub
Rutanshu Bhayani github.com/rutanshubhayani
Rhythm Italiya github.com/RhythmItaliya

License

This project was built for the Odoo x KSV Hackathon and is open for educational use.

About

Full-stack procurement ERP Vendors, RFQs, Quotations, Approvals, Purchase Orders & Invoices. Built for Odoo × KSV Hackathon

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages