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:
- Main Project Changelog: docs/changelog/CHANGELOG.md
- Change Documentation Guidelines: docs/changelog/CONTRIBUTING_CHANGES.md
- Change Templates: docs/changelog/templates/ - Use these for documenting your contributions
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¶
- Navigate to the Parody News Generator repository.
- 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¶
- Clone the Repository
-
Create a Virtual Environment
-
For Unix/Linux/Mac:
-
For Windows:
-
Install Dependencies
- 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
- Database Migrations
Apply the database migrations to set up your database schema:
- Create Superuser (Optional)
To access the Django admin, create a superuser account:
- Run the Development Server
Start the Django development server:
Your project should now be running at http://localhost:8000.
Making Changes¶
- Create a new branch for your changes:
- 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.
- Document your changes using our changelog system:
- Choose the appropriate template from docs/changelog/templates/
- Create documentation in the appropriate directory under docs/changelog/
-
Follow the guidelines in CONTRIBUTING_CHANGES.md
-
Commit your changes with a descriptive commit message:
- Push your changes to your forked repository:
Submitting a Pull Request¶
- Navigate to the original repository and click the "New pull request" button.
- Select your branch from the "compare" dropdown.
- Provide a descriptive title and detailed description of your changes.
- Include references to your change documentation in the pull request description.
- Link to any relevant change documents you created in the
docs/changelog/directory. - 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:
- bamr87: bamr87@users.noreply.github.com