SnapPic is a Flask-based web application that allows users to temporarily share photos. Each uploaded image is displayed for 5 seconds, then fades out over 10 seconds before being automatically deleted.
- 📸 Upload images from camera or gallery
- ✏️ Add short comments (max 100 chars)
- ⏱️ Images automatically expire after 15 seconds (5s visible + 10s fade)
- 📱 Responsive design works on mobile and desktop
- ⚡ Progressive Web App (PWA) support
- 🔄 Auto-refreshing gallery updates every 2 seconds
- 🔒 Secure file upload handling
- Backend: Python Flask
- Frontend: Vanilla HTML/CSS/JavaScript
- Storage: Local filesystem for images, JSON for metadata
- PWA: Service Worker + Web Manifest
- Clone the repository:
git clone https://github.com/yourusername/snappic.git
cd snappic- Install dependencies:
pip install -r requirements.txt- Initialize data files:
echo '[]' > data.json
mkdir -p uploads- Run the application:
python app.py- Open in browser:
http://localhost:5000
snappic/
├── app.py # Flask application
├── data.json # Image metadata
├── uploads/ # Uploaded images
├── requirements.txt # Python dependencies
├── README.md # This file
├── templates/
│ ├── index.html # Upload page
│ └── gallery.html # Gallery page
└── static/
├── style.css # Stylesheet
├── script.js # Client-side logic
├── sw.js # Service Worker
├── manifest.json # PWA manifest
└── icon-192.png # App icon
This project was created with the assistance of:
- Aider - AI pair programming tool
- DeepSeek Chat - Large language model
The upload interface with camera/file selection and comment field
The gallery showing uploaded images with comments and fade effects
MIT License