Restaurant Audit
A comprehensive Frappe-based application for managing restaurant inspections, hygiene checks, operational audits, and franchise documentation across franchise locations. This enterprise-grade system ensures quality control, compliance monitoring, consistent operational…
- Author: Osalama1
- Repository: https://github.com/Osalama1/restaurant_audit
- GitHub stars: 0
- Forks: 0
- License: MIT
- Category: HR & Payroll
- Maintenance: Minimally Maintained
Install Restaurant Audit
bench get-app https://github.com/Osalama1/restaurant_audit
Add the Frappe Gems badge to your README
Maintain Restaurant Audit? Paste this into your README:
[](https://frappegems.com/gems/apps/Osalama1/restaurant_audit)
About Restaurant Audit
🍽️ Restaurant Audit System
A comprehensive Frappe-based application for managing restaurant inspections, hygiene checks, operational audits, and franchise documentation across franchise locations. This enterprise-grade system ensures quality control, compliance monitoring, consistent operational standards, and secure document management.
📋 Table of Contents
- Features
- System Components
- Installation
- Configuration
- User Guide
- API Documentation
- Development
- Security Features
- Troubleshooting
- Contributing
- License
✨ Features
🏪 Restaurant Management
- Location Tracking: GPS coordinates with configurable radius settings (geofencing)
- Employee Assignment: Multi-employee support with flexible week start days
- Restaurant Profiles: Complete restaurant information and contact details
- Restaurant Manager Assignment: Dedicated manager for each location
- Active/Inactive Status Management: Control restaurant visibility and access
🔍 Audit System
- Structured Checklists: Customizable audit templates and questions
- Scoring System: Automated calculation of scores and compliance ratings
- Multiple Answer Types: Yes/No, True/False, Rating, Text, and Image responses
- Image Attachments: Photo evidence for audit findings
- Comments & Recommendations: Detailed feedback and action items
- Real-time Validation: Form validation and progress tracking
- Audit History: Complete audit trail for each restaurant
- Mobile-Friendly Interface: Responsive design for on-site auditing
📅 Scheduling & Automation
- Weekly Audit Scheduling: Automated visit planning with customizable week start days
- Status Tracking: Pending → Completed → Overdue workflow
- Email Notifications: Automated alerts for auditors and managers
- In-App Notifications: Real-time notification system
- Overdue Management: Automatic escalation of missed audits
- Flexible Week Configuration: Support for different week start days per employee
- Employee Data Cleanup: Automatic cleanup when removing employees
📊 Reporting & Analytics
- Audit Dashboards: Visual progress tracking
- Score Analytics: Performance trends and compliance metrics
- Export Capabilities: Data export for external analysis
- Compliance Reports: Management-level reporting
- Audit Summary Statistics: Total questions, images, comments tracking
👥 User Management
- Role-based Access: System Manager, Employee, and Auditor roles
- Custom Authentication: Dedicated login system for auditors
- Permission Control: Granular access management
- Employee Status Tracking: Active, On Leave, Disabled, Removed states
📁 Franchise Documentation Management
- Document Repository: Centralized storage for franchise documentation
- Multi-Brand Support: Organize documents by brand and franchise
- Document Categories: Operations Manual, Training Material, Compliance, Marketing, Financial, Legal
- Version Control: Track document versions and effective dates
- File Type Support: PDF, Images, Word, Excel, and more
- Tree-View Navigation: Hierarchical browsing of documents
- View-Only Access: Secure document viewing without download
- 100MB File Upload: Support for large documents
- Document Metadata: Description, tags, effective/expiry dates
🔒 Security Features
- Download Prevention: Disabled download functionality for secure documents
- Print Prevention: Blocked print functionality and shortcuts
- Right-Click Protection: Disabled context menus
- Text Selection Control: Prevent copy/paste of sensitive content
- Keyboard Shortcut Blocking: Disabled Ctrl+S, Ctrl+P, Ctrl+A, F12
- Image Protection: Drag-and-drop and save prevention
- Session Management: Secure user sessions
- Access Logging: Track document and audit access
🏗️ System Components
Core DocTypes
- Restaurant - Restaurant location and details management
- Restaurant Employee - Child table for employee assignments with week day preferences
- Audit Submission - Main audit records with scoring and answers
- Audit Question - Child table for checklist questions
- Audit Answer - Child table for audit responses
- Scheduled Audit Visit - Planned audit visits with status tracking
- Checklist Template - Reusable audit templates
- Checklist Category - Categorization for audit questions
- Restaurant Franchise - Franchise location information
- Franchise Documentation - Document storage and metadata
- Audit Progress - Track partial audit completion
- Location Check Log - GPS verification logs
- Daily Audit Template - Daily audit configurations
Custom Pages
- nahad - Franchise documentation viewer with tree navigation
- Tree-view sidebar for restaurant/document browsing
- PDF viewer with security controls
- Image viewer with protection
- Document metadata display
Web Pages (Public Routes)
- audit-login (
/audit-login) - Custom login page for auditors - audit-restaurants (
/audit-restaurants) - Restaurant selection dashboard - audit-form (
/audit-form) - Mobile-friendly audit form interface
Scheduled Tasks
- Weekly Audit Check - Runs every Monday (configurable)
- Checks for missing weekly audits
- Sends notifications to auditors and managers
- Marks pending audits as overdue
- Supports different week start days per employee
API Methods
Audit Management APIs
- Submit audit
- Get audit history
- Track audit progress
- Location verification
Documentation APIs
get_tree_data()- Load hierarchical document structureget_document_details()- Retrieve document metadata and file URLsget_restaurant_documents()- Get all documents for a restaurant
Utility APIs
- Employee data cleanup
- Week calculation for employees
- Audit alerts and notifications
🚀 Installation
Prerequisites
- Frappe Framework (v14+)
- Python 3.8+
- Node.js 14+
- MySQL/MariaDB
Install the App
Clone the repository:
git clone cd restaurant_auditInstall in your Frappe bench:
bench get-app restaurant_audit bench install-app restaurant_auditRun database migrations:
bench migrateRestart your Frappe server:
bench restart
⚙️ Configuration
1. User Roles Setup
Create the following user roles in your Frappe system: - Auditor: Can conduct audits and view assigned restaurants - Restaurant Manager: Can view audit results for their restaurants - System Manager: Full access to all features
2. Restaurant Setup
- Navigate to Restaurant Audit > Restaurant
Create restaurant records with:
- Restaurant name and address
- GPS coordinates (latitude/longitude)
- Location radius for geofencing (default 100 meters)
- Assigned restaurant manager
- Assigned employees with individual week start days
Employee Configuration:
- Add employees to restaurants via the "Assigned Employees" table
- Set individual week start days (Monday-Sunday) for each employee
- Configure employee status (Active, On Leave, Disabled, Removed)
- Active checkbox controls whether employee receives audit notifications
3. Audit Templates
- Go to Restaurant Audit > Checklist Template
Create audit templates with:
- Template name and description
- Applies to specific restaurant (optional)
- Categories and questions
Add Audit Questions:
- Navigate to Restaurant Audit > Audit Question
- Configure question types:
- Yes/No
- True/False
- Rating
- Text
- Image
- Set mandatory requirements
- Enable image upload per question
- Add question comments/instructions
4. Franchise Documentation Setup
Create Brands (if not exists):
- Go to Stock > Brand
- Create brands for your franchise system
Create Restaurant Franchises:
- Navigate to Restaurant Audit > Restaurant Franchise
- Link to appropriate Brand
- Add franchise details (name, address, contact)
- Set status to "Active"
Upload Documentation:
- Go to Restaurant Audit > Franchise Documentation
- Create document records:
- Link to Restaurant Franchise
- Upload files (up to 100MB)
- Set document type (PDF, Image, Word, Excel, etc.)
- Choose category (Operations, Training, Compliance, etc.)
- Add version and effective dates
- Mark as active
Access Documentation Viewer:
- Navigate to
/app/nahad - Browse documents in tree structure
- View documents with security controls
- Navigate to
5. Scheduled Jobs
The app includes automated weekly audit checks. Ensure the scheduler is running:
bench schedule
Scheduled Tasks Configuration:
- Weekly Audit Check: Configured in hooks.py to run weekly
- Checks for missing audits based on employee week start days
- Sends email and in-app notifications
- Marks overdue audits automatically
6. File Upload Configuration
The system supports files up to 100MB:
- Site configuration: max_file_size: 100 (in site_config.json)
- Nginx: client_max_body_size 1024m (already configured)
- File validation at DocType level
7. Security Configuration
Document Security (for franchise documentation): - Download prevention enabled by default - Print prevention enabled by default - Right-click protection active - Keyboard shortcuts blocked - Configure access permissions via DocType permissions
📖 User Guide
For Auditors
1. Login
- Navigate to
/audit-login - Enter your email and password
- Access the restaurant selection dashboard
2. Conducting an Audit
- Select a restaurant from the dashboard
- Click "Start Audit" to open the audit form
- Complete all required questions
- Add photos and comments as needed
- Submit the audit for review
3. Viewing Results
- Access completed audits from the dashboard
- View scores and recommendations
- Track audit history
For Restaurant Managers
1. Dashboard Access
- Login to the main Frappe system
- Navigate to Restaurant Audit module
- View assigned restaurants and audit results
2. Monitoring
- Track audit completion status
- Review scores and recommendations
- Respond to audit findings
For System Administrators
1. Restaurant Management
- Add/edit restaurant locations
- Assign managers and employees with custom week schedules
- Configure location settings and geofencing
- Manage employee status and assignments
2. Template Management
- Create and modify audit templates
- Set up scoring criteria
- Manage question categories
- Configure question types and requirements
3. User Management
- Create user accounts
- Assign roles and permissions
- Monitor system usage
- Link employees to user accounts
4. Franchise Documentation Management
- Upload and organize franchise documents
- Set document categories and versions
- Manage document access and permissions
- Monitor document usage and access logs
- Organize documents by brand and franchise
5. System Maintenance
- Monitor scheduled task execution
- Review notification logs
- Clean up employee data when removing assignments
- Backup documentation files
- Monitor file storage usage
🔌 API Documentation
REST API Endpoints
Audit Management APIs
Get Restaurants
GET /api/method/restaurant_audit.api.get_restaurants
Submit Audit ```http POST /api/method/restaurantaudit.api.submitaudit Content-Type: application/js
Related HR & Payroll apps for Frappe & ERPNext
- Hrms — Open Source HR and Payroll Software
- Huf — Open-source, self-hosted multi-agent AI infrastructure for teams and apps with support for cloud and local models, tool integrations, workflows, and automation across business systems including Slack, ERPNext, Discord & Gmail.
- Bookings — Hotel Management App for Erpnext
- Employee Self Service — This is the backend component for Nesscale ESS - a mobile app that brings ERPNext to your phone. Employees can manage their HR tasks, sales activities, and projects right from their mobile devices.
- Inventory Tools — A collection of features to streamline and enhance inventory management and manufacturing workflows in ERPNext.
- Check Run — Payables utility for ERPNext
- Next Ai — NextAI is an AI-powered app for Frappe and ERPNext, delivering seamless content generation, automation, and productivity enhancements.
- Projectit — Open Source PWA mobile app to track the Employees out in the field. This mobile app is developed on Frappe Framework and it is integrated with the Project functionalities of ERPNext and integrated tightly with Frappe HR.