Skip to content

Repository files navigation

License Stars PRs Welcome TypeScript Node
CI Codecov

πŸ—οΈ SiteOS β€” Construction Site Operating System

Open-source platform for modern construction management.
Replace WhatsApp groups, Excel sheets, and paper records with one unified system.

SiteOS is a production-grade, open-source Construction Site Operating System built for builders, contractors, civil engineers, and project managers. It digitizes every aspect of construction operations β€” from project planning and labour tracking to material inventory, equipment management, and financial reporting.


✨ Features

πŸ“Š Dashboard

Real-time overview of your entire operation β€” active projects, budget health, labour count, open issues, and alerts.

πŸ“‹ Project Management

Full project lifecycle: milestones, tasks, issues, progress tracking, budget monitoring, and document management.

πŸ‘· Labour & Attendance

Track attendance, overtime, leave, and productivity. Generate payroll-ready exports.

πŸ“¦ Material Inventory

Manage stock levels, purchase orders, material issues, returns, wastage, and low-stock alerts.

πŸ”§ Equipment Tracking

Monitor equipment usage, maintenance schedules, fuel consumption, and rental availability.

πŸ’° Financial Management

Budget vs actual, expense tracking, invoicing, payment collection, and cash flow analysis.

πŸ““ Daily Site Diary

Record weather, labour counts, work completed, visitors, delays, and progress photos.

πŸ“ˆ Reports & Analytics

Daily/weekly/monthly summaries, budget variance, labour productivity, and material usage β€” exportable to PDF and Excel.

πŸ” Role-Based Access

6 roles: Owner, Project Manager, Site Engineer, Supervisor, Worker, Client (read-only portal).


πŸ›οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                 React (Next.js 14)                    β”‚
β”‚         TanStack Query Β· Zustand Β· Tailwind           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚ HTTPS REST
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                 NestJS API (REST)                     β”‚
β”‚         Prisma ORM Β· JWT Auth Β· RBAC Β· Swagger        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚     PostgreSQL      β”‚   Redis  β”‚
β”‚   (Primary DB)      β”‚ (Queue)  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸš€ Quick Start

Prerequisites

  • Node.js β‰₯ 20.x
  • npm β‰₯ 10.x
  • Docker (for PostgreSQL and Redis)

Setup

# 1. Clone and install
git clone https://github.com/JoyalJJoy/siteos.git
cd siteos
cp .env.example .env
npm install

# 2. Start infrastructure
docker compose up -d postgres redis

# 3. Initialize database
npm run db:generate
npm run db:push
npm run db:seed

# 4. Start development
npm run dev

The API runs on http://localhost:4000 and the web app on http://localhost:3000.

Demo Credentials

Role Email Password
Company Owner admin@abc.com password123
Company Owner admin@xyz.com password123

🧰 Tech Stack

Frontend

Technology Purpose
Next.js 14 (App Router) React framework with SSR/SSG
TypeScript Type safety
Tailwind CSS Utility-first styling
Zustand Client state management
TanStack Query Server state & caching
Recharts Charts & visualizations
Lucide React Icons
framer-motion Animations

Backend

Technology Purpose
NestJS Node.js framework (controllers, services, modules)
TypeScript Type safety
Prisma Type-safe ORM with PostgreSQL
PostgreSQL Primary database
Redis Queue (BullMQ) & caching
Passport + JWT Authentication & RBAC
Helmet Security headers
Pino Structured logging
Swagger/OpenAPI API documentation
BullMQ Background job processing

DevOps

Technology Purpose
Docker Containerization
Docker Compose Local orchestration
GitHub Actions CI/CD
Husky + lint-staged Git hooks
Commitlint Conventional commits

πŸ“ Project Structure

siteos/
β”œβ”€β”€ apps/
β”‚   β”œβ”€β”€ api/                     # NestJS backend
β”‚   β”‚   β”œβ”€β”€ prisma/              # Schema & migrations
β”‚   β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”‚   β”œβ”€β”€ common/          # Guards, decorators, filters, interceptors
β”‚   β”‚   β”‚   β”œβ”€β”€ config/          # Environment config
β”‚   β”‚   β”‚   β”œβ”€β”€ database/        # Prisma service
β”‚   β”‚   β”‚   β”œβ”€β”€ modules/         # Feature modules (10)
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ auth/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ users/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ projects/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ labour/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ materials/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ equipment/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ finance/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ daily-diary/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ dashboard/
β”‚   β”‚   β”‚   β”‚   └── health/
β”‚   β”‚   β”‚   └── main.ts
β”‚   β”‚   └── test/                # E2E tests
β”‚   β”‚
β”‚   └── web/                     # Next.js frontend
β”‚       └── src/
β”‚           β”œβ”€β”€ app/             # App Router pages (13 routes)
β”‚           β”œβ”€β”€ components/      # Reusable UI components
β”‚           β”œβ”€β”€ hooks/           # Custom hooks
β”‚           β”œβ”€β”€ lib/             # API client, utilities
β”‚           └── store/           # Zustand stores
β”‚
β”œβ”€β”€ .github/                     # Issue/PR templates, CI/CD workflows
β”œβ”€β”€ docker-compose.yml           # Full stack orchestration
└── package.json                 # Workspace root

πŸ“œ API Documentation

When running in development mode, Swagger UI is available at:

http://localhost:4000/api/docs

All endpoints are versioned under /api/v1/... and require JWT authentication via Bearer token (except /auth/login and /auth/register).


πŸ§ͺ Testing

# Run all tests
npm test

# Backend tests
npm run test:api

# Frontend tests
npm run test:web

# With coverage
npm run test:api -- --coverage
npm run test:web -- -- --coverage

🀝 Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

  1. Fork the repository
  2. Create a feature branch (git checkout -b feat/amazing-feature)
  3. Commit using conventional commits
  4. Push and open a Pull Request

πŸ“„ License

This project is licensed under the MIT License β€” see the LICENSE file for details.


πŸ™ Acknowledgements

Built with ❀️ by Joyal J Joy and the open-source community.

πŸ“¬ Contact


If SiteOS helps your business, consider ⭐ starring the repo!

About

πŸ—οΈ SiteOS β€” Open-source Construction Site Operating System. Manage projects, labour, materials, equipment, and finances in real-time.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages