Reelevator – Next-Generation Multi-Tenant Lift & Elevator Management System | Next.js, PostgreSQL
Project Overview
Reelevator is a comprehensive, enterprise-grade elevator management system designed to revolutionize building maintenance operations. Built with Next.js 16, React 19, and Prisma ORM with PostgreSQL, this platform provides real-time monitoring, predictive maintenance, and advanced analytics powered by IoT sensors and digital twin technology.
The system serves multiple stakeholders including building owners, service agencies, contractors, suppliers, and technicians through a sophisticated role-based access control (RBAC) system with 7 distinct user roles.
Core Technology Stack
- Framework: Next.js 16.0.3 with React 19.2.0
- Language: TypeScript 5
- Database: PostgreSQL with Prisma ORM 7.0.0
- Authentication: NextAuth.js 4.24.13 with JWT and bcrypt
- UI Framework: Radix UI components with Tailwind CSS 4.1.17
- State Management: TanStack React Query 5.90.10
- Form Handling: React Hook Form with Zod validation
- Charts & Analytics: Recharts 3.5.1
- Media Management: Cloudinary (next-cloudinary)
- Notifications: Sonner toast notifications
- Analytics: Vercel Analytics
Key Features
1. Live Telemetry & IoT Integration
Real-time monitoring of elevator performance through IoT sensor integration. Track live data including floor position, speed, direction, load weight, vibration, temperature, and door status. Telemetry events are captured and analyzed for anomaly detection.
2. Digital Twin Technology
Virtual replicas of physical elevators for advanced simulation, analysis, and predictive modeling. Each elevator can have a 3D model representation with real-time data synchronization.
3. Predictive Maintenance (PM Plans & Tasks)
AI-powered maintenance scheduling system that prevents breakdowns before they occur. Automated preventive maintenance plans with configurable frequency, task scheduling, and completion tracking. Supports PREVENTIVE, CORRECTIVE, EMERGENCY, and INSPECTION maintenance types.
4. Health Monitoring & Component Tracking
Comprehensive component health tracking with vibration analysis, temperature monitoring, wear percentage calculation, and failure score prediction. Maintains complete component replacement history with parts tracking and technician attribution.
5. Ticketing & Job Assignment System
Full-featured ticket management with priority levels (LOW, MEDIUM, HIGH, CRITICAL) and status tracking (OPEN, IN_PROGRESS, RESOLVED, CLOSED, CANCELED). Automated job assignments to technicians with scheduling, route optimization, and completion tracking.
6. Maintenance Contract Management (AMC)
Annual Maintenance Contract (AMC) management with three contract types: BASIC, PREMIUM, and FULL_CARE. Automated invoice generation, payment tracking, and contract renewal management. Integrated with PM plans for automated maintenance scheduling.
7. SLA Monitoring & Compliance
Automated Service Level Agreement tracking with first response time and resolution time metrics. SLA compliance reporting and alerts for contract performance monitoring.
8. QR Code Integration
Quick access to elevator information and maintenance history via QR codes. Each elevator can have unique QR codes for instant access to service records, component details, and ticket creation.
9. Inventory & Spare Parts Management
Complete spare parts inventory system with stock tracking, reorder level alerts, SKU management, and location tracking. Integrated purchase order system with supplier management and order status tracking (PENDING, ORDERED, RECEIVED, CANCELED).
10. Multi-Stakeholder Role-Based Access Control (RBAC)
Sophisticated permission system with 7 user roles:
- SUPER_ADMIN: Full system access and control
- ADMIN: Administrative access with some restrictions
- AGENCY: Agency-level management for client buildings and contractors
- CONTRACTOR: Contractor and technician team management
- TECH: Field technician role with mobile access
- SUPPLIER: Spare parts and inventory management
- CUSTOMER: Building owner with monitoring and ticket creation
11. Agency & White-Label Support
Multi-tenant architecture supporting service agencies with custom branding (logo, colors, theme, custom CSS), agency-specific settings (timezone, language, auto-assignment rules), and contractor management capabilities.
12. Analytics Dashboard
Comprehensive insights and reporting with interactive charts powered by Recharts. Data-driven decision making through performance metrics, failure predictions, and maintenance trends analysis.
13. Smart Notifications System
Real-time push notifications for critical events, maintenance requirements, ticket updates, and job assignments. Mobile device registration for push token management across iOS and Android platforms.
14. Audit Logging
Complete audit trail of all system actions with user attribution, entity tracking, and detailed change logs. SUPER_ADMIN exclusive access for security and compliance.
15. Multi-Building Management
Centralized management of multiple buildings across different locations with city, state, country, and postal code tracking. Building-level contract and elevator grouping.
Database Architecture
The system uses a comprehensive PostgreSQL database with 30+ interconnected models:
Authentication & Users
- User, Account, Session, VerificationToken
- 7 user roles with granular permissions
Buildings & Elevators
- Building, Elevator (6 types: TRACTION, HYDRAULIC, MRL, FREIGHT, HOSPITAL, DUMBWAITER)
- ElevatorComponent, ComponentHealth, ComponentReplacementHistory
- DigitalTwin for virtual elevator replicas
IoT & Monitoring
- IoTSensor, LiveTelemetry, TelemetryEvent
- HealthReport with failure score prediction
Maintenance & Contracts
- MaintenanceContract (BASIC, PREMIUM, FULL_CARE)
- Invoice, PMPlan, PMTask
- MaintenanceLog (4 types: PREVENTIVE, CORRECTIVE, EMERGENCY, INSPECTION)
Tickets & Jobs
- Ticket with 4 priority levels and 5 status states
- JobAssignment with route optimization
Inventory & Supply Chain
- SparePart, Supplier, SupplierPart
- PurchaseOrder with status tracking
Multi-Tenancy
- Agency, AgencySetting, AgencyBranding
- Contractor for team management
System Features
- QRCode for quick access
- SLARecord for compliance tracking
- AuditLog for security
- MobileDevice for push notifications
- UserNotification for alerts
API Architecture
RESTful API with versioned endpoints under /api/v1/:
- Authentication: /api/auth/[...nextauth]
- Buildings & Elevators: buildings, elevators, elevator-components
- Monitoring: iot-sensors, live-telemetry, telemetry-events, health-reports, component-health
- Maintenance: maintenance-contracts, maintenance-logs, pm-plans, pm-tasks
- Tickets & Jobs: tickets, job-assignments
- Inventory: spare-parts, suppliers, supplier-parts, purchase-orders
- Digital Twins: digital-twins
- QR Codes: qr-codes
- Compliance: sla-records, invoices
- Multi-Tenancy: agencies, agency-settings, agency-branding, contractors
- System: audit-logs, user-notifications
- Media: cloudinary (image/video uploads)
User Dashboards
Role-specific dashboards with tailored interfaces:
- Admin Dashboard: System-wide management and analytics
- Agency Dashboard: Client and contractor management
- Customer Dashboard: Building and elevator monitoring
- Contractor Dashboard: Team and job management
- Tech Dashboard: Mobile-optimized job completion interface
- Supplier Dashboard: Inventory and order management
- Staff Dashboard: General staff operations
Security Features
- JWT-based authentication with secure session management
- Password hashing with bcryptjs
- Role-based access control with granular permissions
- Middleware-based route protection
- Audit logging for all critical operations
- Email verification system
- Password reset functionality
Mobile & Field Support
- Mobile device registration and management
- Push notification support (iOS & Android)
- QR code scanning for quick elevator access
- Offline-capable job assignment tracking
- Route optimization for technician dispatch
Deployment & Infrastructure
- Node.js: >=20.0.0
- NPM: >=10.0.0
- Database: PostgreSQL with Prisma migrations
- Hosting: Optimized for Vercel deployment
- Environment: Production-ready with environment variable configuration
Development Features
- TypeScript for type safety
- Prisma ORM with type-safe database queries
- Database seeding support (tsx prisma/seed.ts)
- Hot module replacement in development
- ESLint for code quality
- Automated Prisma client generation
- Migration deployment scripts
Use Cases
Building Owners
Monitor all elevators across multiple properties from a single dashboard. Track performance metrics, schedule maintenance, ensure regulatory compliance, and receive instant alerts for critical issues.
Service Agencies
Manage elevator services for multiple clients with comprehensive tools for scheduling, reporting, contractor coordination, and white-label branding. Track SLA compliance and generate performance reports.
Contractors
Streamline maintenance operations with automated job assignments, technician management, route optimization, and mobile access for field teams. Track job completion and parts usage.
Suppliers
Manage spare parts inventory, track purchase orders, coordinate deliveries with maintenance teams, and maintain supplier-specific part catalogs with pricing and lead times.
Technicians
Access job assignments on mobile devices, scan QR codes for elevator information, log maintenance activities, record component replacements, and update job status in real-time.
Project Structure
- /app: Next.js app directory with pages and API routes
- /components: Reusable UI components organized by feature
- /lib: Utilities, authentication, database, and validation logic
- /prisma: Database schema and migrations
- /public: Static assets
- /docs: Documentation including RBAC permissions matrix
Unique Selling Points
- Digital Twin Integration: First-of-its-kind virtual elevator replicas for predictive analysis
- IoT-Powered Monitoring: Real-time telemetry with anomaly detection
- Multi-Tenant Architecture: White-label support for service agencies
- Comprehensive RBAC: 7 distinct roles with granular permissions
- Predictive Maintenance: AI-powered failure prediction and prevention
- Mobile-First Design: Optimized for field technicians
- Complete Supply Chain: End-to-end inventory and procurement management
- SLA Compliance: Automated tracking and reporting
Target Industries
- Commercial Real Estate Management
- Residential Property Management
- Hospital & Healthcare Facilities
- Hotel & Hospitality
- Shopping Malls & Retail Centers
- Corporate Office Buildings
- Elevator Service & Maintenance Companies
- Elevator Parts Suppliers
Version: 0.1.0
License: Private
Built with: Next.js, React, TypeScript, Prisma, PostgreSQL, TailwindCSS