Documentation

Complete guide to using Tracker - Everything you need to know to build amazing applications

Installation

Requirements

  • PHP >= 8.2
  • Composer
  • Node.js & NPM
  • MySQL/PostgreSQL
  • Apache/Nginx

Installation Steps

1. Clone the repository

git clone https://github.com/yourusername/projecttracker.git
cd projecttracker

2. Install dependencies

composer install
npm install

3. Configure environment

cp .env.example .env
php artisan key:generate

4. Configure database in .env

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=projecttracker
DB_USERNAME=root
DB_PASSWORD=

5. Run migrations and seed database

php artisan migrate --seed

6. Create storage link

php artisan storage:link

7. Build assets

npm run build

8. Start development server

php artisan serve

Default Login Credentials:

Email: superadmin@example.com

Password: password

Settings System

Project Tracker includes a comprehensive settings management system with 60+ configurable settings organized in 9 groups.

Using Settings in Code

Helper Function:

// Get setting value
$appName = setting('app_name');
$email = setting('contact_email', 'default@example.com');

// In Blade templates
Tracker
Built with Laravel & TailwindCSS

Model Methods:

use App\Modules\Setting\Models\Setting;

// Get setting
$value = Setting::get('app_name');

// Set setting
Setting::set('app_name', 'My App', 'string', 'general');

// Get all settings by group
$general = Setting::ofGroup('general')->get();

ViewServiceProvider Variables:

// Available in all Blade views
Tracker
Project & Thesis Tracking System


Built with Laravel & TailwindCSS
© 2025 Project Tracker. All rights reserved.

Settings Groups

General Settings

App name, logo, contact info, timezone, date/time format

SEO Settings

Meta tags, Open Graph, sitemap configuration

Auth & Security

Password rules, session settings, 2FA, login attempts

Email Settings

SMTP configuration, mail driver, from address

Social Media

Social media links (Facebook, Twitter, LinkedIn, etc.)

Developer Options

Debug mode, API settings, cache configuration

UI Access: Settings → Sidebar Menu → Select Category

Authentication System

Project Tracker supports multiple authentication methods that can be enabled/disabled from Settings → Auth & Security.

Available Auth Methods

Email Authentication

Traditional email and password authentication with optional email verification.

Mobile OTP Authentication

Login with mobile number and OTP. Configurable OTP length, expiry, and resend cooldown.

Social Login

OAuth login with Google, Facebook, and GitHub. Enable individual providers as needed.

Auth Settings Model

use App\Modules\User\Models\AuthSetting;

// Check if email login is enabled
if (AuthSetting::getBool('email_login_enabled', true)) {
    // Show email login form
}

// Get OTP settings
$otpLength = AuthSetting::get('otp_length', '6');
$otpExpiry = AuthSetting::get('otp_expiry_minutes', '5');

// Check social providers
$googleEnabled = AuthSetting::getBool('google_login_enabled');
$facebookEnabled = AuthSetting::getBool('facebook_login_enabled');

Note: For social login, you need to configure OAuth credentials in your .env file and enable the providers from Settings.

Developer Settings

Configure advanced developer options for debugging, APIs, webhooks, and feature toggles. Access via: Settings → Developer

Application Settings

Debug Mode

Enable detailed error messages and stack traces. ⚠️ NEVER enable in production!

// Check debug mode in code
if (setting('app_debug', false)) {
    // Debug mode is enabled
    Log::debug('Debug information');
}

Application URL

Base URL for your application. Used for generating links, emails, and API responses.

$appUrl = setting('app_url', config('app.url'));

API Configuration

Enable API

Toggle API endpoints for external access. Configure rate limiting to prevent abuse.

Enable/Disable API

enable_api = true/false

Rate Limit

api_rate_limit = 60 req/min
// Use in middleware
use App\Modules\Setting\Models\Setting;

if (setting('enable_api', false)) {
    $rateLimit = setting('api_rate_limit', 60);
    // Apply rate limiting
}

Webhooks

Webhook Integration

Send notifications to external services on specific events (user registration, orders, etc.)

// Send webhook notification
if (setting('enable_webhooks', false)) {
    $webhookUrl = setting('webhook_url');
    
    Http::post($webhookUrl, [
        'event' => 'user.registered',
        'data' => [
            'user_id' => $user->id,
            'email' => $user->email,
            'timestamp' => now()
        ]
    ]);
}

Example Webhook Payload

{
  "event": "user.registered",
  "data": {
    "user_id": 123,
    "email": "user@example.com",
    "timestamp": "2025-11-06 10:30:00"
  }
}

Feature Toggles

Module Control

Enable or disable specific modules without changing code.

enable_analytics

Analytics & Reports Module

enable_chat

Chat & Messaging Module

// Check feature flags in Blade

// Check in Controller
if (setting('enable_chat')) {
    // Show chat interface
}

Best Practices

Production Safety

  • Never enable debug mode in production
  • Always use HTTPS for webhook URLs
  • Set appropriate API rate limits (60-120 requests/minute recommended)
  • Monitor webhook failures and implement retry logic
  • Test feature toggles in staging before production

Development Tips

  • Use feature toggles to gradually roll out new features
  • Cache settings for better performance (automatically handled)
  • Test webhook endpoints with tools like webhook.site before production
  • Document custom feature flags for team collaboration

Settings Cache

All developer settings are automatically cached for performance. Changes take effect immediately after saving. Clear cache manually via php artisan cache:clear if needed.

