AI-powered, blockchain-enabled public procurement monitoring system for transparent government tendering.
- Government Portal: Create tenders, review bids, get AI-powered recommendations, award contracts
- Vendor Portal: Register companies, browse open tenders, submit competitive bids, track proposal status
- Public Portal: View awarded contracts, verify blockchain audit trails, rate completed projects
- AI Recommendation Engine:
- Statistical price analysis (Z-score based)
- Vendor credibility scoring
- Technical proposal evaluation with NLP
- Fraud detection and anomaly flagging
- Multi-factor weighted scoring (Price 40% + Vendor 35% + Technical 25%)
- Blockchain Audit: Immutable records for tender creation, bid submission, and contract awards
The platform uses an intelligent scoring algorithm that:
- Analyzes bid prices using statistical methods (not just "lowest wins")
- Evaluates vendor reputation and track record
- Assesses technical proposal quality through keyword analysis
- Detects suspicious patterns (collusion, dumping, unrealistic timelines)
- Provides ranked recommendations with detailed score breakdowns
π Read Complete AI Scoring Guide
Frontend:
- React 18 + Vite + Tailwind CSS
- React Router for navigation
- Context API for state management
Backend:
- FastAPI (Python 3.11)
- SQLAlchemy ORM
- PostgreSQL 15
- JWT Authentication
Blockchain:
- Hardhat Development Environment
- Solidity 0.8.20
- Local Ethereum Network
AI/ML:
- NumPy for statistical calculations
- Pandas for data manipulation
- Custom NLP for proposal analysis
- Docker & Docker Compose installed
- Windows: WSL2 enabled (for Docker)
- 8GB RAM minimum
- Ports available: 5173 (frontend), 8000 (backend), 8545 (blockchain), 5432 (database)
git clone https://github.com/yourusername/procurement-transparency.git
cd procurement-transparency# Windows
.\start.bat
# Linux/Mac
chmod +x start.sh
./start.shThis will:
- Build and start all Docker containers
- Initialize the database
- Deploy blockchain smart contracts
- Create the default government account
- Start the frontend, backend, and blockchain services
Frontend: http://localhost:5173
Default Credentials:
- Government Login: Access Code:
GOVT2024SECURE - Vendor Login: Register a new vendor account
To set a custom government access code:
# Using Docker
docker exec -it procurement_backend python -m app.scripts.init_government_account --code YOUR_CUSTOM_CODE
# Example
docker exec -it procurement_backend python -m app.scripts.init_government_account --code GOVT2026ADMINThe access code should be:
- At least 8 characters long
- Alphanumeric (letters and numbers)
- Kept secure and confidential
- Login: Use your access code at http://localhost:5173/government/login
- Create Tender:
- Click "Create New Tender"
- Fill in details: Title, Description, Budget, Deadline, Category
- Submit (automatically recorded on blockchain)
- Review Bids:
- Click on a tender to view all submitted bids
- Click "Get AI Recommendations" to analyze bids
- Review scores: Price, Vendor, Technical, Overall AI Score
- Award Contract:
- Select the winning bid using "Select Winner" button
- Enter justification
- Award is recorded on blockchain
- Register: Create account at http://localhost:5173/vendor/register
- Provide: Vendor ID, Company Name, Email, Registration Number
- Create secure password
- Browse Tenders: View all open tenders on dashboard
- Submit Bid:
- Click "Submit Bid" on any open tender
- Enter: Proposed Price, Delivery Timeline (days), Technical Proposal
- Submit (recorded on blockchain)
- Track Status: Monitor bid status and AI scores after evaluation
- View Contracts: Access http://localhost:5173/public
- Verify Transparency:
- View all awarded contracts
- See bid details and AI scores
- Verify blockchain transaction hashes
- Rate Projects: Provide feedback on completed projects
Edit .env file for custom configuration:
# Database
POSTGRES_USER=procurement_user
POSTGRES_PASSWORD=secure_password_123
POSTGRES_DB=procurement_db
# Backend
SECRET_KEY=your-secret-key-change-in-production
ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=30
# Blockchain
BLOCKCHAIN_RPC_URL=http://blockchain:8545
# AI Engine (Optional LLM Integration)
AI_ENGINE_MODE=rule_based # Options: rule_based, llm_enhanced
OPENAI_API_KEY=your-openai-key # For LLM modeMethod 1: Command Line
docker exec -it procurement_backend python -m app.scripts.init_government_account --code YOUR_CODEMethod 2: Python Script
docker exec -it procurement_backend python
>>> from app.scripts.init_government_account import create_government_account
>>> create_government_account("YOUR_CUSTOM_CODE")The system includes pre-configured demo data:
- 1 Sample Tender (Smart City Surveillance Project)
- 3 Sample Vendors (GreenTech, Nova Smart, ABC Construction)
- 3 Sample Bids with realistic data
# Backend tests
docker exec procurement_backend pytest
# Check AI engine
docker exec procurement_backend python -m app.services.ai_engine# Check what's using the port
netstat -ano | findstr :5173
netstat -ano | findstr :8000
# Kill the process or change ports in docker-compose.yml# Reset database
docker-compose down -v
docker-compose up -d# Restart blockchain service
docker-compose restart blockchain# Check backend logs
docker logs procurement_backend
# Verify backend is running
docker ps | findstr backendThe AI recommendation system evaluates each bid across three dimensions:
- Uses statistical Z-score analysis
- Compares bid to average of all bids
- Rewards competitive pricing
- Penalizes extreme outliers (both high and low)
- Why not just "lowest wins"? Prevents unrealistic lowball bids that lead to project failures
- Company reputation (0-5 stars)
- Completed projects count
- Total contract wins
- Average customer ratings
- Builds over time as vendors complete more projects
- Proposal quality (length, keywords, technical depth)
- Timeline feasibility (optimal: 30-90 days)
- Professional language detection
- Keywords matter: methodology, experience, compliance, quality, etc.
Base Score = (Price Γ 0.40) + (Vendor Γ 0.35) + (Technical Γ 0.25)
Then adjusted based on:
- Success conditions met (price, timeline, reputation)
- Anomaly detection (fraud patterns, collusion)
π Read Full Scoring Explanation
- β JWT-based authentication
- β Password hashing with bcrypt
- β Role-based access control (Government, Vendor, Public)
- β Blockchain audit trail (immutable records)
- β SQL injection protection (SQLAlchemy ORM)
- β CORS configuration for API security
Once running, access interactive API docs:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
procurement-transparency/
βββ frontend/ # React frontend
β βββ src/
β β βββ components/ # Reusable UI components
β β βββ pages/ # Page components
β β βββ contexts/ # Auth context
β β βββ services/ # API calls
β βββ package.json
βββ backend/ # FastAPI backend
β βββ app/
β β βββ routes/ # API endpoints
β β βββ services/ # Business logic (AI, blockchain)
β β βββ db/ # Database models
β β βββ schemas/ # Pydantic models
β βββ requirements.txt
βββ blockchain/ # Smart contracts
β βββ contracts/ # Solidity contracts
β βββ scripts/ # Deployment scripts
βββ db/ # Database initialization
βββ docker-compose.yml # Container orchestration
βββ README.md
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
MIT License - see LICENSE file for details
- Documentation: Check HOW_SCORING_WORKS_SIMPLE.md
- Issues: GitHub Issues
- Email: support@procurement-platform.com
- Multi-language support
- Email notifications for bid updates
- Advanced analytics dashboard
- LLM integration for semantic proposal analysis
- Mobile application
- Export reports (PDF, Excel)
- Integration with e-signature services
Built with β€οΈ for transparent governance and fair procurement