A Modern Cloud Storage Management Platform
Secure, fast, and intuitive file storage solution built with Next.js 15 and Appwrite
- Email-based Authentication with OTP verification
- Secure session management using Appwrite
- Protected routes with middleware
- User account creation and sign-in flows
- 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
- 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
- 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
- Next.js 15 - React framework with App Router
- React 19 - UI library
- TypeScript - Type safety
- Tailwind CSS - Utility-first CSS framework
- Radix UI - Headless UI components
- Lucide React - Beautiful icons
- Recharts - Data visualization
- Appwrite - Backend-as-a-Service
- Authentication
- Database (Collections)
- Storage (File buckets)
- Server-side SDK
- React Hook Form - Form state management
- Zod - Schema validation
- Input OTP - OTP input component
- ESLint - Code linting
- Prettier - Code formatting
- TypeScript - Static type checking
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
Before you begin, ensure you have the following installed:
- Node.js (v18 or higher)
- npm, yarn, pnpm, or bun
- Appwrite account (for backend services)
-
Clone the repository
git clone https://github.com/Prince-695/storix.git cd storix -
Install dependencies
npm install # or yarn install # or pnpm install
-
Set up environment variables
Create a
.env.localfile 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
-
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)
-
Run the development server
npm run dev # or yarn dev # or pnpm dev
-
Open your browser
Navigate to http://localhost:3000
- Navigate to
/sign-upto create a new account - Enter your full name and email
- Verify your email with the OTP sent to your inbox
- Sign in using your email at
/sign-in
- Click the upload button or drag files into the upload area
- Files are automatically categorized by type
- View uploaded files in the dashboard
- 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)
- 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)
# 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 ESLintThe 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
The Chart component visualizes:
- Total storage used vs. available (2GB limit)
- Breakdown by file type
- Latest upload dates per category
- User enters email (and name for sign-up)
- OTP is sent via Appwrite email service
- User verifies OTP in modal
- Session is created and user is redirected to dashboard
- User selects files via drag-drop or file picker
- Files are validated (size, type)
- Upload to Appwrite storage bucket
- Metadata stored in database
- Real-time UI update with new files
The easiest way to deploy Storix is using Vercel:
- Push your code to GitHub
- Import your repository in Vercel
- Add environment variables
- Deploy!
- Netlify: Configure build command as
npm run build - Railway: Auto-detects Next.js configuration
- AWS Amplify: Use the Next.js SSR preset
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Prince
- GitHub: @Prince-695
- Next.js Documentation
- Appwrite Documentation
- Tailwind CSS
- Radix UI
- Shadcn/ui for component inspiration
If you have any questions or need help, feel free to:
- Open an issue on GitHub
- Contact via email: [[email protected]]
Made with β€οΈ by Prince
β Star this repo if you find it useful!