A comprehensive file upload and storage solution with a modern web interface, powerful backend API, and embeddable JavaScript widget for seamless file management across web applications.
ImaginaryStorage is a full-stack file storage platform designed to simplify file upload, management, and sharing for modern web applications. The project consists of multiple interconnected applications that work together to provide a complete file storage ecosystem.
β Completed Components:
- Backend API - Full-featured NestJS backend with authentication, file management, and storage providers
- Frontend Dashboard - React-based web interface for file management and user administration
- Upload Widget - Embeddable JavaScript widget for easy integration into any web application
- Landing Site - Marketing site with comprehensive documentation
- Proxy Service - Secure file serving with authentication and access control
π§ In Development:
- Enhanced storage provider integrations
- Advanced file processing capabilities
- Improved user management and permissions
- Provide a complete, production-ready file storage solution
- Support multiple cloud storage providers (AWS S3, Google Cloud Storage)
- Offer seamless integration with existing web applications
- Maintain high security standards with proper authentication and access controls
- Deliver excellent developer experience with comprehensive documentation
- Local Filesystem Support - Add support for local file storage for self-hosted deployments
- Additional Storage Providers - Integrate with more cloud storage services (Azure Blob, DigitalOcean Spaces, etc.)
- Enhanced File Processing - Image optimization, video transcoding, document conversion
- Advanced Collaboration - File sharing, commenting, and collaborative editing features
- Mobile SDKs - Native mobile SDKs for iOS and Android applications
- Enterprise Features - Advanced user management, audit logs, compliance features
imaginary-storage/
βββ π apps/ # Application modules
β βββ π frontend/ # React dashboard application
β β βββ src/components/ # React components
β β βββ src/api/ # API client and hooks
β β βββ src/stores/ # State management
β β βββ package.json
β β
β βββ π nest-backend/ # NestJS API server
β β βββ src/modules/ # Feature modules
β β β βββ auth/ # Authentication & authorization
β β β βββ files/ # File management
β β β βββ storage/ # Storage provider integrations
β β β βββ upload/ # File upload handling
β β β βββ users/ # User management
β β βββ src/schemas/ # Database schemas
β β βββ package.json
β β
β βββ π imaginary-widget/ # Embeddable upload widget
β β βββ src/core/ # Core widget functionality
β β βββ src/ui/ # User interface components
β β βββ src/api/ # Widget API client
β β βββ dist/ # Built widget files
β β βββ package.json
β β
β βββ π landing-site/ # Marketing & documentation site
β β βββ src/app/ # Next.js app router
β β βββ src/components/ # Site components
β β βββ src/app/docs/ # MDX documentation
β β βββ package.json
β β
β βββ π proxy/ # File serving proxy
β βββ src/adapters/ # Storage adapter implementations
β βββ src/auth/ # Authentication middleware
β βββ package.json
β
βββ π deploy/ # Deployment configurations
β βββ docker-compose.yml # Production deployment
β βββ docker-compose.local.yml # Local development
β βββ config/nginx/ # Nginx configurations
β
βββ π scripts/ # Utility scripts
β βββ run-all.sh # Start all services
β βββ add-todo.sh # Development utilities
β
βββ π journal/ # Development documentation
β βββ implementations/ # Implementation notes
β βββ issues/ # Known issues and solutions
β βββ plans/ # Development planning
β
βββ π todo/ # Task management
β
βββ package.json # Root package.json
βββ README.md # This file
Ensure you have the following installed:
- Node.js 18+
- npm 9+
- MongoDB (for backend database)
- Redis (for caching and sessions)
-
Clone the repository
git clone https://github.com/imaginary-storage/imaginary-storage-cloud.git cd imaginary-storage-cloud -
Install all dependencies
npm install
-
Start all services in development mode
npm run dev
This will start:
- Frontend Dashboard: http://localhost:3000
- Backend API: http://localhost:3001
- Landing Site: http://localhost:3002
- Upload Widget: Built and served from CDN endpoint
- Proxy Service: http://localhost:3003
If you prefer to run services individually:
# Backend API
cd apps/nest-backend
npm install
npm run dev
# Frontend Dashboard
cd apps/frontend
npm install
npm run dev
# Landing Site with Documentation
cd apps/landing-site
npm install
npm run dev
# Upload Widget (build for development)
cd apps/imaginary-widget
npm install
npm run build
# Proxy Service
cd apps/proxy
npm install
npm run devComprehensive documentation is available at the landing site:
- Widget Documentation: http://localhost:3002/docs/upload-widget/overview
- API Documentation: Available in the backend (
apps/nest-backend/README.md) - Frontend Guide: Available in the frontend (
apps/frontend/README.md)
- Quick Start Guide - Get up and running in 5 minutes
- Installation Options - CDN, npm, and self-hosted setup
- API Reference - Complete widget API documentation
- Examples - Real-world integration examples
- Security Guide - Security best practices
From the root directory:
npm run dev # Start all services in development mode
npm run build # Build all applications for production
npm run test # Run tests across all applications
npm run lint # Lint all applications
npm run clean # Clean all build artifactsEach application has its own development commands:
# Widget Development
cd apps/imaginary-widget
npm run dev # Build with file watching
npm run serve # Serve built files locally
# Backend Development
cd apps/nest-backend
npm run dev # Start with hot reload
npm run test # Run unit tests
npm run test:e2e # Run integration tests
# Frontend Development
cd apps/frontend
npm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production build-
Start all services:
npm run devfrom root -
Access applications:
- Frontend Dashboard: http://localhost:3000
- API Documentation: http://localhost:3001/api
- Landing Site: http://localhost:3002
- Widget Testing: http://localhost:3002/docs/upload-widget/examples
-
Make changes: All services support hot reload
-
Test integrations: Use the widget examples to test end-to-end functionality
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Frontend β β Landing Site β β Upload Widget β
β Dashboard β β Documentation β β (Embeddable) β
β β β β β β
βββββββββββ¬ββββββββ βββββββββββ¬ββββββββ βββββββββββ¬ββββββββ
β β β
ββββββββββββββββββββββββΌβββββββββββββββββββββββ
β
βββββββββββββββββββ
β NestJS API β
β Backend β
β β
βββββββββββ¬ββββββββ
β
βββββββββββββββββββββββββββββββββββββββββ
β β
βββββββββββΌββββββββ βββββββββββΌββββββββ
β MongoDB β β Storage Proxy β
β Database β β Service β
βββββββββββββββββββ βββββββββββ¬ββββββββ
β
βββββββββββΌββββββββ
β Cloud Storage β
β (AWS S3, GCS) β
βββββββββββββββββββ
- Frontend: React 18, TypeScript, Vite, Tailwind CSS
- Backend: NestJS, TypeScript, MongoDB, Redis
- Widget: Vanilla JavaScript, Rollup
- Landing: Next.js 14, MDX, Tailwind CSS
- Proxy: Node.js, Express, TypeScript
- Deployment: Docker, Nginx, Docker Compose
- JWT Authentication - Secure user authentication and session management
- API Key Management - Secure widget authentication with public/private key pairs
- File Validation - Comprehensive file type, size, and content validation
- Access Control - Fine-grained permissions and file access controls
- Secure Upload Tokens - Temporary, signed tokens for secure file uploads
- CORS Protection - Proper cross-origin resource sharing configuration
# Production deployment
docker-compose -f deploy/docker-compose.yml up -d
# Local development with Docker
docker-compose -f deploy/docker-compose.local.yml up -d-
Build all applications:
npm run build
-
Deploy backend:
cd apps/nest-backend npm run build npm run start:prod -
Deploy frontend:
cd apps/frontend npm run build # Deploy dist/ folder to your CDN
-
Deploy widget:
cd apps/imaginary-widget npm run build # Deploy dist/ folder to your CDN
We welcome contributions! Please see our contributing guidelines for details.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes
- Run tests:
npm test - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
- TypeScript for all new code
- ESLint and Prettier for code formatting
- Conventional commits for commit messages
- Comprehensive tests for new features
This project is licensed under the MIT License - see the LICENSE file for details.
- Documentation: Visit http://localhost:3002/docs/upload-widget/overview
- Issues: Create an issue on GitHub
- Discussions: Use GitHub Discussions for questions and ideas
- Built with amazing open-source technologies
- Inspired by modern file storage needs
- Community-driven development
Ready to build amazing file upload experiences? π
Start with npm run dev and visit the documentation at http://localhost:3002/docs/upload-widget/overview