#!/bin/bash # User Management System Quick Reference echo "===========================================" echo "Sky Art Shop - User Management System" echo "===========================================" echo "" echo "System Status:" echo "-------------" if systemctl is-active --quiet skyartshop.service; then echo "✓ Application is running" else echo "✗ Application is NOT running" fi if systemctl is-active --quiet mongod; then echo "✓ MongoDB is running" else echo "✗ MongoDB is NOT running" fi echo "" echo "Master Admin Credentials:" echo "------------------------" echo "Email: admin@skyartshop.com" echo "Password: ChangeThisPassword123!" echo "" echo "User Management:" echo "---------------" echo "URL: http://192.168.10.130/admin/users" echo " (or http://skyarts.ddns.net/admin/users after port forwarding)" echo "" echo "MongoDB - AdminUsers Collection:" echo "-------------------------------" USER_COUNT=$(mongosh SkyArtShopDB --eval "db.AdminUsers.countDocuments()" --quiet 2>/dev/null) echo "Total Users: $USER_COUNT" if [ "$USER_COUNT" -gt "0" ]; then echo "" echo "Current Users:" mongosh SkyArtShopDB --eval " db.AdminUsers.find({}, {Name: 1, Email: 1, Role: 1, IsActive: 1, _id: 0}).forEach(function(user) { print(' - ' + user.Name + ' (' + user.Email + ') - Role: ' + user.Role + ' - Active: ' + user.IsActive); }); " --quiet 2>/dev/null fi echo "" echo "Available Roles:" echo "---------------" echo "1. MasterAdmin - Full system access, manage all users" echo "2. Admin - Manage products, orders, content, reports" echo "3. Cashier - Process orders and payments" echo "4. Accountant - View reports, manage finances" echo "" echo "Quick Actions:" echo "-------------" echo "• Access User Management: http://192.168.10.130/admin/users" echo "• Create New User: http://192.168.10.130/admin/users/create" echo "• View Admin Dashboard: http://192.168.10.130/admin/dashboard" echo "" echo "MongoDB Collections:" echo "-------------------" mongosh SkyArtShopDB --eval " print('Products: ' + db.Products.countDocuments()); print('Pages: ' + db.Pages.countDocuments()); print('MenuItems: ' + db.MenuItems.countDocuments()); print('AdminUsers: ' + db.AdminUsers.countDocuments()); print('SiteSettings: ' + db.SiteSettings.countDocuments()); " --quiet 2>/dev/null echo "" echo "==========================================="