A revolutionary technology aimed to digitise the hassle of tenders through analog means.
SBP achieves this using a secure smart contract based backend, and an AI validation model which comprehensively checks for compliance of a Certain tender, and regulations to be followed.
Built using Next.js and Actix Web
- Next.js 16 - React framework with App Router
- shadcn/ui - Beautiful, accessible UI components
- Tailwind CSS - Utility-first CSS framework
- TypeScript - Type-safe development
- Actix Web (Rust) - Fast, secure web framework
- MongoDB - NoSQL database for flexible data storage
- JWT Authentication - Secure token-based auth
- bcrypt - Password hashing
smartbidpro/
├── app/ # Next.js pages
│ ├── login/ # Login page
│ ├── dashboard/ # Dashboard page
│ └── page.tsx # Home page (redirects)
├── components/ui/ # shadcn/ui components
│ ├── button.tsx
│ ├── card.tsx
│ └── input.tsx
├── lib/ # Utility functions
│ └── utils.ts
├── backend/ # Rust backend
│ ├── src/
│ │ ├── main.rs # Entry point
│ │ ├── auth.rs # JWT authentication
│ │ ├── db.rs # MongoDB connection
│ │ ├── models.rs # Data models
│ │ └── routes/ # API endpoints
│ │ ├── auth.rs # Auth routes
│ │ └── auctions.rs # Auction CRUD
│ └── Cargo.toml # Rust dependencies
├── package.json # Node dependencies
├── contracts/ # Solidity Smart Contracts (Foundry)
│ ├── src/
│ │ └── TenderNotary.sol
│ └── foundry.toml
├── fabric/ # Hyperledger Fabric Go Chaincode (In Progress)
- Node.js 20+ installed
- Rust toolchain installed
- MongoDB running locally or connection URI
- Navigate to the backend directory:
cd backend- Create a
.envfile with your configuration:
# Database (If using WSL to connect to Windows MongoDB, use the Windows Host IP and add ?directConnection=true)
MONGODB_URI=mongodb://localhost:27017/smartbidpro
JWT_SECRET=your-secret-key-change-this-in-production
ACTIX_PORT=8000
ACTIX_ADDRESS=0.0.0.0
# Gemini API Key for AI Compliance Checking
GEMINI_API_KEY=your-gemini-api-key
# Ethereum Notary (Anvil)
ETH_RPC_URL=http://127.0.0.1:8545
ETH_NOTARY_CONTRACT_ADDRESS=your-notary-contract-address
ETH_PRIVATE_KEY=your-ethereum-private-key- Build and run the backend:
cargo build
cargo runThe Actix server will start on http://localhost:8000
z
- Navigate to the project root:
cd ..- Install dependencies:
npm install- Run the development server:
npm run devThe project uses a Hybrid Web2.5 architecture. You must deploy the TenderNotary contract to a local Ethereum node to enable the public audit trail.
- Start a Local Node In a separate terminal, start the Anvil development chain (included with Foundry):
anvilKeep this running. It provides the RPC endpoint and 10 pre-funded test accounts.
- Deploy the Notary Contract Navigate to the contracts/ directory and run the deployment command. Replace <PRIVATE_KEY> with the first private key provided by Anvil (usually starts with 0xac09...).
cd contracts
forge create src/TenderNotary.sol:TenderNotary \
--rpc-url http://127.0.0.1:8545 \
--private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 \
--broadcast- Update Environment Variables Once deployed, the terminal will output a Deployed to: address. Copy this value and update your backend/.env:
ETH_NOTARY_CONTRACT_ADDRESS=<YOUR_NOTARY_ADDRESS> # Replace with your actual address
ETH_RPC_URL=http://127.0.0.1:8545
ETH_PRIVATE_KEY=<YOUR_ANVIL_PRIVATE_KEY>The Next.js app will start on http://localhost:3000
To make changes:
- Backend: Edit files in
backend/src/, rebuild withcargo build - Frontend: Edit files in
app/orcomponents/, changes hot-reload automatically - Populating Users: Run /scripts/create-test-user.js using node to seed users into your database