File sharing and commenting application built with Go.
Warning
This project is a complete vibe-coded hellhole of garbage. Read code at your own caution. Redirect frustration at Anthropic.
- Admin panel for creating shares and uploading files
- Public share links with commenting functionality
- Image viewing in fullscreen modal
- Clean, Nextcloud-inspired design
- Mobile responsive layout
- SQLite database with WAL mode
- Docker deployment ready
- Install dependencies:
go mod download
npm install- Create
.envfile:
cp .env.example .env
# Edit .env and set secure values for ADMIN_TOKEN and SESSION_SECRET- Build Tailwind CSS:
npx tailwindcss -i web/static/css/input.css -o web/static/css/output.css --watch- Run the application:
go run cmd/feedback/main.go- Access admin panel:
http://localhost:8080/admin/{ADMIN_TOKEN}
Build and run with Docker:
docker build -t feedback:latest .
docker run -p 8080:8080 \
-v $(pwd)/data:/data \
-e ADMIN_TOKEN=your-secure-token \
-e SESSION_SECRET=your-secure-secret \
feedback:latestOr use Docker Compose:
# Create .env file with ADMIN_TOKEN and SESSION_SECRET
docker-compose upEnvironment variables:
| Variable | Description | Default |
|---|---|---|
| PORT | Server port | 8080 |
| HOST | Server host | 0.0.0.0 |
| ADMIN_TOKEN | Admin authentication token (required) | - |
| SESSION_SECRET | Cookie signing secret (required) | - |
| DATA_DIR | Data storage directory | ./data |
| MAX_UPLOAD_SIZE | Max upload size in bytes | 52428800 (50MB) |
| DB_PATH | SQLite database path | ./data/feedback.db |
- Access admin panel at
/admin/{ADMIN_TOKEN} - Create a new share with name and description
- Upload files to the share
- Copy the public share link (
/share/{hash}) - Share the link with users
- Access public share via
/share/{hash} - Enter your name (stored in cookie)
- View files and images
- Click images to view in fullscreen modal
- Post comments on files
- See comments from other users in real-time
feedback/
├── cmd/feedback/ # Application entrypoint
├── internal/ # Internal packages
│ ├── config/ # Configuration loading
│ ├── database/ # Database models and migrations
│ ├── handlers/ # HTTP handlers
│ ├── middleware/ # HTTP middleware
│ └── services/ # Business logic
├── web/ # Frontend assets
│ ├── static/ # Static files (CSS, JS)
│ └── templates/ # HTML templates
├── data/ # Runtime data (gitignored)
├── Dockerfile # Container build
└── docker-compose.yml # Local development
CGO_ENABLED=1 go build -o feedback cmd/feedback/main.gonpx tailwindcss -i web/static/css/input.css -o web/static/css/output.css --minifygo test ./...Push a semver tag (no v-prefix) to trigger automated build:
git tag 1.0.0
git push origin 1.0.0The GitHub Actions workflow will:
- Build Docker image for amd64 and arm64
- Push to
ghcr.io/romanzipp/feedback:{version} - Tag as
latest
Pull and run:
docker pull ghcr.io/romanzipp/feedback:latest
docker run -p 8080:8080 \
-v /path/to/data:/data \
-e ADMIN_TOKEN=xxx \
-e SESSION_SECRET=xxx \
ghcr.io/romanzipp/feedback:latest- Template system disaster: Created nested template structure that completely broke, causing admin panel to show "Enter Your Name" form. Had to rebuild all templates as self-contained files.
- Sequential file IDs: Initially used
/files/3allowing anyone to enumerate all files. Fixed by adding random hashes. - URL-unsafe admin tokens: Generated tokens with
/characters causing 404s. Fixed by using URL-safe base64 encoding. - Missing database directory: SQLite failed to create DB file because parent directory wasn't created first.
- Destroyed image aspect ratios: Used
object-coverwith fixed height, squashing images. Fixed withobject-fit: contain. - Inconsistent comment styling: JavaScript-inserted comments had different font sizes than server-rendered ones.
- Go version mismatch: Dockerfile used Go 1.22 when go.mod required 1.24+.
- Unwanted multi-arch builds: Built for arm64 when only amd64 was requested.
MIT