You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# 1. Clone repository
git clone https://github.com/accdan/dimsumco-pro.git
cd dimsumco-pro
# 2. Install dependencies
composer install
npm install
# 3. Configure environment
cp .env.example .env
php artisan key:generate
# 4. Setup database (edit .env with your credentials)
php artisan migrate:fresh --seed
# 5. Start development server
php artisan serve
Visit http://127.0.0.1:8000
Default Credentials
Role
Email
Password
Super Admin
(configured in .env)
Super123
π Security
Authentication & Authorization
Feature
Implementation
Password Hashing
bcrypt with auto-rehashing
CSRF Protection
All forms protected with CSRF tokens
XSS Prevention
Blade auto-escaping + Content Security Policy
SQL Injection
Eloquent ORM parameterized queries
Mass Assignment
Explicit $fillable arrays on all models
Rate Limiting
Login attempts throttled (5 per minute)
OTP Verification
6-digit OTP for login with 3-minute expiry
Email Verification
Email link verification for new registrations
Two-Factor Authentication (2FA)
Feature
Description
Login OTP
6-digit code required for regular user login
3-Minute Expiry
OTP codes expire after 3 minutes for security
Admin Bypass
Admin/Super Admin login directly without OTP
Google OAuth Support
OTP verification also applies to Google login
Resend Limit
OTP resend only available after expiry (rate limited)
DEV Mode
OTP displayed on screen for development testing
Access Control
Feature
Implementation
Role-Based Access
Super Admin / Admin / User roles
Route Protection
Middleware guards on all admin routes
Admin Separation
Separate login portal for administrators
Session Security
Secure cookies, HTTP-only flags
Data Protection
Feature
Implementation
Environment Security
.env excluded from git, secrets protected
Soft Deletes
Data recovery instead of permanent deletion
Activity Logging
All admin actions logged with timestamps
Input Validation
Server-side validation on all forms
OAuth Security
# Google OAuth configured via environment variablesGOOGLE_CLIENT_ID=your-client-idGOOGLE_CLIENT_SECRET=your-client-secretGOOGLE_REDIRECT_URI=your-callback-url
β‘ Performance
Optimization Techniques
Technique
Implementation
Query Optimization
Eager loading (with()) to prevent N+1 queries
Config Caching
php artisan config:cache for production
Route Caching
php artisan route:cache for faster routing
View Caching
php artisan view:cache for compiled Blade templates
# Validate all models against database schema
php artisan models:validate
Database Management
# Fresh migration with seeding
php artisan migrate:fresh --seed
# Run seeders only
php artisan db:seed
# Rollback and re-run migrations
php artisan migrate:refresh
π Environment Variables
# ApplicationAPP_NAME=DimsumcoAPP_ENV=productionAPP_DEBUG=falseAPP_URL=https://your-domain.com# DatabaseDB_CONNECTION=mysqlDB_HOST=127.0.0.1DB_PORT=3306DB_DATABASE=dimsumcoDB_USERNAME=your_usernameDB_PASSWORD=your_password# Super AdminSUPER_ADMIN_EMAIL=admin@dimsumco.com# Google OAuthGOOGLE_CLIENT_ID=your-client-idGOOGLE_CLIENT_SECRET=your-client-secretGOOGLE_REDIRECT_URI=${APP_URL}/auth/google/callback# Session & CacheSESSION_DRIVER=databaseCACHE_DRIVER=fileQUEUE_CONNECTION=sync