A comprehensive full-stack web application for managing residential societies and apartment complexes. Built with modern technologies and best practices.
- Overview
- Features
- Tech Stack
- Project Structure
- Quick Start
- Development
- Deployment
- Documentation
- Contributing
The Building Management System (BMS) is a modern, scalable solution for managing residential societies. It provides role-based access control for Admins, Owners, and Tenants, enabling efficient management of buildings, payments, maintenance requests, events, visitors, and staff.
- π Secure Authentication with JWT
- π₯ Role-Based Access Control (Admin, Owner, Tenant)
- π° Payment Management with invoice generation
- π§ Maintenance Tracking with staff assignment
- π Event Management for society activities
- π· Staff Management with shift scheduling
- πͺ Visitor Management with approval workflow
- π Analytics Dashboard with real-time insights
- Manage buildings, towers, and flats
- Register and verify owners/tenants
- Assign maintenance requests to staff
- Create and manage events
- Approve visitor entries
- Generate payment reports
- View owned properties
- Make payments (maintenance, amenities)
- Create maintenance requests
- View payment history
- Manage tenant information
- View lease details
- Make payments
- Create maintenance requests
- Register visitors
- View society events
- Runtime: Node.js with TypeScript
- Framework: Express.js
- Database: MongoDB with Mongoose ODM
- Authentication: JWT + bcrypt
- Validation: Zod
- API Documentation: Swagger/OpenAPI
- Testing: Jest + Supertest
- Email: Resend
- Framework: React 19
- Build Tool: Vite
- UI Library: Material-UI (MUI)
- State Management: Zustand + React Query
- Routing: React Router v7
- Forms: React Hook Form + Zod
- Styling: Emotion (CSS-in-JS)
- Charts: Recharts
- Testing: Vitest + React Testing Library
- Backend Hosting: Render
- Frontend Hosting: Vercel
- Database: MongoDB Atlas
- Version Control: Git
BMS/
βββ backend/ # Express.js backend
β βββ src/
β β βββ config/ # Database, Swagger config
β β βββ controllers/ # Route controllers
β β βββ middleware/ # Auth, validation, error handling
β β βββ models/ # Mongoose schemas
β β βββ routes/ # API routes
β β βββ services/ # Business logic
β β βββ utils/ # Helper functions
β β βββ validators/ # Zod schemas
β β βββ docs/ # OpenAPI specs
β β βββ __tests__/ # Unit & integration tests
β β βββ server.ts # Entry point
β βββ package.json
β βββ tsconfig.json
β
βββ frontend/ # React frontend
β βββ src/
β β βββ components/ # Reusable components
β β βββ pages/ # Page components
β β βββ services/ # API services
β β βββ store/ # Zustand stores
β β βββ types/ # TypeScript types
β β βββ utils/ # Helper functions
β β βββ App.tsx # Root component
β β βββ main.tsx # Entry point
β βββ package.json
β βββ vite.config.ts
β βββ vercel.json # Vercel deployment config
β
βββ README.md # This file
- Node.js >= 18.x
- npm >= 9.x
- MongoDB (local or Atlas)
- Git
-
Clone the repository
git clone https://github.com/AnoopG7/BMS.git cd BMS -
Install backend dependencies
cd backend npm install -
Install frontend dependencies
cd ../frontend npm install -
Set up environment variables
Backend (
backend/.env):NODE_ENV=development PORT=3000 MONGODB_URI=mongodb://localhost:27017/bms JWT_SECRET=your_jwt_secret_key_here JWT_EXPIRE=7d FRONTEND_URL=http://localhost:5173 RESEND_API_KEY=your_resend_api_key
Frontend (
frontend/.env):VITE_API_BASE_URL=http://localhost:3000
-
Seed the database (optional)
cd backend npm run seed -
Start development servers
Backend:
cd backend npm run devFrontend:
cd frontend npm run dev -
Access the application
- Frontend: http://localhost:5173
- Backend API: http://localhost:3000
- API Docs: http://localhost:3000/api-docs
cd backend
# Run in development mode
npm run dev
# Run tests
npm run test
# Run tests with coverage
npm run test:coverage
# Build for production
npm run build
# Start production server
npm startcd frontend
# Run in development mode
npm run dev
# Run tests
npm run test
# Build for production
npm run build
# Preview production build
npm run preview# Lint backend
cd backend && npm run lint
# Lint frontend
cd frontend && npm run lint
# Type check
npm run type-check- API Documentation: backend/API_DOCUMENTATION.md
- API Endpoints: backend/API_ENDPOINTS.md
- Swagger UI: Available at
/api-docswhen running backend - Backend README: backend/README.md
- Frontend README: frontend/README.md
cd backend
# Run all tests
npm run test
# Run unit tests only
npm run test:unit
# Run integration tests only
npm run test:integration
# Watch mode
npm run test:watch
# Coverage report
npm run test:coverageTest Coverage: 227 tests passing across unit and integration suites.
cd frontend
# Run tests
npm run test
# Run with UI
npm run test:ui
# Coverage report
npm run test:coverageContributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow TypeScript best practices
- Write tests for new features
- Maintain consistent code formatting
- Update documentation as needed
Copyright Β© 2025 Anoop Gupta. All Rights Reserved.
This source code is the exclusive property of Anoop Gupta. Unauthorized copying, modification, distribution, or use of this software, via any medium, is strictly prohibited without explicit written permission from the author.
Anoop Gupta
- Built with modern web technologies
- Inspired by real-world building management needs
- Designed for scalability and maintainability
Happy Coding! π