Backup System

Project Tracker includes a complete database backup system powered by Spatie Laravel Backup. Automatically backup your database on schedule or manually trigger backups anytime. Access via: Settings → Backup Configuration

Configuration Options

Automatic Backups

  • Enable/Disable: Toggle automatic scheduled backups
  • Frequency: Choose Daily, Weekly, or Monthly backups
  • Retention Period: Set how many days to keep backups (1-365)

Storage Locations

  • Local Storage: Default - storage/app/Laravel
  • Amazon S3: Configure AWS credentials in .env
  • Dropbox: Requires Dropbox API token
  • Google Drive: Requires Google Drive API credentials

Manual Actions

  • Create Backup Now: Instant manual backup
  • View Backups: See all available backup files
  • Clean Old Backups: Remove backups based on retention policy

Using Backup Commands

Run Manual Backup

# Run backup now (respects settings)
php artisan backup:run-now

# Run Spatie backup directly (database only)
php artisan backup:run --only-db

# Run full backup (database + files)
php artisan backup:run

Clean Old Backups

# Remove old backups based on retention policy
php artisan backup:clean

Check Backup Health

# Monitor backup health
php artisan backup:monitor

List All Backups

# List all backup files
php artisan backup:list

Scheduling Automatic Backups

Add backup commands to your app/Console/Kernel.php:

protected function schedule(Schedule $schedule)
{
    // Daily backup at 2 AM
    if (setting('enable_auto_backup', false)) {
        $frequency = setting('backup_frequency', 'daily');
        
        $backup = $schedule->command('backup:run-now');
        
        switch ($frequency) {
            case 'daily':
                $backup->daily()->at('02:00');
                break;
            case 'weekly':
                $backup->weekly()->sundays()->at('02:00');
                break;
            case 'monthly':
                $backup->monthly(1, '02:00');
                break;
        }
    }
    
    // Clean old backups daily at 3 AM
    $schedule->command('backup:clean')->daily()->at('03:00');
}

Using in Code

use Illuminate\Support\Facades\Artisan;

// Check if backups are enabled
if (setting('enable_auto_backup', false)) {
    // Trigger backup
    Artisan::call('backup:run-now');
}

// Get backup settings
$frequency = setting('backup_frequency', 'daily');
$storage = setting('backup_storage', 'local');
$retention = setting('backup_retention_days', 30);

// Check backup files
$disk = Storage::disk('local');
$backups = $disk->allFiles('Laravel');

Cloud Storage Setup

Amazon S3

Add to .env:

AWS_ACCESS_KEY_ID=your_key
AWS_SECRET_ACCESS_KEY=your_secret
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=your_bucket
AWS_USE_PATH_STYLE_ENDPOINT=false

Dropbox

Install Flysystem adapter:

composer require spatie/flysystem-dropbox

Google Drive

Install Flysystem adapter:

composer require masbug/flysystem-google-drive-ext

Best Practices

Security

  • Store backups in multiple locations (3-2-1 rule)
  • Encrypt backups containing sensitive data
  • Restrict backup file access permissions
  • Use secure cloud storage with proper authentication
  • Test backup restoration regularly

Recommendations

  • Run daily backups for production databases
  • Keep at least 7 days of backups
  • Monitor backup success/failure notifications
  • Document your backup restoration process
  • Schedule backups during low-traffic hours

Troubleshooting

  • Ensure storage/app/Laravel has write permissions
  • Check disk space before running backups
  • Verify database credentials in .env file
  • Enable email notifications for backup failures
  • Check logs at storage/logs/laravel.log

Backup Package

Powered by Spatie Laravel Backup - Industry-standard backup solution. Visit documentation for advanced configuration.

Roles & Permissions

Role-based access control using Spatie Laravel Permission package with pre-configured roles and permissions.

Default Roles

Super Admin

Full system access with all permissions

Admin

Most permissions except role/permission management

Moderator

Limited permissions for content moderation

User

Basic access with minimal permissions

Using Permissions in Code

// Check permission
if (auth()->user()->can('edit-users')) {
    // Allow action
}

// In Blade templates

// Assign role
$user->assignRole('admin');

// Check role
if ($user->hasRole('superadmin')) {
    // Admin actions
}

Available Permissions

view-dashboard view-users create-users edit-users delete-users view-roles create-roles edit-roles view-settings edit-settings view-reports export-reports

Module System

Project Tracker uses Laravel Modules for a clean, maintainable architecture. Each module is self-contained with its own controllers, models, views, and routes.

Creating a New Module

php artisan make:module BlogModule

Module Structure

app/Modules/YourModule/
├── Http/
│   └── Controllers/
├── Models/
├── resources/
│   ├── views/
│   └── lang/
└── routes/
    ├── web.php
    └── api.php

Existing Modules

Setting Module

Manages application settings with comprehensive UI

User Module

User management, profiles, authentication

DemoFrontend Module

Landing page and documentation

Helper Functions

Global helper functions available throughout the application.

Available Helpers

setting($key, $default = null)

$appName = setting('app_name');
$email = setting('contact_email', 'default@example.com');

app_name()

echo app_name(); // Returns application name from settings

app_logo()

$logoPath = app_logo(); // Returns logo storage path

app_favicon()

$faviconPath = app_favicon(); // Returns favicon storage path

Location: All helpers are defined in app/helpers.php

Quick Start Checklist