A modern web application for managing clipboard history and file version control with AI-powered diff analysis, plus local desktop applications for enhanced functionality.
- Clipboard History: Track and manage your clipboard entries with smart content detection
- Version Control: Save and track file versions with comments and visual diffs
- AI-Powered Analysis: Use OpenAI to analyze differences between file versions
- Project Organization: Group projects and manage them efficiently
- Modern UI: Clean, responsive interface built with vanilla JavaScript
- Desktop Integration: Local desktop applications for clipboard monitoring and keyboard shortcuts
-
Clone the repository
git clone <your-repo-url> cd clipboard-version-app
-
Set up the backend
cd backend pip install -r requirements.txt cp env.template .env # Edit .env and add your OpenAI API key python app.py
-
Open the frontend
- Open
frontend/index.htmlin your browser - Or serve it with a local server:
python -m http.server 8000
- Open
-
Optional: Run desktop applications
cd desktop pip install -r requirements.txt python clipboard_monitor.py # Monitor clipboard python key_mapper.py # Keyboard shortcuts
For deployment instructions, see DEPLOYMENT.md.
Quick deployment steps:
- Push your code to a Git repository
- Go to Render Dashboard
- Create a new Blueprint and connect your repository
- Set your
OPENAI_API_KEYin the environment variables - Wait for deployment (5-10 minutes)
clipboard-version-app/
├── backend/ # Flask API server
│ ├── app.py # Main Flask application
│ ├── database.py # Database operations
│ ├── requirements.txt # Python dependencies
│ ├── .env # Environment variables (create from env.template)
│ └── uploads/ # File uploads directory
│ └── projects/ # Project files
├── frontend/ # Static web application
│ ├── index.html # Main dashboard
│ ├── app.js # Shared utilities
│ ├── style.css # Main styles
│ ├── assets/ # Static assets (images, icons)
│ ├── clipboard/ # Clipboard management interface
│ │ ├── clipboard.html # Clipboard history page
│ │ └── clipboard.js # Clipboard functionality
│ └── version/ # Version control interface
│ ├── version.html # Version control page
│ ├── version.js # Version management
│ └── diff.js # Diff visualization
├── desktop/ # Local desktop applications (NOT deployed)
│ ├── clipboard_monitor.py # System clipboard monitor
│ ├── key_mapper.py # Keyboard shortcut manager
│ ├── requirements.txt # Desktop app dependencies
│ ├── config.json # Desktop app configuration
│ └── clipboard_slots.json # Local clipboard slots
├── docs/ # Documentation
├── render.yaml # Render deployment config
└── README.md # This file
- Backend API: Flask server providing REST API endpoints
- Frontend: Static web application with clipboard and version control interfaces
- Database: SQLite database for storing clipboard entries and file versions
- Clipboard Monitor: Monitors system clipboard and sends data to the web API
- Key Mapper: Provides keyboard shortcuts (F6-F9) for clipboard slot management
- Configuration: Local settings and clipboard slot storage
GET /api/health- Check backend status
GET /api/projects- Get all projectsPOST /api/upload- Upload new versionGET /api/versions/<project>- Get project versionsDELETE /api/project/<name>- Delete project
GET /api/clipboard- Get clipboard historyPOST /api/clipboard- Save clipboard entryDELETE /api/clipboard/<id>- Delete clipboard entry
POST /api/analyze-diff- Analyze differences with AI
Create a .env file in the backend directory:
OPENAI_API_KEY=your_openai_api_key_here
FLASK_ENV=developmentThe desktop applications use local configuration files:
desktop/config.json- Monitor settingsdesktop/clipboard_slots.json- Clipboard slot storage
cd backend
pip install -r requirements.txt
python app.pyThe API will be available at http://localhost:5000
The frontend is a static application. You can:
- Open
frontend/index.htmldirectly in a browser - Use a local server:
python -m http.server 8000 - Use any static file server
cd desktop
pip install -r requirements.txt
# Run clipboard monitor
python clipboard_monitor.py
# Run key mapper (in separate terminal)
python key_mapper.py- CORS Errors: Ensure the frontend and backend URLs are properly configured
- OpenAI API Errors: Check your API key and credits
- Database Issues: Ensure the database file is writable
- File Upload Issues: Check the uploads directory permissions
- Desktop App Issues: Ensure required Python packages are installed
- Backend logs are printed to the console
- Check browser console for frontend errors
- Use the
/api/healthendpoint to check backend status
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is open source. Feel free to use and modify as needed.
If you encounter issues:
- Check the troubleshooting section
- Review the deployment guide
- Check the application logs
- Create an issue in the repository