FileRack System Documentation

Comprehensive guide to the FileRack website launcher system

🌟 System Overview

FileRack is a comprehensive multi-user website launcher system that allows users to organize and access their favorite websites through a clean, tile-based interface. The system supports multiple users, each with their own personalized dashboard of website tiles organized into customizable categories.

Key Features:

  • Multi-user support with secure authentication
  • Customizable categories for organizing websites
  • Drag-and-drop reordering of categories and website tiles
  • Default categories for new user setup
  • Custom icon support for website tiles
  • Responsive design that works on all devices
  • Advanced diagnostics system for maintenance and troubleshooting

🏗️ System Architecture

FileRack follows a modern web application architecture built on PHP and MySQL with a focus on security, performance, and maintainability.

Technology Stack

Directory Structure

filerack.com/
├── index.php            # Main entry point
├── dashboard.php        # User dashboard
├── login.php            # Login page
├── register.php         # Registration page
├── api/                 # API endpoints for AJAX operations
│   ├── save-service.php
│   ├── save-settings.php
│   ├── update-click.php
│   └── update-order.php
├── assets/              # Static assets
│   ├── css/
│   ├── js/
│   └── images/
├── config/              # Configuration files
│   └── config.php       # Main configuration
├── includes/            # PHP includes and utilities
│   └── functions.php    # Helper functions
├── Diags/               # Diagnostics system
└── templates/           # Email templates

🗄️ Database Schema

The FileRack system uses a relational database with the following main tables:

users

Stores user account information and authentication data.

Column Type Description
id INT AUTO_INCREMENT Primary key
username VARCHAR(255) Unique username
email VARCHAR(255) User's email address
password_hash VARCHAR(255) Securely hashed password
created_at DATETIME Account creation timestamp
email_verified TINYINT(1) Whether email has been verified

categories

Stores user-created categories for organizing website tiles.

Column Type Description
id INT AUTO_INCREMENT Primary key
user_id INT Foreign key to users table
name VARCHAR(255) Category name
is_default TINYINT(1) Whether this is a default category
order_position INT Display order position

services

Stores individual website tiles with their properties.

Column Type Description
id INT AUTO_INCREMENT Primary key
user_id INT Foreign key to users table
category_id INT Foreign key to categories table
name VARCHAR(255) Website name
url VARCHAR(2048) Website URL
description TEXT Optional description
icon_url VARCHAR(2048) URL to website icon
order_position INT Display order within category

default_categories

Stores system-wide default categories available to new users.

Column Type Description
id INT AUTO_INCREMENT Primary key
name VARCHAR(255) Category name
description TEXT Category description
sites JSON JSON array of default websites
display_order INT Display order for categories

user_settings

Stores user-specific settings and preferences.

Column Type Description
user_id INT Foreign key to users table
background_color VARCHAR(20) User's preferred background color
button_color VARCHAR(20) User's preferred button color
open_behavior VARCHAR(20) Link opening behavior (new tab, same tab)

Note: Additional tables like password_resets are used for specific functionality but are not core to the system's operation.

🔐 Authentication System

FileRack implements a secure, modern authentication system with multiple security features:

Registration Process

  1. Users provide username, email, and password
  2. Email verification sent via SMTP
  3. Account remains limited until email verified
  4. Google reCAPTCHA v2 protects against bots

Password Security

Passwords are secured using PHP's password_hash() function with the following features:

Known Issue: Password Hash Corruption

In some hosting environments, database corruption can occasionally affect password hashes, causing login failures. The diagnostics system includes tools to detect and repair this issue.

Session Management

📋 Default Categories System

The default categories system provides new users with a pre-populated set of website categories and links to get started with FileRack quickly.

How It Works

  1. System-wide default categories are stored in the default_categories table
  2. When a new user registers, they can choose which default categories to import
  3. Selected categories are copied to the user's personal categories
  4. Users can then customize, add, or remove these categories and websites

Default Category Structure

Each default category is stored as a JSON object containing:

Management Tools

The Diagnostics system includes tools to manage default categories:

Changes to default categories only affect new users. Existing users' dashboards are not affected.

🔧 Diagnostics System

The FileRack Diagnostics System is a comprehensive toolkit for monitoring, troubleshooting, and maintaining the FileRack platform.

Core Diagnostic Tools

Default Categories Tools

Debug & Testing Tools

Security Tools

Recommended Maintenance Schedule

  • Weekly: Run System Health Monitor
  • Monthly: Create database backup
  • After Server Maintenance: Run full system check
  • When Login Issues Occur: Use Password Reset Tool

🔄 Maintenance Procedures

Regular maintenance ensures optimal performance and reliability of the FileRack system.

Routine Maintenance Tasks

  1. Database Backups: Create regular backups using the Database Backup tool
  2. Health Monitoring: Run the System Health Monitor weekly
  3. Error Log Review: Check server error logs periodically
  4. Default Categories Update: Keep default categories current and relevant
  5. PHP Version Compatibility: Monitor for PHP version updates

Database Optimization

For optimal performance, consider these database maintenance tasks:

Most maintenance tasks can be performed through the Diagnostics system without direct database access.

⚠️ Troubleshooting Common Issues

This section addresses the most common issues encountered in the FileRack system.

Login Failures

If users cannot log in with correct credentials:

  1. Use the System Health Monitor to check password hash integrity
  2. If corrupted, use the Password Reset Tool to reset the affected user's password
  3. Check the database connection parameters in config.php
  4. Verify that the users table exists and has correct structure

Database Connection Issues

If the system cannot connect to the database:

  1. Verify database credentials in config.php
  2. Check that the MySQL server is running
  3. Test connection with a simple script
  4. Check for IP restrictions or firewall issues

Missing Default Categories

If default categories are not available to new users:

  1. Run Default Categories Check to verify table integrity
  2. If missing or corrupted, use Categories Rebuilder to restore
  3. Verify that the default_categories table has the correct structure

Critical Issue: Database Corruption

If you encounter persistent database corruption issues (particularly with password hashes), consider:

  • Upgrading your hosting plan to one with more reliable database service
  • Switching to a different hosting provider
  • Setting up automated database backups
  • Implementing the auto-heal system in the Diagnostics folder

🔒 Security Best Practices

Implementing these security measures will help protect your FileRack installation.

Access Control

Data Protection

Protection for Diagnostics System

The Diagnostics system has access to sensitive data and functionality. To secure it:

  1. Use the Create Password tool to generate a .htpasswd file
  2. Configure .htaccess to require authentication
  3. Limit access to authorized IPs when possible
  4. Regularly change the diagnostics access password

The Generate .htpasswd tool in the Diagnostics system can create the necessary authentication files for you.

← Back to Diagnostics Dashboard