.vscode | ||
ducksnow | ||
.gitignore | ||
config.dist.yaml | ||
LICENSE | ||
pyproject.toml | ||
README.md | ||
requirements-dev.txt |
Ducks.now
Ducks.now is a modern, community-driven platform for sharing and discovering beautiful duck images. Our mission is to create the internet's premier destination for high-quality duck photography, providing a space where duck enthusiasts can share their captures and find inspiration.
Features
- Duck Image Repository: Browse a curated collection of high-quality duck images
- User Submissions: Upload and share your own duck photos with the community
- Attribution System: Proper credit for photographers and content creators
- Random Duck: Discover new duck images with our random duck feature
- Developer API: Integrate duck images into your applications with our simple API
- Responsive Design: Enjoy the perfect experience on any device
Technology Stack
- Backend: Django
- Storage: S3 for scalable image storage (we use Hetzner for our production deployment)
- Email: MJML for beautiful, responsive emails (using the mjnml.private.coffee API)
- Authentication: Django-allauth for secure user management
- Styling: Custom CSS with modern design principles
Getting Started
Prerequisites
- Python 3.10 or higher (your milage may vary with other versions)
- pip and virtualenv
- S3 bucket (for production)
Installation
-
Clone the repository:
git clone https://git.private.coffee/ducks.now.git cd ducks-now
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Create a
config.yaml
file in the project root:# Basic settings secret_key: "generate-a-secure-random-key" # or leave unset to generate a new key on startup debug: true # Set to false in production host: "localhost" # Your domain in production # Email settings email: host: "smtp.example.com" port: 587 tls: true ssl: false username: "your-email@example.com" password: "your-email-password" from: "Ducks.now <noreply@ducks.now>" subject_prefix: "[Ducks.now] " # S3 Storage settings (optional, uses local storage by default) s3: access_key: "your-aws-access-key" secret_key: "your-aws-secret-key" bucket_name: "your-bucket-name" region: "us-east-1"
-
Run migrations:
python manage.py migrate
-
Create a superuser:
python manage.py createsuperuser
-
Start the development server:
python manage.py runserver
-
Visit http://localhost:8000 in your browser
Deploying to Production
For production deployments, make sure to:
- Set
debug: false
in your config.yaml - Configure a proper domain in the
host
setting - Set up S3 storage by setting
use_s3: true
and configuring the S3 settings - Collect static files:
python manage.py collectstatic
- Configure proper email settings
- Use a production-ready web server like Gunicorn
- Set up a reverse proxy like Caddy or Nginx
API Documentation
Ducks.now provides a simple API for integrating duck images into your applications.
Random Duck Endpoint
GET /api/v0/random/
Returns a random duck image from our repository.
Response Format:
{
"url": "https://ducks.now/media/duck_images/2023/04/duck1.jpg",
"title": "Duck in a pond",
"attribution": "Jane Doe",
"source": "https://original-source.com"
}
Contributing
We welcome contributions to Ducks.now! Here's how you can help:
- Submit Duck Images: The easiest way to contribute is to upload your own duck photos
- Report Bugs: Found an issue? Open an issue
- Suggest Features: Have ideas for improvements? We'd love to hear them
- Submit Code: Pull requests are welcome for bug fixes and features
Moderation
All submitted images go through a moderation process to ensure quality and appropriateness. Our moderation team reviews:
- Image quality and composition
- Proper attribution
- Compliance with our community guidelines
License
This project is licensed under the MIT License - see the LICENSE file for details.