A comprehensive custodial inspection and management system built for educational institutions. This Progressive Web App (PWA) enables custodial staff to conduct inspections, report concerns, and track building cleanliness standards.
- ๐ฑ Progressive Web App (PWA) - Install on mobile devices for offline access
- ๐ข Building Inspections - Complete whole-building or single-room inspections
- ๐ Custodial Notes - Report and track custodial concerns
- ๐ Data Analytics - View inspection data and generate reports
- ๐ Admin Panel - Administrative oversight and management
- ๐ฑ Mobile Optimized - Touch-friendly interface for mobile devices
- โก Real-time Updates - Live data synchronization
- Node.js 18+
- PostgreSQL database (or use free options like Supabase/Neon)
- npm or yarn package manager
-
Clone the repository
git clone <repository-url> cd CustodialCommand-1
-
Install dependencies
npm install
-
Set up environment variables
# Copy the example environment file cp .env.example .env # Edit .env and add your database URL DATABASE_URL=postgresql://username:password@host:port/database
-
Set up the database
# Push the database schema npm run db:push -
Start the development server
npm run dev
-
Open your browser
- Frontend: http://localhost:5173
- Backend API: http://localhost:5000
- Go to supabase.com and create an account
- Create a new project
- Get your connection string from Settings โ Database
- Update your
.envfile with the connection string
- Go to neon.tech and create an account
- Create a new database
- Copy the connection string
- Update your
.envfile
- Install PostgreSQL locally
- Create a database named
custodial_command - Update your
.envfile with local connection details
iPhone/iPad:
- Open the app in Safari
- Tap the Share button (โกโ)
- Select "Add to Home Screen"
- Tap "Add"
Android:
- Open the app in Chrome
- Tap the menu (โฎ)
- Select "Add to Home screen" or "Install app"
- Tap "Add" or "Install"
# Run all tests
npm run test:forms
# Health check
npm run test:health
# Debug mode
npm run test:debugSee TESTING_GUIDE.md for detailed testing instructions.
โโโ src/ # Frontend React application
โ โโโ components/ # Reusable UI components
โ โโโ pages/ # Main application pages
โ โโโ hooks/ # Custom React hooks
โ โโโ utils/ # Utility functions
โ โโโ assets/ # Static assets
โโโ server/ # Backend Express server
โ โโโ routes.ts # API route definitions
โ โโโ security.ts # Security middleware
โ โโโ monitoring.ts # Performance monitoring
โ โโโ logger.ts # Logging utilities
โโโ shared/ # Shared code between frontend/backend
โ โโโ schema.ts # Database schema
โ โโโ custodial-criteria.ts # Business logic
โโโ uploads/ # File upload storage
# Development
npm run dev # Start development server
npm run dev:client # Start frontend only
npm run dev:server # Start backend only
# Building
npm run build # Build for production
npm run preview # Preview production build
# Database
npm run db:push # Push schema changes to database
# Testing
npm run test:forms # Run comprehensive form tests
npm run test:health # Health check test
npm run test:debug # Debug mode testing
# Production
npm start # Start production serverGET /api/inspections- Get all inspectionsPOST /api/inspections- Create new inspectionGET /api/inspections/:id- Get specific inspectionPOST /api/room-inspections- Create room inspection
GET /api/custodial-notes- Get all notesPOST /api/custodial-notes- Create new note
POST /api/admin/login- Admin authenticationGET /api/admin/inspections- Admin inspection data
GET /health- Health checkGET /metrics- Performance metrics
- Rate Limiting - API request throttling
- Input Sanitization - XSS protection
- CORS Configuration - Cross-origin request security
- Security Headers - Helmet.js security middleware
- Request Validation - Input validation and sanitization
- Request Timing - Track slow requests
- Memory Usage - Monitor memory consumption
- Error Tracking - Comprehensive error logging
- Health Checks - System health monitoring
- Connect your GitHub repository to Railway
- Set environment variables in Railway dashboard
- Deploy automatically on push to main branch
- Vercel - Frontend deployment
- Heroku - Full-stack deployment
- DigitalOcean - VPS deployment
- 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
This project is licensed under the MIT License - see the LICENSE file for details.
Database Connection Errors:
- Verify
DATABASE_URLis set correctly - Check database server is running
- Ensure database exists
Port Conflicts:
# Kill processes on port 5000
kill -9 $(lsof -ti:5000) 2>/dev/nullForm Submission Failures:
- Check server logs for error details
- Verify all required fields are filled
- Check network connectivity
- Check the TESTING_GUIDE.md
- Review server logs for error details
- Verify environment configuration
- Test database connectivity
- Built for educational institutions
- Designed for custodial staff efficiency
- Optimized for mobile-first usage
- "For the People!" - Shared Service Command
Version: 1.0.0
Last Updated: January 2025
Maintainer: Shared Service Command