**π Smart Campus Admin Smart-Campus is a production-ready campus management system designed to make campus life smarter, faster, and more efficient. Built using React, TypeScript, Vite, Supabase, and modern web technologies.
Add your deployed Netlify / Vercel URL here once live.
Example:
https://smart-campus.netlify.app
- Role-based access control (Admin, Staff, Security, Student)
- User profiles with department and contact information
- Secure authentication system with Supabase Auth
- Building management with floor plans and locations
- Facility tracking (labs, libraries, cafeterias, gyms)
- Room allocation and monitoring
- Asset management and tracking
- Real-time emergency reporting and tracking
- Severity levels (Critical, High, Medium, Low)
- Emergency response team coordination
- Incident report management
- Campus-wide broadcast system
- Priority-based notifications
- Multiple communication types (announcements, emergencies, events, maintenance)
- Targeted messaging to specific user roles
- User growth metrics
- Building utilization statistics
- Emergency response trends
- Real-time campus activity monitoring
- Security settings and access control
- Notification preferences
- Data backup and retention
- System customization
- Frontend: React 18, TypeScript, Vite
- Styling: Tailwind CSS
- Database: Supabase (PostgreSQL)
- Authentication: Supabase Auth
- Icons: Lucide React
- Routing: React Router v6
- Node.js 18+ and npm
- Supabase account
-
Clone the repository
-
Install dependencies:
npm install
-
Set up environment variables: The
.envfile already contains your Supabase credentials:VITE_SUPABASE_URLVITE_SUPABASE_ANON_KEY
-
Start the development server:
npm run dev
-
Build for production:
npm run build
The application uses the following main tables:
- profiles - User profiles with roles and information
- buildings - Campus buildings with locations
- facilities - Facilities within buildings
- rooms - Individual rooms
- assets - Campus assets and equipment
- emergencies - Emergency incidents
- incident_reports - Detailed incident documentation
- response_teams - Emergency response teams
- team_members - Team member assignments
- notifications - User notifications
- broadcasts - Campus-wide communications
- audit_logs - System audit trail
- Row Level Security (RLS) enabled on all tables
- Role-based access policies
- JWT-based authentication
- Secure password handling
- Audit logging for all critical operations
# Supabase configuration
SUPABASE_URL=your_supabase_url_here
SUPABASE_KEY=your_supabase_key_here
# Optional: Add more environment variables as needed
# EXAMPLE:
# PORT=3000
# NODE_ENV=development
- Admin: Full system access, user management, system settings
- Staff: Campus and facility management, reports
- Security: Emergency management, incident reporting
- Student: Limited read access to public information
- Create an Account: Navigate to
/registerand create a new account - Login: Use your credentials to log in at
/login - Dashboard: View campus overview and recent activity
- Manage Users: (Admin only) Add and manage campus users
- Campus Management: Track buildings, facilities, and rooms
- Emergency Response: Report and manage campus emergencies
- Communications: Send campus-wide broadcasts and notifications
- Analytics: View reports and insights
SMART-CAMPUS-ADMIN/
β
βββ π client/ # React Frontend Application
β βββ π public/ # Static Assets
β β βββ index.html
β β βββ manifest.json
β β βββ robots.txt
β β βββ service-worker.js # PWA Service Worker
β β βββ π icons/ # App Icons
β β βββ π images/ # Static Images
β β
β βββ π src/ # Source Code
β β βββ π assets/ # Assets
β β β βββ π fonts/ # Custom Fonts
β β β βββ π styles/ # Global Styles
β β β β βββ global.css
β β β β βββ variables.css
β β β β βββ animations.css
β β β βββ π svgs/ # SVG Components
β β β
β β βββ π components/ # Reusable Components
β β β βββ π common/ # Common Components
β β β β βββ Button/
β β β β βββ Input/
β β β β βββ Modal/
β β β β βββ Table/
β β β β βββ Card/
β β β β βββ Loader/
β β β β βββ Toast/
β β β β βββ Tooltip/
β β β β
β β β βββ π layout/ # Layout Components
β β β β βββ Sidebar/
β β β β βββ Navbar/
β β β β βββ Header/
β β β β βββ Footer/
β β β β βββ Breadcrumb/
β β β β
β β β βββ π forms/ # Form Components
β β β β βββ FormBuilder/
β β β β βββ FileUpload/
β β β β βββ RichTextEditor/
β β β β βββ DateRangePicker/
β β β β
β β β βββ π maps/ # Map Components
β β β β βββ CampusMap/
β β β β βββ BuildingEditor/
β β β β βββ FloorPlan/
β β β β βββ LocationPicker/
β β β β
β β β βββ π charts/ # Chart Components
β β β β βββ ActivityChart/
β β β β βββ UtilizationChart/
β β β β βββ CustomChart/
β β β β
β β β βββ π widgets/ # Dashboard Widgets
β β β βββ StatsCard/
β β β βββ ActivityFeed/
β β β βββ QuickActions/
β β β
β β βββ π pages/ # Application Pages
β β β βββ π Auth/ # Authentication Pages
β β β β βββ Login/
β β β β βββ Register/
β β β β βββ ForgotPassword/
β β β β βββ ResetPassword/
β β β β
β β β βββ π Dashboard/ # Dashboard Pages
β β β β βββ Overview/
β β β β βββ Analytics/
β β β β βββ CustomDashboard/
β β β β
β β β βββ π Users/ # User Management
β β β β βββ UserList/
β β β β βββ UserCreate/
β β β β βββ UserEdit/
β β β β βββ UserProfile/
β β β β βββ RolesPermissions/
β β β β
β β β βββ π Campus/ # Campus Management
β β β β βββ Buildings/
β β β β βββ Facilities/
β β β β βββ Rooms/
β β β β βββ Assets/
β β β β βββ Maps/
β β β β
β β β βββ π Emergency/ # Emergency Management
β β β β βββ LiveAlerts/
β β β β βββ ResponseTeam/
β β β β βββ IncidentReports/
β β β β βββ EmergencyPlans/
β β β β βββ Drills/
β β β β
β β β βββ π Communication/ # Communication
β β β β βββ Notifications/
β β β β βββ Broadcasts/
β β β β βββ Announcements/
β β β β βββ Templates/
β β β β
β β β βββ π Analytics/ # Analytics & Reports
β β β β βββ Reports/
β β β β βββ Insights/
β β β β βββ Export/
β β β β βββ CustomReports/
β β β β
β β β βββ π Settings/ # System Settings
β β β β βββ General/
β β β β βββ Security/
β β β β βββ Integration/
β β β β βββ Backup/
β β β β
β β β βββ π Admin/ # Admin Pages
β β β βββ AuditLogs/
β β β βββ SystemHealth/
β β β βββ APIKeys/
β β β
β β βββ π hooks/ # Custom React Hooks
β β β βββ useAuth.js
β β β βββ useWebSocket.js
β β β βββ useNotifications.js
β β β βββ useMap.js
β β β βββ useForm.js
β β β βββ useLocalStorage.js
β β β
β β βββ π store/ # State Management
β β β βββ π slices/ # Redux Slices
β β β β βββ authSlice.js
β β β β βββ userSlice.js
β β β β βββ campusSlice.js
β β β β βββ emergencySlice.js
β β β β βββ notificationSlice.js
β β β βββ π services/ # RTK Query Services
β β β β βββ authApi.js
β β β β βββ userApi.js
β β β β βββ campusApi.js
β β β βββ store.js
β β β
β β βββ π services/ # API Services
β β β βββ apiClient.js
β β β βββ authService.js
β β β βββ userService.js
β β β βββ campusService.js
β β β βββ emergencyService.js
β β β
β β βββ π utils/ # Utility Functions
β β β βββ validators.js
β β β βββ formatters.js
β β β βββ helpers.js
β β β βββ constants.js
β β β βββ enums.js
β β β βββ errorHandler.js
β β β
β β βββ π contexts/ # React Contexts
β β β βββ AuthContext.jsx
β β β βββ ThemeContext.jsx
β β β βββ NotificationContext.jsx
β β β
β β βββ π types/ # TypeScript Types
β β β βββ user.types.ts
β β β βββ campus.types.ts
β β β βββ emergency.types.ts
β β β βββ api.types.ts
β β β
β β βββ π config/ # Configuration
β β β βββ routes.js
β β β βββ theme.js
β β β βββ settings.js
β β β
β β βββ App.jsx
β β βββ App.css
β β βββ main.jsx
β β βββ index.css
β β
β βββ package.json
β βββ tailwind.config.js
β βββ postcss.config.js
β βββ vite.config.js # Vite Configuration
β βββ .env.example
β
βββ π server/ # Node.js Backend
β βββ π src/ # Source Code
β β βββ π config/ # Configuration
β β β βββ database.js
β β β βββ redis.js
β β β βββ passport.js
β β β βββ constants.js
β β β βββ environment.js
β β β βββ swagger.js
β β β
β β βββ π models/ # Database Models
β β β βββ User/
β β β β βββ User.js
β β β β βββ Admin.js
β β β β βββ Student.js
β β β β βββ Staff.js
β β β βββ Campus/
β β β β βββ Building.js
β β β β βββ Facility.js
β β β β βββ Room.js
β β β β βββ Asset.js
β β β βββ Emergency/
β β β β βββ Emergency.js
β β β β βββ Incident.js
β β β β βββ ResponseTeam.js
β β β βββ Communication/
β β β β βββ Notification.js
β β β β βββ Broadcast.js
β β β β βββ Template.js
β β β βββ Analytics/
β β β β βββ Report.js
β β β β βββ Log.js
β β β β βββ Metric.js
β β β βββ System/
β β β βββ AuditLog.js
β β β βββ Settings.js
β β β βββ Backup.js
β β β
β β βββ π controllers/ # Route Controllers
β β β βββ authController.js
β β β βββ userController.js
β β β βββ campusController.js
β β β βββ emergencyController.js
β β β βββ notificationController.js
β β β βββ analyticsController.js
β β β βββ systemController.js
β β β
β β βββ π routes/ # API Routes
β β β βββ π v1/ # API Version 1
β β β β βββ authRoutes.js
β β β β βββ userRoutes.js
β β β β βββ campusRoutes.js
β β β β βββ emergencyRoutes.js
β β β β βββ analyticsRoutes.js
β β β βββ index.js
β β β
β β βββ π middleware/ # Middleware
β β β βββ auth.js
β β β βββ roleCheck.js
β β β βββ validation.js
β β β βββ errorHandler.js
β β β βββ logger.js
β β β βββ rateLimiter.js
β β β βββ upload.js
β β β
β β βββ π services/ # Business Logic
β β β βββ authService.js
β β β βββ userService.js
β β β βββ campusService.js
β β β βββ emergencyService.js
β β β βββ notificationService.js
β β β βββ analyticsService.js
β β β βββ aiService.js
β β β
β β βββ π utils/ # Utilities
β β β βββ jwt.js
β β β βββ bcrypt.js
β β β βββ validators.js
β β β βββ emailTemplates.js
β β β βββ pushNotification.js
β β β βββ fileUpload.js
β β β βββ reportGenerator.js
β β β
β β βββ π sockets/ # WebSocket Handlers
β β β βββ emergencySocket.js
β β β βββ notificationSocket.js
β β β βββ campusSocket.js
β β β βββ index.js
β β β
β β βββ π jobs/ # Cron Jobs
β β β βββ backupJob.js
β β β βββ cleanupJob.js
β β β βββ notificationJob.js
β β β βββ reportJob.js
β β β
β β βββ π scripts/ # Utility Scripts
β β β βββ seedDatabase.js
β β β βββ backupDatabase.js
β β β βββ migrateData.js
β β β
β β βββ π docs/ # API Documentation
β β β βββ swagger.json
β β β βββ api.yaml
β β β
β β βββ app.js
β β βββ server.js
β β βββ index.js
β β
β βββ package.json
β βββ .env.example
β βββ .eslintrc.js
β βββ .prettierrc
β βββ Dockerfile
β
βββ π mobile/ # React Native Admin App
β βββ π src/
β β βββ π screens/
β β βββ π components/
β β βββ π navigation/
β β βββ π utils/
β βββ package.json
β βββ app.json
β
βββ π docker/ # Docker Configuration
β βββ Dockerfile.client
β βββ Dockerfile.server
β βββ Dockerfile.nginx
β βββ docker-compose.dev.yml
β βββ docker-compose.prod.yml
β βββ nginx.conf
β
βββ π docs/ # Documentation
β βββ π api/ # API Documentation
β β βββ overview.md
β β βββ endpoints.md
β β βββ examples.md
β βββ π deployment/ # Deployment Guides
β β βββ local.md
β β βββ production.md
β β βββ aws.md
β βββ π development/ # Development Guides
β β βββ setup.md
β β βββ coding-standards.md
β β βββ testing.md
β βββ π user-guides/ # User Manuals
β β βββ admin-guide.md
β β βββ user-guide.md
β β βββ emergency-guide.md
β βββ π architecture/ # Architecture Docs
β βββ system-design.md
β βββ database-design.md
β βββ security.md
β
βββ π tests/ # Test Suites
β βββ π unit/
β βββ π integration/
β βββ π e2e/
β βββ π performance/
β βββ jest.config.js
β
βββ π scripts/ # Build & Utility Scripts
β βββ build.sh
β βββ deploy.sh
β βββ backup.sh
β βββ seed.sh
β
βββ .github/ # GitHub Configuration
β βββ π workflows/ # GitHub Actions
β β βββ ci.yml
β β βββ cd.yml
β β βββ security.yml
β βββ dependabot.yml
β βββ CODEOWNERS
β
βββ .husky/ # Git Hooks
βββ .vscode/ # VS Code Settings
βββ .dockerignore
βββ .gitignore
βββ .env.example
βββ package.json # Root Package.json
βββ README.md
βββ LICENSE
This is a production-ready campus management system. When contributing:
- Follow the existing code style
- Write meaningful commit messages
- Test all features before submitting
- Ensure RLS policies are properly configured
- Document any new features
By contributing, you agree to:
- Be respectful and supportive
- Help beginners who ask questions
- Keep discussions constructive
- Follow open-source etiquette
- Avoid spamming issues or PRs
This project is licensed under the MIT License β see the LICENSE file for details.
- Project Admins: Subham Nayak / Mentors
- Issues: Open an Issue on GitHub
- Community: Reach out via project communication channels
Together, let's build something amazing! π

