Skip to content

dynamicflare/storeufo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

StoreUFO πŸ›Έ

Unified cloud storage management with AI-powered intelligence

StoreUFO is a full-stack platform for managing cloud storage across multiple providers from a single, intuitive dashboard. Built with Next.js, Node.js, and powered by AI.

Features

  • 🌐 Multi-Provider Support - Connect Cloudflare R2, AWS S3, and other S3-compatible services
  • 🏒 Organization Management - Multi-tenant architecture with project-based organization
  • πŸ€– AI-Powered - Intelligent file analysis using Google GenAI
  • πŸ“ File Management - Upload, organize, and manage files with automatic image optimization
  • πŸ“Ί 24/7 Live Streaming - Continuous RTMP streaming to multiple platforms (YouTube, Facebook, Twitch)
  • ⚑ Background Processing - Async job queues for heavy operations
  • 🎨 Themeable UI - Customizable interface with multiple themes
  • πŸ” Secure - JWT authentication with bcrypt password hashing

Tech Stack

Frontend:

  • Next.js 16 + React 19
  • TypeScript
  • Tailwind CSS + shadcn/ui
  • TanStack React Query

Backend:

  • Node.js + Express
  • MongoDB (Mongoose)
  • Redis + Bull (job queues)
  • AWS SDK (S3-compatible storage)
  • FFmpeg (video streaming)

AI:

  • Google GenAI (Gemini)
  • Model Context Protocol (MCP)

Prerequisites

  • Node.js 18+ and npm
  • MongoDB database
  • Redis server
  • FFmpeg (for video streaming)
  • Google Gemini API key
  • Cloud storage account (Cloudflare R2 or AWS S3)

Setup & Credentials

1. Google Gemini API Key

  • Go to Google AI Studio
  • Create a new project or select an existing one
  • Click "Get API key"
  • Copy the key to GEMINI_API_KEY in .env

2. MongoDB URI

  • Local: Use mongodb://localhost:27017/storeufo
  • Atlas (Cloud):
    • Create a cluster on MongoDB Atlas
    • Click "Connect" > "Drivers"
    • Copy the connection string to MONGODB_URI in .env

3. Redis URL

  • Local: Use redis://localhost:6379
  • Cloud (Upstash/Redis Cloud):

4. Adding Storage Accounts

Cloudflare R2:

  1. Go to Cloudflare Dashboard > R2.
  2. Create a bucket.
  3. Go to "Manage R2 API Tokens" > "Create API Token".
  4. Permission: "Admin Read & Write".
  5. Copy Access Key ID, Secret Access Key, and Endpoint.
  6. In StoreUFO Dashboard: Go to "Storage Accounts" > "Add New" > Select "R2".

AWS S3:

  1. Go to AWS Console > IAM > Users > Create User.
  2. Attach policy: AmazonS3FullAccess.
  3. Create Access Key for the user.
  4. Copy Access Key ID and Secret Access Key.
  5. In StoreUFO Dashboard: Go to "Storage Accounts" > "Add New" > Select "S3".

Installation

1. Clone the repository

git clone https://github.com/Dynamicearner/project-storeufo.git
cd project-storeufo

2. Backend Setup

cd backend
npm install

Create .env file from example:

cp .env.example .env

Edit backend/.env with your credentials:

GEMINI_API_KEY=your_gemini_api_key
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_secret_key
REDIS_URL=your_redis_url
ADMIN_EMAIL=[email protected]
ADMIN_PASSWORD=admin123

3. Frontend Setup

cd ../frontend
npm install

Create .env.local file:

cp .env.example .env.local

Edit frontend/.env.local:

NEXT_PUBLIC_API_URL=http://localhost:5000

Running the Application

Development Mode

Terminal 1 - Backend:

cd backend
npm run dev

Backend runs on http://localhost:5000

Terminal 2 - Frontend:

cd frontend
npm run dev

