An intelligent cloud storage platform that uses AI to automatically organize, tag, and make your files searchable.
- AI-Powered Organization: Automatic file tagging and categorization using OpenAI and Google Cloud Vision
- Smart Search: Natural language search across all your files
- Cloud Storage: Secure file storage with AWS S3 integration
- Real-time Processing: Background AI processing with Redis queues
- Modern UI: Beautiful, responsive interface built with Next.js and Tailwind CSS
- Enterprise Security: Authentication, file sharing, and access controls
- Next.js 14 with App Router
- TypeScript for type safety
- Tailwind CSS for styling
- NextAuth.js for authentication
- Express.js API server
- Prisma ORM with PostgreSQL
- AWS S3 for file storage
- Redis + BullMQ for background processing
- OpenAI GPT for text summarization and tagging
- Google Cloud Vision for image analysis
- PDF parsing and OCR capabilities
Sortify/
├── apps/
│ ├── web/ # Next.js frontend
│ └── server/ # Express.js API
├── packages/
│ ├── db/ # Prisma schema & client
│ ├── ui/ # Shared React components
│ ├── workers/ # AI processing workers
│ └── ...config packages
└── docs/ # Documentation
- Node.js 18+
- PostgreSQL database
- Redis server
- AWS S3 bucket (optional, can use local storage)
- OpenAI API key (optional, for AI features)
- Google Cloud Vision API key (optional, for image processing)
- Clone the repository
git clone https://github.com/Harshvardhan-91/Sortify.git
cd Sortify- Install dependencies
npm install- Set up environment variables
# Copy example files
cp apps/server/.env.example apps/server/.env
cp packages/workers/.env.example packages/workers/.env
cp apps/web/.env.example apps/web/.env
# Edit the .env files with your configurations- Set up the database
cd packages/db
npx prisma migrate dev
npx prisma generate- Start the development servers
npm run devThis will start:
- Web app: http://localhost:3001
- API server: http://localhost:3002
- Background workers
For cloud file storage, see AWS S3 Setup Guide.
-
OpenAI (for text summarization):
OPENAI_API_KEY=your-openai-api-key
-
Google Cloud Vision (for image analysis):
GOOGLE_CLOUD_KEY_FILE=path/to/service-account-key.json
DATABASE_URL="postgresql://user:password@localhost:5432/sortify"REDIS_URL="redis://localhost:6379"// 1. Get signed upload URL
POST /api/files/upload-url
{
"fileName": "document.pdf",
"mimeType": "application/pdf"
}
// 2. Upload to S3 using returned URL
PUT <signed-url>
// 3. Confirm upload
POST /api/files/confirm-upload
{
"key": "s3-object-key",
"fileName": "document.pdf",
"mimeType": "application/pdf",
"size": 1024
}POST /api/files/upload
FormData: fileGET /api/files # List user files
GET /api/files/:id # Get file details
GET /api/files/:id/download # Download file
DELETE /api/files/:id # Delete file
PATCH /api/files/:id # Update file metadataThis project is licensed under the MIT License.
This Turborepo has some additional tools already setup for you:
- Tailwind CSS for styles
- TypeScript for static type checking
- ESLint for code linting
- Prettier for code formatting