A full-stack cloud storage platform built with modern web technologies
Demo β’ Features β’ Installation β’ Tech Stack
OrbitFiles is a feature-rich cloud storage platform, built with cutting-edge technologies. It provides secure file management, seamless uploads, and optimized file delivery, all wrapped in a beautiful and intuitive user interface.
|
|
# Coming Soon!
Live Demo: [OrbitFiles Demo](https://your-demo-url.com)| Category | Technology | Purpose |
|---|---|---|
| Framework | Next.js | React framework with SSR/SSG |
| Authentication | Clerk | User authentication & management |
| Database | Neon PostgreSQL | Serverless PostgreSQL database |
| ORM | Drizzle ORM | Type-safe database queries |
| Validation | Zod | Schema validation |
| File Delivery | ImageKit | CDN & image optimization |
| Storage | AWS S3 | Cloud file storage |
| UI Components | HeroUI | Modern UI component library |
| Styling | Tailwind CSS | Utility-first CSS framework |
Before you begin, ensure you have the following installed:
- Node.js (v18 or higher)
- npm or yarn or pnpm
- Git
You'll need accounts and API keys from:
- Clerk - Sign up here
- ImageKit - Sign up here
- Neon PostgreSQL - Sign up here
- AWS S3 (Optional) - Sign up here
# Clone the repository
git clone https://github.com/your-username/orbitfiles.git
# Navigate to project directory
cd orbitfilesCreate a .env.local file in the root directory:
# Clerk Authentication
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
CLERK_SECRET_KEY=your_clerk_secret_key
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
# Database (Neon PostgreSQL)
DATABASE_URL=your_neon_database_url
# ImageKit
NEXT_PUBLIC_IMAGEKIT_PUBLIC_KEY=your_imagekit_public_key
IMAGEKIT_PRIVATE_KEY=your_imagekit_private_key
NEXT_PUBLIC_IMAGEKIT_URL_ENDPOINT=your_imagekit_url_endpoint
# AWS S3 (Optional)
AWS_ACCESS_KEY_ID=your_aws_access_key
AWS_SECRET_ACCESS_KEY=your_aws_secret_key
AWS_REGION=your_aws_region
AWS_BUCKET_NAME=your_bucket_name# Using npm
npm install
# Using yarn
yarn install
# Using pnpm
pnpm install# Generate Drizzle schema
npm run db:generate
# Push schema to database
npm run db:push
# (Optional) Open Drizzle Studio
npm run db:studio# Start the development server
npm run dev
# Open http://localhost:3000 in your browser# Build the application
npm run build
# Start production server
npm startorbitfiles/
βββ app/ # Next.js app directory
β βββ (auth)/ # Authentication routes
β βββ (dashboard)/ # Dashboard routes
β βββ api/ # API routes
β βββ layout.tsx # Root layout
βββ components/ # React components
β βββ ui/ # UI components
β βββ file-upload/ # File upload components
β βββ file-list/ # File listing components
βββ lib/ # Utility functions
β βββ db/ # Database configuration
β βββ imagekit/ # ImageKit setup
β βββ utils.ts # Helper functions
βββ public/ # Static assets
βββ drizzle/ # Database schema & migrations
βββ types/ # TypeScript type definitions
βββ .env.local # Environment variables
βββ drizzle.config.ts # Drizzle ORM configuration
βββ next.config.js # Next.js configuration
βββ package.json # Project dependencies
βββ tailwind.config.js # Tailwind CSS configuration
- Visit Clerk Dashboard
- Create a new application
- Copy your API keys to
.env.local - Configure sign-in/sign-up URLs
Clerk Documentation: https://clerk.com/docs
- Sign up at ImageKit
- Get your Public Key, Private Key, and URL Endpoint
- Add credentials to
.env.local - Configure upload settings in your dashboard
ImageKit Documentation: https://docs.imagekit.io
- Create account at Neon
- Create a new project
- Copy the connection string
- Add to
.env.localasDATABASE_URL
Configure drizzle.config.ts:
import type { Config } from 'drizzle-kit';
export default {
schema: './lib/db/schema.ts',
out: './drizzle',
driver: 'pg',
dbCredentials: {
connectionString: process.env.DATABASE_URL!,
},
} satisfies Config;// Drag-and-drop with progress tracking
- Multiple file selection
- Real-time upload progress
- Error handling
- Success notifications// Organize your files efficiently
- Star/favorite files
- Move to trash
- Restore deleted files
- Permanent deletion
- File search & filtering// Clerk handles everything
- Email/password authentication
- Social OAuth (Google, GitHub, etc.)
- Session management
- Protected API routes// ImageKit CDN integration
- Automatic image optimization
- Responsive images
- Fast global delivery
- Bandwidth optimization// Example Drizzle schema structure
import { pgTable, serial, text, timestamp, boolean } from 'drizzle-orm/pg-core';
export const files = pgTable('files', {
id: serial('id').primaryKey(),
userId: text('user_id').notNull(),
fileName: text('file_name').notNull(),
fileUrl: text('file_url').notNull(),
fileSize: text('file_size'),
fileType: text('file_type'),
isStarred: boolean('is_starred').default(false),
isTrashed: boolean('is_trashed').default(false),
createdAt: timestamp('created_at').defaultNow(),
updatedAt: timestamp('updated_at').defaultNow(),
});| Endpoint | Method | Description |
|---|---|---|
/api/files |
GET | Get all user files |
/api/files |
POST | Upload new file |
/api/files/[id] |
GET | Get file details |
/api/files/[id] |
PATCH | Update file (star/trash) |
/api/files/[id] |
DELETE | Delete file permanently |
/api/upload |
POST | Handle file upload |
# Run tests
npm run test
# Run tests in watch mode
npm run test:watch
# Generate coverage report
npm run test:coverageBuilt with HeroUI and styled with Tailwind CSS:
- π΄ File Cards - Beautiful file preview cards
- π€ Upload Modal - Drag-and-drop upload interface
- ποΈ Trash Bin - Manage deleted files
- β Starred Files - Quick access to favorites
- π Search Bar - Find files instantly
- π± Responsive Layout - Works on all devices
- β Authentication - Clerk-powered secure authentication
- β Protected Routes - Middleware protection for sensitive routes
- β Data Validation - Zod schema validation for all inputs
- β SQL Injection Prevention - Drizzle ORM parameterized queries
- β CORS Protection - Configured CORS policies
- β Rate Limiting - API rate limiting (optional)
# Install Vercel CLI
npm i -g vercel
# Deploy
vercelAdd all environment variables from .env.local to your Vercel project settings.
- Netlify: Compatible with Next.js deployment
- Railway: Easy deployment with database hosting
- AWS: Deploy with Amplify or EC2
- β‘ Next.js 14+ - Latest features and optimizations
- πΌοΈ ImageKit CDN - Global content delivery
- ποΈ Neon Serverless - Instant database scaling
- π¦ Code Splitting - Automatic by Next.js
- π― Edge Runtime - Fast API responses
- πΎ Caching - Optimized caching strategies
- File Sharing - Share files with other users
- Folder Structure - Organize files in folders
- File Preview - In-app file preview
- Mobile App - React Native mobile application
- Collaborative Editing - Real-time collaboration
- Version Control - File version history
- Advanced Search - Full-text search
- Storage Analytics - Usage statistics dashboard
Contributions are welcome! Here's how you can help:
- 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
Please read CONTRIBUTING.md for details on our code of conduct and development process.
- File upload size limited to 10MB (configurable)
- Bulk operations coming in future updates
- Mobile responsive design improvements ongoing
Report issues at: GitHub Issues
- Clerk - Authentication solution
- ImageKit - CDN and image optimization
- Neon - Serverless PostgreSQL
- Vercel - Deployment platform
- Next.js Team - Amazing framework
- π Next.js Docs
- π Clerk Documentation
- πΌοΈ ImageKit Documentation
- ποΈ Drizzle ORM Docs
- π Neon Docs
- β Zod Documentation
Built with β€οΈ by Your Name
Inspired by Dropbox β’ Powered by Next.js β’ Secured by Clerk β’ Optimized by ImageKit