A full-stack application for managing orders using blockchain technology, built with Node.js, Express, TypeScript, React, Sequelize, and Hyperledger Fabric.
- User registration and authentication (JWT)
- Order creation, listing, and management
- Blockchain integration for order immutability (Hyperledger Fabric)
- PostgreSQL database with Sequelize ORM
- RESTful API backend
- Modern React frontend (with Dashboard, Login, Register, OrderCard components)
backend/ # Node.js + Express + Sequelize API
config/ # DB and Fabric config
controllers/ # Route controllers
middleware/ # Auth middleware
models/ # Sequelize models
routes/ # API routes
server.js # Main server entry
chaincode/ # Hyperledger Fabric chaincode (Go)
frontend/ # React frontend (TypeScript)
components/ # UI components
planning/ # Project planning docs
scripts/ # Setup and deployment scripts
- Node.js (v18+ recommended)
- PostgreSQL (running on default port 5432)
- Hyperledger Fabric (for blockchain features)
- Clone the repo:
git clone <repo-url> cd BlockChain Oms - Install dependencies:
npm install - Configure environment:
- Copy
.envto project root and set DB credentials:DB_NAME=blockchain_oms DB_USER=postgres DB_PASSWORD=secret DB_HOST=localhost JWT_SECRET=your_jwt_secret PORT=5000
- Copy
- Start PostgreSQL:
- Ensure your PostgreSQL server is running and accessible.
- Build backend TypeScript (if needed):
npm run build - Start the backend server:
npm run dev - Frontend:
- (Add your React frontend start instructions here)
POST /api/register— Register a new userPOST /api/login— Login and get JWTGET /api/orders— List all orders (auth required)POST /api/orders— Create a new order (auth required)GET /api/ping— Health check
- Chaincode is in
chaincode/order_chaincode.go - Scripts for Fabric setup in
scripts/
- Backend: Node.js, Express, Sequelize, JWT
- Frontend: React, TypeScript
- Blockchain: Hyperledger Fabric, Go
MIT
