Skip to content

Prince-695/storix

Repository files navigation

πŸ“¦ Storix

A Modern Cloud Storage Management Platform

Secure, fast, and intuitive file storage solution built with Next.js 15 and Appwrite

Next.js React TypeScript Appwrite TailwindCSS


✨ Features

πŸ” Authentication & Security

  • Email-based Authentication with OTP verification
  • Secure session management using Appwrite
  • Protected routes with middleware
  • User account creation and sign-in flows

πŸ“‚ File Management

  • Upload Files - Support for multiple file types (up to 50MB)
  • Download Files - Quick access to your stored files
  • Rename Files - Easy file renaming with extension preservation
  • Delete Files - Permanent file removal from storage
  • File Sharing - Share files with other users via email
  • Search & Filter - Find files quickly with advanced search
  • Sort Options - Organize by name, date, or size

πŸ“Š Dashboard Analytics

  • Storage Usage Chart - Visual representation of storage consumption
  • File Type Categorization - Separate views for Documents, Images, Videos, Audio, and Others
  • Recent Files - Quick access to recently uploaded files
  • Storage Statistics - Track usage across different file types
  • Real-time Updates - Dynamic data with automatic revalidation

🎨 User Experience

  • Responsive Design - Works seamlessly on desktop, tablet, and mobile
  • Dark Mode UI - Modern, eye-friendly interface
  • Drag & Drop Upload - Intuitive file upload experience
  • Real-time Feedback - Loading states and error handling
  • Toast Notifications - User-friendly alerts and confirmations

πŸ› οΈ Tech Stack

Frontend

Backend & Database

  • Appwrite - Backend-as-a-Service
    • Authentication
    • Database (Collections)
    • Storage (File buckets)
    • Server-side SDK

Form & Validation

Developer Tools


πŸ“ Project Structure

storix/
β”œβ”€β”€ app/                          # Next.js App Router
β”‚   β”œβ”€β”€ (auth)/                  # Authentication routes
β”‚   β”‚   β”œβ”€β”€ sign-in/            # Sign-in page
β”‚   β”‚   └── sign-up/            # Sign-up page
β”‚   β”œβ”€β”€ (root)/                 # Main application routes
β”‚   β”‚   β”œβ”€β”€ [type]/             # Dynamic file type pages
β”‚   β”‚   └── page.tsx            # Dashboard
β”‚   β”œβ”€β”€ globals.css             # Global styles
β”‚   └── layout.tsx              # Root layout
β”‚
β”œβ”€β”€ components/                  # React components
β”‚   β”œβ”€β”€ ui/                     # Reusable UI components (Radix)
β”‚   β”œβ”€β”€ ActionDropdown.tsx      # File action menu
β”‚   β”œβ”€β”€ ActionsModalContent.tsx # Modal for file actions
β”‚   β”œβ”€β”€ AuthForm.tsx            # Authentication form
β”‚   β”œβ”€β”€ Card.tsx                # Card component
β”‚   β”œβ”€β”€ Chart.tsx               # Storage usage chart
β”‚   β”œβ”€β”€ FileUploader.tsx        # Drag & drop file upload
β”‚   β”œβ”€β”€ Header.tsx              # Page header
β”‚   β”œβ”€β”€ MobileNavigation.tsx    # Mobile sidebar
β”‚   β”œβ”€β”€ OTPModal.tsx            # OTP verification modal
β”‚   β”œβ”€β”€ Search.tsx              # Search component
β”‚   β”œβ”€β”€ Sidebar.tsx             # Desktop sidebar
β”‚   β”œβ”€β”€ Sort.tsx                # Sort dropdown
β”‚   └── Thumbnail.tsx           # File preview thumbnails
β”‚
β”œβ”€β”€ lib/                        # Utility functions & actions
β”‚   β”œβ”€β”€ actions/               # Server actions
β”‚   β”‚   β”œβ”€β”€ file.actions.ts   # File CRUD operations
β”‚   β”‚   └── user.actions.ts   # User authentication
β”‚   β”œβ”€β”€ appwrite/             # Appwrite configuration
β”‚   β”‚   β”œβ”€β”€ config.ts        # Environment variables
β”‚   β”‚   └── index.ts         # Client initialization
β”‚   └── utils.ts             # Helper functions
β”‚
β”œβ”€β”€ constants/                 # Application constants
β”‚   └── index.ts             # Navigation items, sort types
β”‚
β”œβ”€β”€ types/                    # TypeScript type definitions
β”‚   └── index.d.ts          # Global types
β”‚
β”œβ”€β”€ hooks/                   # Custom React hooks
β”‚   └── use-toast.ts        # Toast notifications hook
β”‚
└── public/                 # Static assets
    └── assets/            # Icons and images

