A modern file storage and sharing platform built with cutting-edge technologies. Upload, store, and share your files with ease! πβ¨
- π Secure Authentication - Built with better-auth for robust user authentication
- π€ File Upload - Drag & drop or click to upload files effortlessly
- βοΈ Cloud Storage - S3-compatible storage with MinIO for scalable file management
- π¨ Beautiful UI - Modern, responsive interface built with Next.js and shadcn/ui
- β‘ Fast Performance - Powered by Bun runtime and Fastify for lightning-fast API responses
- ποΈ Reliable Database - PostgreSQL with Drizzle ORM for efficient data management
- π Real-time Updates - Redis for caching and session management
- π Dark Mode - Built-in theme support for comfortable viewing
- π± Responsive Design - Works seamlessly on desktop, tablet, and mobile devices
- Framework: Next.js 16 (React 19) βοΈ
- Styling: Tailwind CSS 4 π¨
- UI Components: shadcn/ui, Base UI π§©
- State Management: Zustand, TanStack Query π
- Forms: TanStack Form π
- Type Safety: TypeScript 7 π
- Runtime: Bun 1.4+ π₯
- Framework: Fastify 5 β‘
- Database: PostgreSQL π
- ORM: Drizzle ORM ποΈ
- Cache: Redis π΄
- Storage: MinIO (S3-compatible) βοΈ
- Authentication: better-auth π
- Build System: Turborepo 2 ποΈ
- Package Manager: Bun π¦
- Linting: Biome π
- Code Quality: Prettier β¨
graph TB
subgraph "Client Layer"
A[Next.js Frontend]
A --> B[React Components]
A --> C[TanStack Query]
end
subgraph "API Layer"
D[Fastify Server]
D --> E[Auth Routes]
D --> F[File Routes]
D --> G[User Routes]
end
subgraph "Service Layer"
H[Auth Service]
I[Storage Service]
J[Database Service]
end
subgraph "Data Layer"
K[(PostgreSQL)]
L[(Redis)]
M[(MinIO S3)]
end
A -->|HTTP/REST| D
D --> H
D --> I
D --> J
H --> K
I --> M
J --> K
J --> L
C -->|Caching| L
- Node.js: >= 24 π’
- Bun: >= 1.4.2 π₯
- Docker: For running infrastructure services π³
- Git: For version control π
git clone <your-repo-url>
cd nodedrivebun installdocker-compose up -dThis will start:
- PostgreSQL on port 5432 π
- Redis on port 6379 π΄
- MinIO on ports 9000 (API) and 9001 (Console) βοΈ
Create a .env.local file in apps/client/:
NEXT_PUBLIC_BETTER_AUTH_URL=http://localhost:3001cd packages/drizzle
bun run db:push# Start all services (client + server)
bun run dev
# Or start individually:
# Client (Next.js)
cd apps/client && bun run dev
# Server (Fastify)
cd apps/server && bun run dev- Frontend: http://localhost:3000 π
- Backend API: http://localhost:3001 π
- MinIO Console: http://localhost:9001 βοΈ
nodedrive/
βββ apps/
β βββ client/ # Next.js frontend application
β β βββ src/
β β β βββ app/ # Next.js app router pages
β β β βββ components/ # Reusable UI components
β β β βββ hooks/ # Custom React hooks
β β β βββ lib/ # Utility functions
β β βββ public/ # Static assets
β β
β βββ server/ # Fastify backend application
β βββ src/
β βββ config/ # Server configuration
β βββ lib/ # Utility functions
β βββ plugins/ # Fastify plugins
β βββ routes/ # API routes
β
βββ packages/
β βββ auth/ # Authentication library (better-auth)
β βββ drizzle/ # Database ORM (Drizzle)
β βββ env/ # Environment configuration
β βββ eslint-config/ # Shared ESLint configuration
β βββ storage/ # S3 storage client
β βββ typescript-config/ # Shared TypeScript configuration
β
βββ s3_storage/ # MinIO storage directory
βββ docker-compose.yml # Infrastructure services
βββ turbo.json # Turborepo configuration
βββ package.json # Root package configuration
bun run dev # Start all services in development mode
bun run build # Build all packages and apps
bun run lint # Lint all packages and apps
bun run format # Format code with Prettier
bun run check-types # Type-check all packages and appsbun run db:generate # Generate database migrations
bun run db:migrate # Run database migrations
bun run db:push # Push schema changes to database
bun run db:studio # Open Drizzle StudioCreate a .env file in the root directory (optional):
# Database
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_DB=postgres
# MinIO/S3
MINIO_ROOT_USER=admin
MINIO_ROOT_PASSWORD=password
S3_BUCKET=nodedrive
# Client URL
CLIENT_URL=http://localhost:3000 # Public site origin; used for canonical URLs and sitemapUses better-auth with Drizzle adapter for secure authentication. Supports:
- Email/password authentication
- Session management
- Cookie-based auth
Built on MinIO (S3-compatible) with AWS SDK:
- Secure file uploads
- Presigned URLs for direct access
- Scalable storage solution
PostgreSQL with Drizzle ORM:
- Type-safe database queries
- Automatic migrations
- Optimized performance
# Check if PostgreSQL is running
docker-compose ps postgres
# Restart services
docker-compose restartChange ports in docker-compose.yml or stop conflicting services.
# Clear cache and rebuild
rm -rf .next node_modules
bun install
bun run buildThis project is private and proprietary. All rights reserved. Β© 2026
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests and linting
- Submit a pull request
For support, please open an issue in the repository or contact the development team.
Built with β€οΈ using modern web technologies