Intelligent screenshot management, classification, and secure organization for modern workflows.
ScreenFlow is a full-stack proof-of-concept for a screenshot-first productivity platform. It combines:
- FastAPI backend with JWT authentication
- SQLAlchemy + PostgreSQL metadata storage
- Redis-powered Celery background processing
- OCR text extraction via Tesseract
- LLM-assisted screenshot classification and smart naming
- React + Vite frontend with drag-and-drop upload, search, and dashboard views
- Per-user screenshot isolation and duplicate detection
This repo demonstrates a working MVP: upload screenshots, process them in the background, and surface organized results through a secure UI.
- User sign up / login with JWT auth
- Screenshot upload endpoint with duplicate detection
- Background OCR and content classification pipeline
- Smart filenames generated from extracted metadata
- Search screenshots by OCR text
- Thumbnail preview and processing status on dashboard
- Secure per-user data isolation
- Folder structure organization on disk by category and date
- Python 3.11+
- FastAPI
- SQLAlchemy
- PostgreSQL
- Alembic
- Celery
- Redis
- pytesseract
- OpenAI / Gemini extraction fallback
- Python-JOSE + Passlib for auth
- React 19
- Vite
- Tailwind CSS
- Axios
- React Router DOM
- React Dropzone
app/— backend application packageapi/— FastAPI route modulesmodels/— SQLAlchemy data modelsschemas/— Pydantic request/response modelsservices/— OCR, content extraction, filename generationutils/— file handling and organization helpersworkers/— Celery background taskscore/— config, Celery app, security utilitiesdb/— database session and base metadata
frontend/— React UI appalembic/— database migration scriptstests/— backend tests.env.example— sample environment variables
- Python 3.11+
- PostgreSQL
- Redis
- Node.js 20+
- Tesseract OCR installed (required for
pytesseract)
- Create and activate your Python virtual environment:
python -m venv .venv
.\.venv\Scripts\Activate.ps1- Install backend dependencies:
pip install -r requirements.txt- Copy the environment example and set values:
copy .env.example .env- Update
.envwith your database URL and any API keys:
DATABASE_URL(PostgreSQL)REDIS_URLSECRET_KEYGEMINI_API_KEYorOPENAI_API_KEYif available
- Create the database and run migrations:
alembic upgrade head- Change into the frontend directory:
cd frontend- Install dependencies:
npm installIn separate terminals:
- Start Redis
- Start PostgreSQL
- Start the backend API:
uvicorn app.main:app --reload --host 0.0.0.0 --port 8001- Start the Celery worker:
celery -A app.core.celery_app.celery_app worker --loglevel=info- Start the frontend app:
cd frontend
npm run dev- Backend:
http://127.0.0.1:8001 - Frontend:
http://127.0.0.1:5173
- Open the frontend and sign up with an email/password.
- Upload a screenshot using the drag-and-drop upload zone.
- Wait for processing to complete.
- Browse your dashboard to view categorized screenshots.
- Use the search bar to filter screenshots by extracted text.
POST /api/auth/signup— create user and return tokenPOST /api/auth/login— authenticate and return tokenPOST /api/auth/logout— stateless logoutGET /api/auth/me— fetch current user info
POST /api/screenshots/upload— upload imageGET /api/screenshots/— list user screenshotsGET /api/screenshots/{id}— get screenshot metadataGET /api/screenshots/{id}/file— download or view imageGET /api/screenshots/search?q=— search by OCR textPATCH /api/screenshots/{id}/override— update category / filename
- Uploaded screenshots are saved under
UPLOAD_DIRand then moved into an organized structure by year/month/category. - Background processing uses Celery tasks to run OCR, rich metadata extraction, smart filename generation, and storage updates asynchronously.
- The classification pipeline prefers Gemini when available and falls back to local regex extraction when needed.
- The frontend stores JWTs in
localStorageand attaches them automatically to API requests using Axios interceptors.
- All screenshot routes require a valid JWT token.
- Each request is scoped to the authenticated user.
- Uploaded screenshot duplicates are detected with SHA-256 hashing.
- Sensitive metadata processing is kept separated from route payloads.
Potential enhancements include:
- add a richer analytics dashboard
- support image similarity search
- add role-based access and team sharing
- support S3 or object storage for uploads
- build mobile client for native screenshot ingestion
- extend sensitive-data redaction and vault behavior
This repo was built as an end-to-end screenshot intelligence MVP with FastAPI, React, Celery, and OCR/LLM-based metadata extraction.