Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SatsuDrive - Professional Cloud Storage Application

SatsuDrive adalah aplikasi Cloud Storage profesional dan production-ready yang dibangun dengan technologies modern (Laravel 10 + React 18 + Vite + Tailwind CSS).

Quick Start

Requirements

  • PHP 8.1+
  • MySQL 8.0+
  • Node.js 16+
  • Composer

Installation (5 steps)

# 1. Setup Environment
cp .env.example .env
composer install
npm install
php artisan key:generate

# 2. Database Setup
php artisan migrate
php artisan storage:link

# 3. Start Backend (Terminal 1)
php artisan serve

# 4. Start Frontend (Terminal 2)
npm run dev

# 5. Access Application
# http://localhost:8000

Tech Stack

Backend:

  • Laravel 10.x with Sanctum authentication
  • PHP 8.1+ with full type hints
  • MySQL 8.0 database
  • Eloquent ORM

Frontend:

  • React 18.x with Context API
  • Vite 5.x for fast builds
  • Tailwind CSS 3.x
  • Axios for API calls

Key Features

  • File Management (upload, download, preview, rename, delete)
  • Folder Management (create, organize, infinite nesting)
  • File Sharing (with expiration and password protection)
  • Trash & Recovery (soft deletes)
  • Storage Analytics (quota tracking, statistics)
  • Security (role-based access, file hashing)
  • Activity Logging (complete audit trail)

Architecture

Clean architecture with separation of concerns:

  • Controllers Request handling
  • Services Business logic
  • Models Data representation
  • Database Persistence

Design patterns implemented:

  • Service Layer Pattern
  • Policy-Based Authorization
  • Form Request Validation
  • API Resources
  • SOLID Principles

Project Structure

app/
   Http/Controllers/Api/     API Endpoints
   Models/                   Database Models
   Services/                 Business Logic
   Policies/                 Authorization

resources/js/
   Components/               React Components
   Pages/                    Page Components
   Services/                 API Services
   Context/                  State Management

database/
   migrations/               Schema Definitions

routes/
   api.php                   API Routes

config/
   storage.php               App Configuration

API Endpoints (30+ endpoints)

Files (10 endpoints)

  • List, upload, download, delete, restore, preview, rename, move

Folders (6 endpoints)

  • List, create, update, delete, get tree structure

Sharing (7 endpoints)

  • Create, update, revoke shares, manage permissions

Activity (3 endpoints)

  • Activity logs, recent activity, statistics

See API_DOCUMENTATION.md for complete reference.

Database Schema

  • users: User accounts with storage quotas
  • files: Uploaded files with SHA256 hashing
  • folders: Nested folder organization
  • shared_files: Share tracking with expiration
  • activity_logs: Complete audit trail of user actions

All tables include timestamps and support soft deletes for recovery.

Documentation

Complete documentation available in project:

Development Commands

php artisan migrate           # Run database migrations
npm run build                 # Build for production
php artisan cache:clear       # Clear cache
php artisan storage:link      # Create storage symlink
php artisan test              # Run tests

Docker Deployment

docker-compose up -d
docker-compose exec app php artisan migrate
# Access at http://localhost:8000

Security Features

  • Authentication - Sanctum token-based API auth
  • Authorization - Policy-based access control
  • Data Protection - SHA256 file hashing, CSRF protection
  • File Security - MIME type validation, extension whitelist
  • Recovery - Soft deletes for file restoration

Configuration

Edit config/storage.php to customize:

  • Max file size
  • Allowed MIME types
  • User storage quotas
  • Storage plans

Troubleshooting

Storage Link Error

rm public/storage
php artisan storage:link

Database Connection

  • Check .env database settings
  • Ensure MySQL is running
  • Run php artisan migrate

File Upload Issues

  • Update PHP settings: post_max_size = 5G
  • Update PHP settings: upload_max_filesize = 5G

CORS Errors

Publish to GitHub

  1. Remove local-only artifacts (node_modules, vendor, public/build) if present.
  2. Initialize git and push:
git init
git add .
git commit -m "Initial commit"
git branch -M main
git remote add origin https://github.com/<your-username>/satsudrive.git
git push -u origin main

Deployment (Shared Hosting)

For cPanel/XAMPP-style hosting, follow the dedicated steps in DEPLOYMENT.md and make sure:

License

MIT License - Free for personal and commercial use.

Support

For issues, questions, or contributions:

  1. Check SETUP_GUIDE.md for troubleshooting
  2. Review API_DOCUMENTATION.md for API help
  3. See DEPLOYMENT.md for production setup

Production Ready | SaaS Architecture

About

SatsuDrive adalah aplikasi Cloud Storage profesional dan production-ready yang dibangun dengan technologies modern (Laravel 10 + React 18 + Vite + Tailwind CSS).

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages