A full-stack MERN application for estimating residential construction costs in India. Enter plot details, choose materials, and get instant cost breakdowns with professional Bill of Quantities (BOQ) and downloadable reports.
- Two Estimation Modes
- Quick Approximation: Thumb-rule based estimation using per-sqft multipliers
- Detailed Precision: Mix-design based calculation with per-category material selection
- Material Rate Database: 56+ rate entries across 11 categories × 3 quality tiers
- Professional BOQ: Sortable, item-wise Bill of Quantities table
- Cost Breakdown Charts: Interactive pie and bar charts (Recharts)
- PDF & Excel Export: Professionally formatted downloadable reports
- JWT Authentication: Secure signup/login with bcrypt password hashing
- Project History: Save, view, and manage past estimates
- Responsive Design: Mobile-friendly with Tailwind CSS
| Layer | Technology |
|---|---|
| Frontend | React (Vite), React Router, Axios, Tailwind CSS v4, Recharts, Lucide Icons |
| Backend | Node.js, Express.js, REST API |
| Database | MongoDB (Mongoose ODM) |
| Auth | JWT + bcrypt |
| Export | PDFKit (PDF), ExcelJS (Excel) |
construction-estimator/
├── backend/
│ ├── server.js # Express entry point
│ ├── config/db.js # MongoDB connection
│ ├── models/ # Mongoose schemas (User, Project, Rates)
│ ├── routes/ # API route definitions
│ ├── controllers/ # Route handlers
│ ├── services/
│ │ └── estimationEngine.js # Core calculation logic (heavily commented)
│ ├── middleware/ # JWT auth middleware
│ ├── data/defaultRates.json # Seed data for material rates
│ └── seeds/seedRates.js # Database seeder script
└── frontend/
└── src/
├── pages/ # 10 page components
├── components/ # 5 reusable components
├── context/ # Auth context provider
├── api/ # Axios client config
└── index.css # Tailwind design system
- Node.js 18+
- MongoDB (local or Atlas)
# Backend
cd construction-estimator/backend
cp .env.example .env # Edit with your MongoDB URI and JWT secret
npm install
# Frontend
cd ../frontend
npm installEdit backend/.env:
PORT=5000
MONGO_URI=mongodb://localhost:27017/construction-estimator
JWT_SECRET=your_strong_secret_key
JWT_EXPIRES_IN=7dcd backend
npm run seed# Terminal 1 — Backend
cd backend
npm run dev
# Terminal 2 — Frontend
cd frontend
npm run devFrontend: http://localhost:5173
Backend API: http://localhost:5000
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| POST | /api/auth/signup |
❌ | Register new user |
| POST | /api/auth/login |
❌ | Authenticate user |
| GET | /api/auth/me |
✅ | Get current user |
| POST | /api/estimate/approx |
❌ | Quick thumb-rule estimate |
| POST | /api/estimate/precision |
❌ | Detailed precision estimate |
| GET | /api/estimate/rates |
❌ | Get material rates |
| POST | /api/projects |
✅ | Save project |
| GET | /api/projects |
✅ | List user's projects |
| GET | /api/projects/:id |
✅ | Get single project |
| DELETE | /api/projects/:id |
✅ | Delete project |
| GET | /api/reports/:id/pdf |
✅ | Download PDF report |
| GET | /api/reports/:id/excel |
✅ | Download Excel report |
The calculation engine (services/estimationEngine.js) implements two levels:
Per sqft of built-up area:
- Cement: 0.4 bags | Steel: 4 kg | Sand: 1.8 cft
- Aggregate: 1.35 cft | Bricks: 8 nos | Paint: 0.18 L
- Concrete (M20, 1:1.5:3): Dry volume × ratio-based calculation
- Brickwork: Wall volume × 500 bricks/m³
- Steel: 60-120 kg/m³ by member type
- Labour: CPWD norm-based day estimation
All formulas are extensively commented with engineering basis references.
- Color Palette: Navy blue (#1a365d) + Concrete grey + Amber accent
- Typography: Inter (body) + Outfit (headings)
- Effects: Glassmorphism, smooth animations, card-based layout
- Responsive: Mobile-first with breakpoints at 640px, 768px, 1024px
MIT — Built for the Indian construction industry.