A comprehensive web application designed to streamline facility maintenance workflows for schools and institutions. This platform enables users to submit maintenance reports, track their progress, and manage maintenance tasks efficiently.
- Overview
- Features
- User Roles
- Tech Stack
- Installation
- Getting Started
- Project Structure
- Development
- Deployment
- Configuration
The Facility Report Maintenance App is a full-featured maintenance management system that bridges the gap between facility users, technicians, and administrators. The platform simplifies the process of reporting maintenance issues and managing their resolution with real-time tracking and status updates.
Key Benefits:
- Reduce maintenance request processing time
- Improve communication between reporters and technicians
- Track maintenance history and completion rates
- Manage technician assignments and workloads
- Centralized facility management dashboard
- Easy Reporting: Submit maintenance requests with descriptions, photos, and priority levels
- Real-time Tracking: Monitor the status of submitted reports from submission to completion
- View History: Access all submitted reports and their current status
- Notifications: Receive updates on report status changes
- Categorized Issues: Organize reports by maintenance categories
- Task Management: View and manage assigned maintenance tasks
- Status Updates: Mark tasks as in-progress or completed
- Task Organization: Track assigned, in-progress, and completed tasks
- Notifications: Receive alerts for newly assigned tasks
- Dashboard Analytics: View all facility reports and their status
- User Management: Manage reporter and technician accounts
- Category Management: Create and organize maintenance categories
- Task Assignment: Assign maintenance tasks to technicians
- Settings: Configure system-wide settings
- Review Queue: Review pending maintenance tasks before assignment
The application supports three distinct user roles with specific permissions:
- Submit new maintenance requests
- Upload photos and descriptions
- Track request status in real-time
- View notification updates
- Access personal report history
- View assigned maintenance tasks
- Update task progress and status
- Mark tasks as completed
- Track assigned, in-progress, and completed tasks
- Receive notifications for new assignments
- Full system access
- Review all maintenance reports
- Manage user accounts and roles
- Create and modify maintenance categories
- Assign tasks to technicians
- View system analytics and settings
- Configure application settings
- React 19.2: Modern JavaScript library for building user interfaces
- Vite 7.2: Fast build tool and development server
- React Router 7.9: Client-side routing
- Tailwind CSS 4.1: Utility-first CSS framework
- Headless UI 2.2: Accessible UI components
- Heroicons 2.2: Beautiful SVG icons
- Lucide React 0.553: Additional icon library
- Supabase 2.81: Backend-as-a-Service platform
- PostgreSQL database
- Authentication (email/password)
- Real-time capabilities
- Storage for file uploads
- React Dropzone 14.3: File upload handling
- React Masonry CSS 1.0: Responsive grid layouts
- Tailwind Plus Elements: Extended Tailwind components
- ESLint 9.39: Code linting
- Vite React Plugin 5.1: React refresh support
- TypeScript Support: Type definitions for React
- Node.js 16+ and npm/yarn
- Supabase account (free tier available)
- Git
-
Clone the repository
git clone <repository-url> cd Facility-Report-Maintenance-App
-
Install dependencies
npm install
-
Environment Configuration Create a
.envfile in the project root with your Supabase credentials:VITE_SUPABASE_URL=your_supabase_url VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
-
Verify Installation
npm run lint
Start the development server with hot module replacement:
npm run devThe application will be available at http://localhost:5173
Create an optimized production build:
npm run buildThe build output will be in the dist/ directory.
Preview the production build locally:
npm run previewCheck code quality and style issues:
npm run lintsrc/
├── components/ # Reusable React components
│ ├── Buttons.jsx
│ ├── CategoryDropDown.jsx
│ ├── DropDown.jsx
│ ├── Footer.jsx
│ ├── FormInput.jsx
│ ├── Header.jsx
│ ├── HeroHeader.jsx
│ ├── ImageFile.jsx
│ ├── MenuBar.jsx
│ ├── PriorityBadge.jsx
│ ├── ProtectedRoute.jsx # Route protection by role
│ ├── SectionHeader.jsx
│ ├── SideBar.jsx
│ ├── StatusBadge.jsx
│ ├── TechnicianDropDown.jsx
│ ├── TechnicianPopUp.jsx
│ └── Theme.jsx
├── context/ # React Context for state management
│ └── AuthContext.jsx # Authentication state & logic
├── pages/ # Page components
│ ├── LandingPage.jsx # Public landing page
│ ├── Login.jsx # User login
│ ├── SignUp.jsx # User registration
│ ├── Admin/ # Admin-only pages
│ │ ├── AdminDashboard.jsx
│ │ └── Sections/
│ │ ├── AdminReviewTasks.jsx
│ │ ├── Categories.jsx
│ │ ├── Reports.jsx
│ │ ├── Settings.jsx
│ │ └── Users.jsx
│ ├── Reporter/ # Reporter-only pages
│ │ ├── ReporterDashboard.jsx
│ │ └── Sections/
│ │ ├── Home.jsx
│ │ ├── MyReports.jsx
│ │ ├── Notifications.jsx
│ │ └── SubmitReport.jsx
│ └── Technician/ # Technician-only pages
│ ├── TechnicianDashboard.jsx
│ └── Sections/
│ ├── AssignedTasks.jsx
│ ├── Completed.jsx
│ ├── InProgress.jsx
│ └── TechnicianNotification.jsx
├── assets/ # Static assets (images, icons)
├── App.jsx # Root application component
├── index.css # Global styles
├── main.jsx # Application entry point
├── router.jsx # Route configuration
└── supabaseClient.js # Supabase client initialization
This project uses ESLint to maintain consistent code quality. The configuration includes:
- React best practices
- React Hooks rules
- React Refresh compatibility checks
Components are organized by responsibility:
- Layout Components: Header, Footer, SideBar, MenuBar
- UI Components: Buttons, FormInput, DropDown, Badge components
- Feature Components: Dashboard pages and section views
- Utility Components: ProtectedRoute, Theme
The application uses Supabase authentication with role-based access control:
- User signs up or logs in through
Login.jsxorSignUp.jsx - AuthContext manages session and user data
- ProtectedRoute component verifies user role
- User is redirected to appropriate dashboard based on role
This project uses Tailwind CSS with a custom configuration:
- View tailwind.config.js for custom theme colors and utilities
- Global styles defined in src/index.css
The project includes vercel.json configuration for easy Vercel deployment:
npm install -g vercel
vercelFollow the prompts to connect your repository and deploy.
Ensure these variables are set in your deployment platform:
VITE_SUPABASE_URLVITE_SUPABASE_ANON_KEY
To set up Supabase for this project:
-
Create a new Supabase project at supabase.com
-
Create the following tables in your PostgreSQL database:
profiles- User profile informationreports- Maintenance reportstasks- Technician taskscategories- Maintenance categoriesnotifications- User notifications
-
Set up authentication policies for row-level security (RLS)
-
Copy your Supabase URL and anon key to the
.envfile
Customize colors and styles in tailwind.config.js:
- Define custom color palette
- Add custom utilities
- Configure plugins
Issue: Port 5173 already in use
- Solution:
npm run dev -- --port 3000
Issue: Supabase connection errors
- Solution: Verify environment variables are correctly set in
.env
Issue: Build errors
- Solution: Clear node_modules and reinstall:
rm -rf node_modules && npm install
When contributing to this project:
- Create a feature branch:
git checkout -b feature/feature-name - Commit changes:
git commit -m "Description of changes" - Run linting:
npm run lint - Push to branch:
git push origin feature/feature-name - Submit a pull request
[Add your license information here]
For questions or issues, please:
- Check the documentation in this README
- Review the code comments in relevant files
- Open an issue in the repository
Last Updated: February 2026