# Memer A self-hosted meme gallery with quick-share for text message and Telegram. Runs as a single Docker container, designed for Unraid. ## Features - **Masonry gallery** — responsive, dark-themed grid - **Upload** — drag & drop or click, supports JPG/PNG/GIF/WebP (up to 100 MB) - **Tags** — organize with comma-separated tags, filter by tag in the gallery - **Search** — full-text search across titles and descriptions - **Quick share** — copy link, Telegram, SMS, or download from any card or detail view - **Non-destructive rescale** — creates a child image at a new size without touching the original - **Persistent** — SQLite database + image files on Docker volumes (easy to back up or export) ## Quick Start ```bash cp .env.example .env # Edit .env: set PUBLIC_URL to your domain docker compose up --build -d ``` Open `http://localhost:3000`. ## Unraid Setup 1. In Unraid, go to **Docker > Add Container** (or use Community Applications). 2. Use the image `memer:latest` (build locally or push to a registry). 3. Map port **3000** to your desired host port. 4. Add two path mappings: - `/data/images` → `/mnt/user/appdata/memer/images` - `/data/db` → `/mnt/user/appdata/memer/db` 5. Set environment variable `PUBLIC_URL` to `https://meme.alwisp.com`. 6. Set up your reverse proxy (Nginx Proxy Manager, Swag, etc.) to point `meme.alwisp.com` → port 3000. ## Environment Variables | Variable | Default | Description | |---|---|---| | `PUBLIC_URL` | `http://localhost:3000` | Used to build absolute share links | | `PORT` | `3000` | Port the server listens on | | `DATA_DIR` | `/data` | Root for images and DB inside the container | ## API | Method | Path | Description | |---|---|---| | `GET` | `/api/memes` | List memes (`?tag=`, `?q=`, `?page=`, `?limit=`, `?parent_only=`) | | `POST` | `/api/memes` | Upload meme (multipart: `file`, `title`, `description`, `tags`) | | `GET` | `/api/memes/:id` | Get meme + children | | `PUT` | `/api/memes/:id` | Update title/description/tags | | `DELETE` | `/api/memes/:id` | Delete meme and all rescaled copies | | `POST` | `/api/memes/:id/rescale` | Create rescaled child (`{ width?, height?, quality?, label? }`) | | `GET` | `/api/tags` | List tags with counts | | `DELETE` | `/api/tags/:id` | Delete tag | ## Local Development ```bash # Terminal 1 — backend cd backend && npm install && npm run dev # Terminal 2 — frontend (proxies /api and /images to :3000) cd frontend && npm install && npm run dev ``` Frontend dev server: `http://localhost:5173` Backend API: `http://localhost:3000` ## Backup All data lives in two directories: - `memer-images` volume — the actual image files - `memer-db` volume — `memer.db` (SQLite) Copy these two directories to back up everything.