================================================================================
SRINATH BHAWAN - PRODUCTION DEPLOYMENT CHECKLIST
================================================================================

[ ] 1. CREATE DATABASE
   phpMyAdmin > New > Database Name: your_db_name
   Character Set: utf8mb4 | Collation: utf8mb4_unicode_ci

[ ] 2. RUN DEPLOY.SQL
   Select database > SQL tab > Choose File > Select DEPLOY.sql > Go
   Expected Result: "✅ Deployment Complete! 14 Tables + 36 Permissions Created"

[ ] 3. VERIFY TABLES
   Run: SHOW TABLES;
   Expected: 14 tables listed

[ ] 4. VERIFY PERMISSIONS
   Run: SELECT COUNT(*) FROM permission_definitions;
   Expected: 36 rows

[ ] 5. TEST SUPERADMIN LOGIN
   URL: http://localhost/SrinathB/auth/login.php
   Email: superadmin@srinathbhawan.com
   Password: admin123
   Expected: Login successful, see SuperAdmin dashboard

[ ] 6. CHANGE DEFAULT PASSWORDS
   SuperAdmin > Settings > Change Password
   Do this for: superadmin, admin, landlord accounts

[ ] 7. GRANT PERMISSIONS TO LANDLORD
   Method A (UI): SuperAdmin > Manage Permissions > Select Landlord > Select All > Update
   Method B (SQL): Edit grant_full_permissions.sql, set user_id, run it

[ ] 8. GRANT PERMISSIONS TO ADMIN
   Same as step 7, but for admin user

[ ] 9. CREATE UPLOAD DIRECTORIES
   Create these folders with 755 permissions:
   - uploads/receipts/
   - uploads/household_receipts/
   - uploads/documents/
   - uploads/meter_photos/

[ ] 10. UPDATE config.php
   Update database credentials for production:
   - DB_HOST
   - DB_NAME
   - DB_USER
   - DB_PASS
   - BASE_URL

[ ] 11. TEST LANDLORD LOGIN
   Login as: landlord@srinathbhawan.com / (new password)
   Expected: See landlord dashboard with all menu items

[ ] 12. TEST ADMIN LOGIN
   Login as: admin@srinathbhawan.com / (new password)
   Expected: See admin dashboard with all menu items

[ ] 13. TEST TENANT CREATION
   Landlord > Manage Tenants > Add Tenant
   Fill details > Save
   Expected: Tenant created successfully

[ ] 14. TEST METER READING
   Landlord > Meter Readings > Add Reading
   Enter reading > Save
   Expected: Reading saved

[ ] 15. TEST BILL GENERATION
   Landlord > All Activities > Generate Bill
   Select tenant > Generate
   Expected: Bill created

[ ] 16. TEST PAYMENT RECORDING
   Landlord > All Activities > Record & Approve Payment
   Enter payment > Sign (cash) or add ref (UPI/card) > Submit
   Expected: Payment recorded, bill status updated

[ ] 17. TEST HOUSEHOLD EXPENSES
   Landlord > Household Expenses > Add Expense
   Select "Electricity" or "Tax" > Fill details > Save
   Expected: Expense added without errors

[ ] 18. PRODUCTION SECURITY
   [ ] Enable SSL/HTTPS
   [ ] Disable phpMyAdmin public access
   [ ] Set strong database passwords
   [ ] Enable PHP error logging (disable display_errors)
   [ ] Set proper file permissions (755 dirs, 644 files)
   [ ] Add .htaccess security rules
   [ ] Enable CSRF protection (already in code)
   [ ] Regular database backups

[ ] 19. OPTIONAL: REMOVE SAMPLE DATA
   If you don't want default users:
   DELETE FROM users WHERE email IN ('admin@srinathbhawan.com', 'landlord@srinathbhawan.com');
   Keep superadmin user

[ ] 20. FINAL VERIFICATION
   [ ] All features working
   [ ] No PHP errors
   [ ] No console errors (F12)
   [ ] Responsive on mobile
   [ ] Permissions system working
   [ ] Backup created

================================================================================
DEPLOYMENT COMPLETE! 🎉
================================================================================

Need help? Check:
- README.md for quick start
- SETUP_INSTRUCTIONS.md for detailed guide
- grant_full_permissions.sql to grant permissions
- revoke_all_permissions.sql to revoke permissions

System Info:
- 14 Tables Created
- 36 Permissions Configured
- 3 Default Users (change passwords!)
- Optimized for MySQL 8.0.44

Next Steps:
1. Start adding your real tenants
2. Configure UPI IDs for landlords
3. Set up email notifications (optional)
4. Train staff on permission system

================================================================================