πŸš€ Getting Started

Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js (v18 or higher)
  • npm, yarn, pnpm, or bun
  • Appwrite account (for backend services)

Installation

  1. Clone the repository

    git clone https://github.com/Prince-695/storix.git
    cd storix
  2. Install dependencies

    npm install
    # or
    yarn install
    # or
    pnpm install
  3. Set up environment variables

    Create a .env.local file in the root directory:

    # Appwrite Configuration
    NEXT_PUBLIC_APPWRITE_ENDPOINT=https://cloud.appwrite.io/v1
    NEXT_PUBLIC_APPWRITE_PROJECT=your_project_id
    NEXT_PUBLIC_APPWRITE_DATABASE=your_database_id
    NEXT_PUBLIC_APPWRITE_USERS_COLLECTION=your_users_collection_id
    NEXT_PUBLIC_APPWRITE_FILES_COLLECTION=your_files_collection_id
    NEXT_PUBLIC_APPWRITE_BUCKET=your_bucket_id
    NEXT_APPWRITE_KEY=your_api_secret_key
  4. Configure Appwrite

    • Create a new project in Appwrite Console
    • Create a database with two collections:
      • Users Collection (for user data)
      • Files Collection (for file metadata)
    • Create a storage bucket for file uploads
    • Set up authentication (Email/Password)
    • Configure file size limits (default: 50MB)
  5. Run the development server

    npm run dev
    # or
    yarn dev
    # or
    pnpm dev
  6. Open your browser

    Navigate to http://localhost:3000


πŸ“ Usage

Authentication

  1. Navigate to /sign-up to create a new account
  2. Enter your full name and email
  3. Verify your email with the OTP sent to your inbox
  4. Sign in using your email at /sign-in

Upload Files

  1. Click the upload button or drag files into the upload area
  2. Files are automatically categorized by type
  3. View uploaded files in the dashboard

Manage Files

  • Rename: Click the action menu β†’ Rename
  • Share: Click the action menu β†’ Share β†’ Enter recipient emails
  • Download: Click the action menu β†’ Download
  • Delete: Click the action menu β†’ Delete (requires confirmation)

Browse by Type

  • Navigate using the sidebar to view specific file types:
    • πŸ“„ Documents (.pdf, .doc, .txt, etc.)
    • πŸ–ΌοΈ Images (.jpg, .png, .gif, etc.)
    • πŸŽ₯ Media (.mp4, .avi, .mp3, etc.)
    • πŸ“¦ Others (all other file types)

πŸ”§ Available Scripts

# Development
npm run dev          # Start development server

# Production
npm run build        # Build for production
npm run start        # Start production server

# Code Quality
npm run lint         # Run ESLint

🎨 Key Features Breakdown

File Actions System

The ActionDropdown component provides comprehensive file management:

  • Dynamic action menu based on user permissions
  • Modal-based interfaces for complex actions
  • Real-time updates using Next.js revalidation

Storage Analytics

The Chart component visualizes:

  • Total storage used vs. available (2GB limit)
  • Breakdown by file type
  • Latest upload dates per category

Authentication Flow

  1. User enters email (and name for sign-up)
  2. OTP is sent via Appwrite email service
  3. User verifies OTP in modal
  4. Session is created and user is redirected to dashboard

File Upload Process

  1. User selects files via drag-drop or file picker
  2. Files are validated (size, type)
  3. Upload to Appwrite storage bucket
  4. Metadata stored in database
  5. Real-time UI update with new files

🌐 Deployment

Deploy on Vercel

The easiest way to deploy Storix is using Vercel:

Deploy with Vercel

  1. Push your code to GitHub
  2. Import your repository in Vercel
  3. Add environment variables
  4. Deploy!

Other Platforms

  • Netlify: Configure build command as npm run build
  • Railway: Auto-detects Next.js configuration
  • AWS Amplify: Use the Next.js SSR preset

🀝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ‘¨β€πŸ’» Author

Prince


πŸ™ Acknowledgments


πŸ“§ Support

If you have any questions or need help, feel free to:


Made with ❀️ by Prince

⭐ Star this repo if you find it useful!

About

A modern solution for Storage managment system

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published