Project Info
Inspiration
More than 60 million construction workers in India face challenges such as wage theft, delayed payments, and limited access to government benefits due to the absence of formal employment records and a lack of awareness about their labor rights. The construction sector remains highly unorganized, allowing middlemen to manipulate wages and siphon off funds intended for worker welfare. After analyzing recent incidents, existing policies, and government welfare initiatives such as the Building and Other Construction Workers (BOCW) Act and the Occupational Safety and Health Administration (OSHA) Act, we recognized the urgent need for an end-to-end framework that ensures labor welfare is accessible while eliminating worker exploitation and unlawful employment practices in the industry. Ensuring financial security and fair treatment for construction workers requires a system that is both transparent and intelligent. Our project, Nirmaan, leverages Blockchain to create tamper-proof employment records, automate payments, and establish decentralized worker identities, eliminating wage manipulation and unauthorized intermediaries. At the same time, AI powers data-driven insights, worker profiling, and policy education enables an efficient allocation of benefits and ensures compliance with labor regulations. Architecture Diagram Diagram What It Does Nirmaan is a blockchain and AI-powered platform that ensures fair wages, secure payments, and labor welfare for construction workers in developing and diverse economies like India. Work Assignment & Secure Payments Assigns work to construction workers, holds payments securely, and tracks assignment details until payment is released or disputed. Work Assignment & Secure Payments Assigns work to construction workers, holds payments securely, and tracks assignment details until payment is released or disputed. Dispute Resolution & Payment Transparency Allows contractors and workers to raise disputes or release payments, with automatic dispute status updates if payments are delayed. Dispute Resolution & Payment Transparency Allows contractors and workers to raise disputes or release payments, with automatic dispute status updates if payments are delayed. Worker Dashboard & Blockchain Integration Provides workers with a clear view of their assigned work and payment history from the blockchain, ensuring transparency and accountability. Worker Dashboard & Blockchain Integration Provides workers with a clear view of their assigned work and payment history from the blockchain, ensuring transparency and accountability. AI Chatbot for Worker Awareness An AI-powered chatbot educates workers on labor rights, government welfare schemes, and dispute resolution, bridging the awareness gap in the sector. AI Chatbot for Worker Awareness An AI-powered chatbot educates workers on labor rights, government welfare schemes, and dispute resolution, bridging the awareness gap in the sector. How We Built It Frontend Development: Utilized React and Next.js for building a responsive and dynamic user interface. Implemented TypeScript for type safety and better code maintainability. Designed UI components using Tailwind CSS for a modern and consistent look and feel. Integrated React Hooks for managing state and side effects in functional components. Backend Development: Developed a RESTful API using Express.js to handle server-side logic and database interactions. Utilized Node.js for building a scalable and efficient backend. Implemented PostgreSQL as the database to store and manage worker and assignment data. Blockchain Integration: Deployed smart contracts on the Sepolia test network for handling payments and assignments. Utilized ethers.js for interacting with the Ethereum blockchain and smart contracts. Developed smart contracts using Solidity to manage worker payments and assignments. Implemented functions for releasing payments and fetching payment history from the blockchain. Ensured secure and efficient transactions by using MetaMask for wallet integration and transaction signing. Conducted thorough testing of smart contracts using Hardhat to ensure correct functionality and security AI Integration: Fine-tuned a model using OpenAI API to provide personalized guidance to workers, helping them navigate the platform and understand their employment records. Integrated AI-driven responses to educate workers on government welfare policies, ensuring they receive relevant and actionable information based on their queries. What's Next for Nirmaan Expanding to other unorgaized labor sectors such as agriculture and domestic work. Integrating NPCI UPI Payments to make the payments to workers faster. Explore partnership opportunities with real-estate agencies/government construction sites to gauge the real world impact. Nirmaan is just the beginning. Our goal is to create the entire ecosystem / framework of transparent, fair, and secure financial system for India’s workforce.
Nirmaan – Web3-Powered Wage Security
Overview
Nirmaan is a Web3-based platform designed to ensure fair wages, instant payments, and transparent work records for India’s construction workers. By leveraging blockchain, smart contracts, and decentralized identity (DID), Nirmaan eliminates wage theft, prevents fraud, and removes middlemen from the payment process. Workers get paid on time, their employment history is securely recorded, and they can access government benefits without bureaucratic delays.
Architecture
Nirmaan integrates Web3 with real-world financial infrastructure:
- Decentralized Identity (DID): Workers register using Aadhaar, generating an on-chain identity.
- Smart Contracts: Automate wage disbursement and maintain immutable payment logs.
- UPI Integration: Enables instant payouts to verified worker accounts.
Conclusion
Nirmaan aims to create a fair and transparent wage system for construction workers, eliminating financial exploitation and ensuring seamless access to welfare benefits. By integrating Web3 with real-world financial infrastructure, we hope to drive real social impact. Future plans include expanding to other labor sectors and partnering with government agencies.
Setup Instructions
1. Install Dependencies
Backend
cd backend
npm install
Frontend
cd frontend
npm install
Server
cd backend/server
npm install
2. Running the Application
Open four terminals and follow the steps below
Terminal 1: Compile and Start Hardhat Local Blockchain
npx hardhat compile
npx hardhat node
Terminal 2: Deploy Smart Contracts
npx hardhat run scripts/deploy.ts --network localhost
Terminal 3: Start the Frontend
cd frontend
npm run dev
Terminal 4: Start the Backend Server
cd backend/server
node server.js
3. Database Setup
1. Install PostgreSQL (if not already installed)
brew install postgresql
brew services start postgresql
2. Access PostgreSQL
psql -U postgres
3. Create Database & User
CREATE DATABASE nirmaan;
CREATE USER nirmaan_admin WITH PASSWORD 'nirmaan123';
ALTER ROLE nirmaan_admin SET client_encoding TO 'utf8';
ALTER ROLE nirmaan_admin SET default_transaction_isolation TO 'read committed';
ALTER ROLE nirmaan_admin SET timezone TO 'UTC';
GRANT ALL PRIVILEGES ON DATABASE nirmaan TO nirmaan_admin;
Exit PostgreSQL:
\q
4. Connect to the Database
psql -U nirmaan_admin -d nirmaan
5. Create Tables
Workers Table
CREATE TABLE workers (
id SERIAL PRIMARY KEY,
aadhaar_hash TEXT UNIQUE NOT NULL,
name TEXT NOT NULL,
phone TEXT NOT NULL
);
Payments Table
CREATE TABLE payments (
id SERIAL PRIMARY KEY,
worker_id INT REFERENCES workers(id) ON DELETE CASCADE,
amount NUMERIC NOT NULL,
employer TEXT NOT NULL,
transaction_hash TEXT UNIQUE NOT NULL,
paid_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
Citizens Table
CREATE TABLE citizens (
aadhar_number VARCHAR(12) PRIMARY KEY,
full_name VARCHAR(255) NOT NULL,
date_of_birth DATE NOT NULL,
phone_number VARCHAR(15) UNIQUE NOT NULL
);
Assignments Table
CREATE TABLE assignments (
id SERIAL PRIMARY KEY,
contractor_id INT NOT NULL,
aadhaar_number VARCHAR(12) NOT NULL,
expiration_date DATE NOT NULL,
payment NUMERIC(10,2) NOT NULL,
status TEXT NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
Analysis
View
Metric
- 17
- 9
- 8
- 6
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- CSSIn code
- ExpressIn code
- JavaScriptIn code
- Next.jsIn code
- OpenAIIn code
- PostgreSQLIn code
- ReactIn code
- SolidityIn code
- Tailwind CSSIn code
- TypeScriptIn code
10 of 10 appear in the indexed code.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
180 KB
Source files
58
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
samarthchandrawat/nirmaan_v1
76 files · 1.4 MB · @ a9b78d6
Structure
Interface
26 files · 34%Screens, components and styles rendered to the user.
API & routing
8 files · 11%Request entry points: routes, handlers and controllers.
Application logic
10 files · 13%Domain rules, services and shared utilities.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- TypeScript61%
- Markdown20%
- JavaScript13%
- Solidity4%
- CSS2%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
backend/package.json
npm · 29- @openzeppelin/contracts
- @rainbow-me/rainbowkit
- @tanstack/react-query
- next
- react
- react-dom
- viem
- wagmi
- +21 more
frontend/package.json
npm · 22- @rainbow-me/rainbowkit
- @shadcn/ui
- @tanstack/react-query
- axios
- clsx
- ethers
- lucide-react
- next
- openai
- qrcode.react
- react
- react-dom
- react-qr-reader
- viem
- wagmi
- +7 more
backend/server/package.json
npm · 6- cors
- crypto
- dotenv
- ethers
- express
- pg
package.json
npm · 1- ethers
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.