A comprehensive web application for managing grooming audit checklists, tracking violations, and monitoring inspection progress across multiple sites.
- User Authentication: Secure login system with JWT tokens
- Site Management: Add, view, and delete inspection sites
- Violation Management: Create and manage violation types with drag-and-drop ordering
- Checklist Management: Create inspection checklists with image uploads
- Progress Tracking: Mark violations as found/not found with notes
- Status Management: Mark checklists as completed
- Advanced Filtering: Filter by site, completion status, and search terms
- Statistics Dashboard: Overview of completion rates, violation rates, and overdue items
- Responsive Design: Works on desktop and mobile devices
- Node.js with Express.js
- PostgreSQL (Neon Database)
- JWT for authentication
- Multer for file uploads
- bcryptjs for password hashing
- React with Vite
- Tailwind CSS for styling
- Axios for API calls
- React Hooks for state management
- Node.js (v14 or higher)
- npm or yarn
- PostgreSQL database (or Neon account)
git clone <repository-url>
cd BASIC-GROOMING/Audit-Checklist-App
cd "checklist app/api"
npm install
Create a .env
file in the api directory:
cp .env.example .env
Update the .env
file with your database credentials:
DB_HOST=your-database-host
DB_PORT=5432
DB_NAME=your-database-name
DB_USER=your-database-user
DB_PASSWORD=your-database-password
PORT=3001
JWT_SECRET=your-jwt-secret-key
cd "../src"
npm install
The application will automatically create the required tables on first run:
grm_sites
- Site managementgrm_violations
- Violation typesgrm_checklist
- Inspection checklistsgrm_checklist_progress
- Progress trackinggrm_users
- User authentication
cd "checklist app/api"
npm start
Server will run on http://localhost:3001
cd "checklist app/src"
npm run dev
Frontend will run on http://localhost:5173
id
- Primary keysites
- Site namecreated_at
- Timestamp
id
- Primary keyviolations
- Violation descriptionorder_index
- For custom orderingcreated_at
- Timestamp
id
- Primary keyname
- Checklist namesite
- Associated siteviolations
- Array of violation IDsimg_url
- Image pathstatus
- Completion statuscreated_at
- Creation timestampupdated_at
- Last update timestamp
id
- Primary keychecklist_id
- Foreign key to checklistviolation_id
- Foreign key to violationis_checked
- Boolean for violation foundnotes
- Additional noteschecked_at
- Timestamp when marked
id
- Primary keyusername
- Unique usernamepassword
- Hashed passwordrole
- User rolecreated_at
- Registration timestamp
POST /api/auth/login
- User login
GET /api/sites
- Get all sitesPOST /api/sites
- Create new site (protected)DELETE /api/sites/:id
- Delete site (protected)
GET /api/violations
- Get all violationsPOST /api/violations
- Create violation (protected)DELETE /api/violations/:id
- Delete violation (protected)PUT /api/violations/order
- Update violation order (protected)
GET /api/checklists
- Get all checklistsGET /api/checklists/:id
- Get checklist by IDPOST /api/checklists
- Create checklist (protected)PUT /api/checklists/:id
- Update checklist (protected)DELETE /api/checklists/:id
- Delete checklist (protected)PUT /api/checklists/:id/complete
- Mark as completed (protected)
PUT /api/checklists/:checklistId/progress/:violationId
- Update progress (protected)GET /api/checklists/:checklistId/progress
- Get progressPOST /api/checklists/:checklistId/reset
- Reset progress (protected)
The application uses JWT tokens for authentication. Protected routes require a valid token in the Authorization header:
Authorization: Bearer <jwt-token>
BASIC-GROOMING/
βββ Audit-Checklist-App/
βββ checklist app/
βββ api/ # Backend server
β βββ controller.js # Route controllers
β βββ authController.js # Authentication logic
β βββ db.js # Database connection
β βββ app.js # Express app setup
β βββ auth-migrate.js # Auth table migration
β βββ uploads/ # File uploads directory
βββ src/ # Frontend React app
βββ components/ # React components
βββ pages/ # Page components
βββ services/ # API services
βββ main.jsx # App entry point
- Login: Use the authentication system to access admin features
- Manage Sites: Add locations where inspections will be conducted
- Setup Violations: Define the types of violations to check for
- Create Checklists: Create inspection checklists for specific sites
- Conduct Inspections: Mark violations as found/not found with optional notes
- Track Progress: Monitor completion rates and violation statistics
- Complete Inspections: Mark checklists as completed when done
- Drag and drop to reorder violations
- Custom violation descriptions
- Bulk management capabilities
- Real-time progress updates
- Notes for each violation
- Reset functionality for re-inspections
- Due date tracking (1 week after creation)
- Overdue indicators
- Completion status badges
- Filter by site, completion status
- Sort by various criteria
- Search by name or site
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License.
- File upload size limited to 5MB
- Only image files supported for checklist attachments