A full-stack intelligent storage system that accepts arbitrary files, auto-generates schemas, and provides a unified retrieval API.
- App: https://smart-storage-omega.vercel.app
- API health: https://smart-storage-api.onrender.com/api/health
Measured on the live deployment (Render free tier → Supabase Postgres): a 10 MB JSON array with 98,565 records is uploaded, streamed, schema-inferred and loaded into PostgreSQL in ~46 s end to end (2 runs, Nov 2026).
The API runs on Render's free tier, so the first request after ~15 minutes of inactivity can take ~30 seconds while it wakes up.
| Part | Host | Config |
|---|---|---|
| Frontend (React + Vite) | Vercel | frontend/vercel.json (Root Directory = frontend) |
| Backend (Express API, Docker with ffmpeg) | Render | render.yaml + backend/Dockerfile |
| PostgreSQL | Supabase | DATABASE_URL (use the pooler connection string) |
| MongoDB | MongoDB Atlas | MONGO_URI |
Backend env vars (Render): DATABASE_URL, FORCE_IPV4=true, PG_SSL=true, MONGO_URI, CORS_ORIGINS (your Vercel URL), CLOUDINARY_*.
Frontend env vars (Vercel): VITE_API_BASE_URL=https://<your-render-service>.onrender.com/api.
smart-storage-system/
├── backend/ # Node.js + Express backend
│ ├── src/
│ │ ├── config/ # Configuration files
│ │ ├── middleware/ # Express middleware
│ │ ├── routes/ # API routes
│ │ ├── services/ # Business logic services
│ │ ├── utils/ # Utility functions
│ │ └── index.js # Application entry point
│ ├── migrations/ # Database migrations
│ ├── uploads/ # Uploaded files storage
│ ├── package.json
│ ├── .env # Environment configuration
│ └── README.md # Backend documentation
├── frontend/ # Frontend application
└── .git/ # Git repository
- Multi-format file upload: Images, video, audio, JSON, NDJSON, and more
- Automatic MIME detection: Using the
file-typenpm package - Media pipeline: Process media files with Sharp (images) and FFmpeg (video/audio)
- JSON pipeline: Handle structured data with automatic schema inference
- Auto-schema generation: Generate SQL DDL for PostgreSQL and JSON Schema for NoSQL
- Dual database support: PostgreSQL (via Knex) and MongoDB (via Mongoose)
- Dataset cataloging: Comprehensive metadata tracking
- Unified retrieval API: Always returns nested JSON regardless of storage backend
- Runtime: Node.js >= 18
- Framework: Express.js
- Databases: PostgreSQL 12+, MongoDB 5+
- File Processing:
- Multer (file uploads)
- file-type (MIME detection)
- Sharp (image processing)
- FFmpeg (video/audio processing)
- Logging: Winston
- Security: Helmet, CORS, Rate limiting
- Node.js >= 18
- PostgreSQL >= 12
- MongoDB >= 5
- FFmpeg (for video/audio processing)
# Navigate to backend
cd backend
# Install dependencies
npm install
# Configure environment
cp .env.example .env
# Edit .env with your database credentials
# Run database migrations
npm run migrate:latest
# Start development server
npm run devThe backend API will be available at http://localhost:3000
POST /api/upload
Content-Type: multipart/form-data
Body: file (multipart file upload)
GET /api/datasets # List all datasets
GET /api/datasets/:id # Get dataset metadata
GET /api/datasets/:id/data # Retrieve dataset data
POST /api/datasets/:id/query # Query dataset
GET /api/datasets/:id/stats # Get statistics
PATCH /api/datasets/:id # Update metadata
DELETE /api/datasets/:id # Delete dataset
GET /api/datasets/search/:keyword # Search datasets
cd backend
npm run dev# Create new migration
npm run migrate:make migration_name
# Run migrations
npm run migrate:latest
# Rollback last migration
npm run migrate:rollbackISC
