No description
Find a file
2025-05-22 07:37:19 +00:00
.vscode feat: Also count API views 2025-04-10 09:27:32 +02:00
ducksnow chore: Update postal address in legal notice 2025-05-22 07:34:47 +00:00
.gitignore chore: Add /static to .gitignore 2025-03-28 08:53:00 +01:00
config.dist.yaml fix: Get S3 working 2025-03-28 11:31:16 +01:00
LICENSE chore: Update LICENSE 2025-05-22 07:37:19 +00:00
pyproject.toml chore: Version bump 2025-04-10 09:27:53 +02:00
README.md fix: Typo 2025-03-28 13:24:34 +01:00
requirements-dev.txt feat: Duck image community! 2025-03-28 08:23:57 +01:00

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

  1. Clone the repository:

    git clone https://git.private.coffee/ducks.now.git
    cd ducks-now
    
  2. Create and activate a virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    
  3. Install dependencies:

    pip install -r requirements.txt
    
  4. 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"
    
  5. Run migrations:

    python manage.py migrate
    
  6. Create a superuser:

    python manage.py createsuperuser
    
  7. Start the development server:

    python manage.py runserver
    
  8. Visit http://localhost:8000 in your browser

Deploying to Production

For production deployments, make sure to:

  1. Set debug: false in your config.yaml
  2. Configure a proper domain in the host setting
  3. Set up S3 storage by setting use_s3: true and configuring the S3 settings
  4. Collect static files:
    python manage.py collectstatic
    
  5. Configure proper email settings
  6. Use a production-ready web server like Gunicorn
  7. 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:

  1. Submit Duck Images: The easiest way to contribute is to upload your own duck photos
  2. Report Bugs: Found an issue? Open an issue
  3. Suggest Features: Have ideas for improvements? We'd love to hear them
  4. 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.