photostock API is a backend service designed to power a subscription-based platform for digital content licensing. Whether you're serving images, videos, or creative assets, this API provides secure authentication, flexible subscription plans, asset management, and licensing features for creators and customers alike.
- API Version:
v1.0.0
- JWT-based user authentication
- Role-based access control (
admin,subscriber)
- Upload, organize, and manage content (images, videos, etc.)
- Watermark support and format handling
- Subscription plans (monthly, yearly, pay-per-download)
- Usage tracking and download limits
- Auto-generated license certificates with download logs
- Full-text search with keyword tagging
- Filters by category, format, resolution, orientation
- Public asset preview endpoint
- Contributor dashboard API: earnings, uploads, performance
- Admin dashboard API: user moderation, asset review, analytics
- Download counts, revenue reports, top contributors
- Daily/Monthly usage summaries
- Event logging for audit trails
- RESTful API design
- Swagger/OpenAPI documentation (coming soon)
- Dockerized for container-based deployments
- Go (1.22+) – High-performance, scalable backend
- Gin – Fast and flexible HTTP router
- PostgreSQL – Relational database for structured data
- JWT – Token-based authentication
- Go 1.22+
- PostgreSQL 16+
- Docker (optional but recommended for local dev)
# Clone the repository
git clone https://github.com/yourusername/photostock-api.git
cd photostock-api
# Set environment variables (or copy .env.example to .env)
cp .env.example .env
# Run the application
go run cmd/main.go