Frontend runs on http://localhost:3000

Production Mode

Backend:

cd backend
npm start

Frontend:

cd frontend
npm run build
npm start

Environment Variables

Backend (.env)

Variable Description Default
GEMINI_API_KEY Google Gemini API key Required
MONGODB_URI MongoDB connection string Required
JWT_SECRET Secret key for JWT tokens Required
REDIS_URL Redis connection URL Required
NODE_ENV Environment mode development
FRONTEND_URL Frontend URL for CORS http://localhost:3000
ADMIN_EMAIL Default admin email [email protected]
ADMIN_PASSWORD Default admin password admin123
MAX_LOGIN_ATTEMPTS Max failed login attempts 3
LOGIN_LOCK_TIME_HOURS Account lock duration (hours) 5
JWT_EXPIRY JWT token expiry time 2h
MAX_FILE_SIZE Max file size in bytes 5368709120 (5GB)
MAX_FOLDER_SIZE Max folder size in bytes 10737418240 (10GB)
MAX_FOLDER_FILES Max files per folder 1000
PRESIGNED_URL_EXPIRY S3 URL expiry in seconds 3600
STREAM_KEY_ENCRYPTION_SECRET Secret for encrypting RTMP keys Required (32 chars)
MAX_CONCURRENT_STREAMS Max simultaneous streams 10
STREAM_PRESIGNED_URL_EXPIRY Stream URL expiry (seconds) 43200 (12 hours)
STREAM_HEALTH_CHECK_INTERVAL Stream health check interval (ms) 5000

Frontend (.env.local)

Variable Description Default
NEXT_PUBLIC_API_URL Backend API URL http://localhost:5000

Project Structure

project-storeufo/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ config/         # Database & Redis config
β”‚   β”‚   β”œβ”€β”€ middleware/     # Auth & validation middleware
β”‚   β”‚   β”œβ”€β”€ models/         # MongoDB models
β”‚   β”‚   β”œβ”€β”€ routes/         # API routes
β”‚   β”‚   β”œβ”€β”€ services/       # Business logic
β”‚   β”‚   β”œβ”€β”€ utils/          # Helper functions
β”‚   β”‚   β”œβ”€β”€ workers/        # Background job workers
β”‚   β”‚   └── server.js       # Entry point
β”‚   β”œβ”€β”€ uploads/            # Temporary file uploads
β”‚   └── package.json
β”‚
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ app/            # Next.js pages
β”‚   β”‚   β”œβ”€β”€ components/     # React components
β”‚   β”‚   β”œβ”€β”€ contexts/       # React contexts
β”‚   β”‚   β”œβ”€β”€ hooks/          # Custom hooks
β”‚   β”‚   β”œβ”€β”€ lib/            # Utilities
β”‚   β”‚   └── themes/         # Theme system
β”‚   └── package.json
β”‚
└── README.md

API Documentation

For complete API documentation with request/response examples, visit:

API Documentation

Quick API Overview

  • Authentication: Login, logout, JWT token management
  • Organizations: Create and manage organizations
  • Projects: Project management within organizations
  • Storage Accounts: Connect R2/S3 storage providers
  • File Upload: Direct presigned URL uploads (single files & folders)
  • File Management: List, retrieve, generate URLs, delete files
  • 24/7 Streaming: Create stream slots, manage playlists, multi-platform RTMP streaming
  • AI Features: Object detection, image analysis, natural language search (English/Hindi/Hinglish)
  • R2 Verification: Verify credentials and list buckets

Default Admin Credentials

Email: [email protected]
Password: admin123

⚠️ Change these credentials immediately in production!

Contributing

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

License

This project is licensed under the MIT License.

Support

For issues and questions, please open an issue on GitHub.

Acknowledgments

  • Built for hackathon submission
  • Powered by Google GenAI
  • UI components from shadcn/ui
  • Icons from Lucide React

Made with ❀️ by Dynamicearner

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published