{"id":28537007,"url":"https://github.com/mikkellorenz/pastebin","last_synced_at":"2026-05-09T03:37:34.102Z","repository":{"id":297947739,"uuid":"998384214","full_name":"MIKKELLORENZ/pastebin","owner":"MIKKELLORENZ","description":"A modern, self-hosted code \u0026 multimedia pastebin application (🖼️🎞️📄🎵). Share text snippets and files with syntax highlighting, bulk operations, file system monitoring, and a responsive design. Perfect for your homemade / DIY NAS server 👨‍💻.","archived":false,"fork":false,"pushed_at":"2025-06-08T14:07:35.000Z","size":455,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-08T06:52:22.180Z","etag":null,"topics":["diy","drag-and-drop","flask","multimedia","nas","pastbin-service","pastebin","self-hosted","tailwindcss"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MIKKELLORENZ.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-08T13:54:53.000Z","updated_at":"2025-06-08T14:07:39.000Z","dependencies_parsed_at":"2025-06-08T14:48:57.780Z","dependency_job_id":null,"html_url":"https://github.com/MIKKELLORENZ/pastebin","commit_stats":null,"previous_names":["mikkellorenz/pastebin"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MIKKELLORENZ/pastebin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MIKKELLORENZ%2Fpastebin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MIKKELLORENZ%2Fpastebin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MIKKELLORENZ%2Fpastebin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MIKKELLORENZ%2Fpastebin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MIKKELLORENZ","download_url":"https://codeload.github.com/MIKKELLORENZ/pastebin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MIKKELLORENZ%2Fpastebin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271599203,"owners_count":24787801,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-22T02:00:08.480Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["diy","drag-and-drop","flask","multimedia","nas","pastbin-service","pastebin","self-hosted","tailwindcss"],"created_at":"2025-06-09T18:08:19.534Z","updated_at":"2026-05-09T03:37:34.047Z","avatar_url":"https://github.com/MIKKELLORENZ.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pastebin\n\nA modern, **self-hosted** code \u0026 multimedia pastebin application (🖼️🎞️📄🎵). Share text snippets and files with syntax highlighting, bulk operations, file system monitoring, and a responsive design. Perfect for your homemade / DIY NAS server 👨‍💻.\n\n## Features\n\n- **Text \u0026 File Sharing** - Share code snippets, text, and upload multiple files\n- **Drag \u0026 Drop** - Easy file uploads with progress tracking\n- **Syntax Highlighting** - Automatic code highlighting with language detection\n- **Responsive Design** - Works seamlessly on desktop and mobile devices\n- **Search \u0026 Filter** - Find pastes by content, filename, or date range\n- **File Previews** - Preview images, videos, PDFs, and code files\n- **Cross-Platform** - Supports Windows, Linux, and macOS with platform-specific optimizations\n- **Database Maintenance** - Built-in tools for cleaning orphaned entries and checking file integrity\n\n## Screenshots\n\n### One-Step Setup\n![Setup Process](screenshots/pastebin_img_1.jpg)\n\nThe application features a simple one-step setup where you choose where to store uploaded files.\n\n### Application Overview\n![Main Interface](screenshots/pastebin_img_3.jpg)\n\nClean, modern interface with card-based layout, search functionality, and bulk operations.\n\n### Syntax Highlighting\n![Code Syntax Highlighting](screenshots/pastebin_img_2.jpg)\n\nAutomatic syntax highlighting for code files with language detection and modal previews.\n\n\n\n## Installation\n\n1. **Clone the repository**\n   ```bash\n   git clone https://github.com/MIKKELLORENZ/pastebin\n   cd pastebin\n   ```\n\n2. **Install dependencies**\n   ```bash\n   pip install -r requirements.txt\n   ```\n   \n   Or install manually:\n   ```bash\n   pip install Flask==2.3.3 Werkzeug==2.3.7 watchdog==3.0.0\n   ```\n\n3. **Run the application**\n   ```bash\n   python app.py\n   ```\n\n4. **Access the application**\n   Open your browser and navigate to `http://localhost:8000`\n\n## First-Time Setup\n\nOn first launch, you'll be guided through a simple setup process to choose your upload directory. The application will:\n\n- Present a cross-platform directory browser\n- Allow you to navigate the entire file system\n- Validate write permissions for selected directories\n- Handle Windows drives and Unix-style paths appropriately\n- Configure the database and initialize file system monitoring\n- Redirect you to the main interface\n\nThe setup process works on all platforms:\n- **Windows**: Browse available drives (C:, D:, etc.) and navigate folders\n- **Linux/macOS**: Start from root (/) and navigate the file system\n- **All platforms**: Type paths directly or use the visual browser\n\n## Usage\n\n### Creating Pastes\n- **Text**: Simply paste or type content into the text area\n- **Files**: Use the file input or drag and drop files onto the interface\n- **Mixed**: Upload files with accompanying text descriptions\n- **Progress Tracking**: Real-time upload progress with file size information\n\n### Managing Pastes\n- **View**: Click on any paste card to open a detailed modal\n- **Copy**: Use the copy button to copy text content to clipboard\n- **Download**: Download individual files or bulk download multiple items\n- **Delete**: Remove individual pastes or bulk delete selected items\n- **Search**: Use the search bar to find pastes by content or filename\n- **Filter**: Use the date range picker to filter by creation date\n\n### Bulk Operations\n- Select multiple pastes using the checkboxes\n- Perform bulk downloads (creates a ZIP file)\n- Bulk delete with confirmation modal requiring \"DELETE\" confirmation\n- Clear selection or expand to see selected items list\n\n### Settings \u0026 Maintenance\n- **Change Upload Directory**: Use the hamburger menu to access settings\n- **File System Monitoring**: Automatic detection and cleanup of deleted files\n- **Database Cleanup**: Manual cleanup of orphaned database entries\n- **File Migration**: Automatic migration when changing upload directories\n- **Cross-Platform Paths**: Proper handling of Windows and Unix path formats\n\n## File Support\n\nThe application supports various file types with appropriate previews:\n\n- **Images**: JPG, PNG, GIF, WebP, BMP, SVG with thumbnail previews\n- **Videos**: MP4, WebM, MOV, AVI, MKV with video player icons\n- **Audio**: MP3, WAV, OGG, AAC, FLAC with audio file icons\n- **Documents**: PDF, DOC, XLS, PPT files with document type icons\n- **Code**: Automatic syntax highlighting for programming languages\n- **Text**: Plain text, Markdown, logs, configuration files\n\n## Configuration\n\n### Storage Location\nAccess settings through the hamburger menu to:\n- Browse and select new upload directories with full filesystem access\n- Validate directory permissions before changing\n- Automatically migrate existing files to new locations\n- Handle cross-platform path differences\n\n### File System Monitoring\nThe application includes built-in monitoring that:\n- Watches the upload directory for external file deletions\n- Automatically removes database entries for deleted files\n- Provides manual cleanup tools for maintenance\n- Logs all file system events for debugging\n\n### Database Management\n- **SQLite Database**: Automatic schema creation and migration\n- **Orphaned Entry Cleanup**: Remove entries for missing files\n- **File Integrity Checks**: Verify all database entries have corresponding files\n- **Settings Storage**: Persistent storage of configuration in database\n\n## Technical Details\n\n- **Backend**: Flask 2.3.3 (Python)\n- **Database**: SQLite with automatic schema management\n- **Frontend**: Vanilla JavaScript with Tailwind CSS\n- **File Monitoring**: Watchdog library for cross-platform file system events\n- **File Handling**: Secure filename handling with timestamp prefixes\n- **Syntax Highlighting**: Highlight.js with automatic language detection\n- **Date Handling**: Flatpickr for responsive date range selection\n- **File Uploads**: Progress tracking with file size validation\n\n## System Requirements\n\n- **Python**: 3.7 or higher\n- **Operating System**: Windows, Linux, or macOS\n- **Disk Space**: Varies based on uploaded content\n- **Permissions**: Write access to chosen upload directory\n- **Browser**: Modern browser with JavaScript enabled\n\n## Security Features\n\n- **Secure Filenames**: Werkzeug secure_filename for safe file handling\n- **Path Validation**: Proper path sanitization and validation\n- **Permission Checks**: Directory write permission verification\n- **File System Isolation**: Contained file operations within configured directory\n\n## Browser Support\n\n- Modern browsers with JavaScript enabled\n- Mobile-responsive design with touch-friendly interfaces\n- Progressive enhancement for older browsers\n- Cross-platform file drag and drop support\n\n## License\n\nOpen source - feel free to modify and distribute according to your needs.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit issues and pull requests.\n\n## Troubleshooting\n\n### Common Issues\n\n1. **Permission Denied**: Ensure the selected upload directory has write permissions\n2. **File Not Found**: Use the cleanup tool in settings to remove orphaned database entries\n3. **Setup Loop**: Clear browser cache if redirected back to setup repeatedly\n4. **File Upload Fails**: Check available disk space and file permissions\n\n### Maintenance\n\n- Use the built-in cleanup tool in settings for database maintenance\n- Monitor application logs for file system events\n- Regularly check file integrity using the admin tools\n- Consider periodic backups of both files and the SQLite database\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikkellorenz%2Fpastebin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikkellorenz%2Fpastebin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikkellorenz%2Fpastebin/lists"}