Skip to content

Contributing to Parody News Generator

Overview of the Project

The Parody News Generator is a Django application that generates content with AI assistants and publishes it as a static site. It is deliberately provider-agnostic: application code never imports a vendor SDK, so the same assistant can run on Claude today and GPT tomorrow by changing configuration. Claude Code is the default provider.

Tech Stack

The project utilizes the following technologies:

  • Django + Django REST Framework: The backend and the API the frontend consumes.
  • React, TypeScript, Vite: The user interface, in src/frontend/.
  • Claude Agent SDK (default), Anthropic SDK, OpenAI SDK: Reached only through parodynews.ai — see below.
  • PostgreSQL: The database. SQLite is not supported.
  • Docker: Open platform for developing, shipping, and running applications.
  • Bootstrap: Front-end open source toolkit for developing with HTML, CSS, and JS.
  • Git: Distributed version control system for tracking changes in source code during software development.
  • Github: Leading platform for hosting and collaborating on Git repositories.
  • VS Code: Lightweight but powerful source code editor that runs on your desktop.
  • Docker Compose: Tool for defining and running multi-container Docker applications.
  • Azure Container Apps: Service for deploying and scaling containerized applications in the cloud.
  • Azure Developer CLI: Command-line interface for managing Azure resources.

Architecture you should know before changing code

Three boundaries carry most of the design, and crossing one is usually a mistake:

AI vendors are confined to src/parodynews/ai/providers/. Everything else builds a GenerationRequest and calls whatever provider the registry resolved. If a change appears to need import anthropic in a service or a view, what it actually needs is a new capability on the provider contract. See the AI layer README.

The UI is React, not Django templates. src/frontend/ is the interface; Django renders only the SPA shell, the allauth account pages, and error pages. New screens are React routes plus API endpoints.

Business logic lives in src/parodynews/services/. Views parse input and render output. A view with a for loop over model instances is usually a service waiting to be extracted.

How to Contribute

We welcome contributions from the community! Here are the steps to get started:

Documentation & Change Management

This project maintains a comprehensive changelog documentation system to track all changes consistently. Before contributing, please familiarize yourself with our change documentation process:

Types of Changes We Track

  • Features: New functionality, enhancements, or capabilities (template)
  • Bug Fixes: Corrections to existing functionality (template)
  • Improvements: Optimizations, refactoring, or code quality enhancements (template)
  • Security: Security-related fixes or enhancements (template)
  • Breaking Changes: Changes that break backward compatibility (template)

Fork the Repository

  1. Navigate to the Parody News Generator repository.
  2. Click the "Fork" button in the upper right corner of the page to create a copy of the repository in your GitHub account.

Set Up a Local Development Environment

  1. Clone the Repository
git clone https://github.com/bamr87/barodybroject.git
cd parodynews
  1. Create a Virtual Environment

  2. For Unix/Linux/Mac:

    python3 -m venv .venv
    source .venv/bin/activate
    
  3. For Windows:

    python -m venv venv
    .\venv\Scripts\activate
    
  4. Install Dependencies

pip install -r requirements-dev.txt
  1. Set Up Environment Variables

Create a .env file in the project root directory and add your environment-specific variables. For example:

touch .env
echo "DEBUG=True" >> .env
echo "SECRET_KEY=your_secret_key" >> .env
echo "DATABASE_URL=sqlite:///db.sqlite3" >> .env
  1. Database Migrations

Apply the database migrations to set up your database schema:

python manage.py makemigrations
python manage.py migrate
  1. Create Superuser (Optional)

To access the Django admin, create a superuser account:

python manage.py createsuperuser
  1. Run the Development Server

Start the Django development server:

python manage.py runserver

Your project should now be running at http://localhost:8000.

Making Changes

  1. Create a new branch for your changes:
git checkout -b my-feature-branch
  1. Make your changes and test them thoroughly. Before pushing, run what CI runs:
# from src/
python -m pytest
ruff check src/ && black --check src/

# from src/frontend/
npm run test && npm run build

If you touched models, generate the migration and verify it reverses:

python manage.py makemigrations parodynews
python manage.py migrate parodynews <previous>   # reverse
python manage.py migrate parodynews              # forward again

A migration that only goes forward will be sent back in review. See the migrations README for the two ways this usually fails.

  1. Document your changes using our changelog system:
  2. Choose the appropriate template from docs/changelog/templates/
  3. Create documentation in the appropriate directory under docs/changelog/
  4. Follow the guidelines in CONTRIBUTING_CHANGES.md

  5. Commit your changes with a descriptive commit message:

git add .
git commit -m "Add new feature: [brief description]"
  1. Push your changes to your forked repository:
git push origin my-feature-branch

Submitting a Pull Request

  1. Navigate to the original repository and click the "New pull request" button.
  2. Select your branch from the "compare" dropdown.
  3. Provide a descriptive title and detailed description of your changes.
  4. Include references to your change documentation in the pull request description.
  5. Link to any relevant change documents you created in the docs/changelog/ directory.
  6. Click "Create pull request" to submit your changes for review.

Pull Request Review Process

All pull requests will be reviewed for: - Code quality and functionality - Adherence to project standards - Completeness of change documentation - Test coverage and validation

Please refer to our change contribution guidelines for detailed review criteria.

Types of Contributions

We welcome various types of contributions, including:

  • Bug Fixes: Identify and fix bugs in the codebase.
  • Feature Requests: Suggest and implement new features.
  • Documentation Improvements: Enhance the project's documentation.
  • Testing: Write and improve tests to ensure code quality.

Code of Conduct

We are committed to fostering a welcoming and respectful environment for all contributors. Please read and adhere to our Code of Conduct.

Contact Information

If you have any questions or need further assistance, please reach out to the maintainers: