Thank you for your interest in contributing to APTRS! This document provides guidelines and instructions for contributing to this project.
- Code of Conduct
- Getting Started
- How to Contribute
- Development Workflow
- Testing
- Documentation
- Community
This project follows our Code of Conduct. By participating, you are expected to uphold this code.
Note: It is recommended to use Linux or macOS for development. Windows can work for code development, but Redis will not work properly on Windows.
- PostgreSQL: Install and configure a PostgreSQL database
- Redis: Required for task queuing and caching
- Poetry: Required for dependency management (do not use pip)
- Node.js & npm: Required for frontend development
-
Clone the repository
git clone https://github.com/yourusername/APTRS.git cd APTRS -
Install backend dependencies with Poetry
poetry install
-
Configure environment variables
cp APTRS/env.example .env # Edit .env with your configuration including PostgreSQL and Redis details # Refer to the installation documentation page for detailed environment configuration
-
First-time setup (initializes accounts, permissions, migrations, etc.)
poetry run python APTRS/manage.py first_setup
-
Start the development server
poetry run python APTRS/manage.py runserver
-
Navigate to the frontend directory
cd frontend -
Install frontend dependencies
npm install
-
Configure frontend environment
cp env.example .env # Edit .env to include backend API domain/IP address -
Start the frontend development server
npm start
-
Backend and frontend should ideally run on the same domain and port (using a reverse proxy in production)
-
In development, they can run on different ports/domains, but make sure to configure the frontend
.envwith the correct backend API address -
Certain features may not work properly when running on separate domains/ports:
- Loading images in CKEditor after upload
- Rendering vulnerability or project data with embedded images
- Loading report CSS files
- And others (refer to documentation for details)
-
Before submitting a PR: Test your changes with both frontend and backend running on the same port/IP to ensure you don't break any domain-dependent features
APTRS/- Main Django projectaccounts/- User authentication and managementproject/- Project management functionalityvulnerability/- Vulnerability trackingutils/- Shared utility functionstemplates/- HTML templatesfrontend/- Frontend code
When reporting bugs, please include:
- A clear, descriptive title
- Steps to reproduce the bug
- Expected behavior vs. actual behavior
- Screenshots if applicable
- Environment details (OS, browser, etc.)
To report a bug, open an issue using the bug report template.
Enhancement suggestions are welcome! Please provide:
- A clear description of the enhancement
- Rationale (why this would be useful)
- Possible implementation approaches if you have suggestions
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes following our commit guidelines
- Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
main- Production-ready codedevelop- Development branch, base for feature branchesfeature/*- New features or improvementsfix/*- Bug fixeshotfix/*- Critical fixes for production
- Use concise, descriptive commit messages
- Start with a verb in imperative mood (e.g., "Add", "Fix", "Update")
- Reference issue numbers when applicable
Example:
Add image upload functionality for project POCs
- Implement MultiPartParser for handling image uploads
- Generate unique filenames with UUID
- Store images in designated 'poc' directory
- Return URL for retrieving the image
Fixes #123
- Follow PEP 8 guidelines for Python code
- Use 4 spaces for indentation (not tabs)
- Use meaningful variable and function names
- Keep lines under 100 characters where possible
- Include docstrings for classes and functions
- Write tests for new functionality
- Ensure all tests pass before submitting a pull request
- Run tests using:
poetry run python APTRS/manage.py test
- Update documentation when changing functionality
- Document new features, APIs, and configuration options
- Use clear, concise language accessible to all users
- Join our community discussions
- Help answer questions from other contributors
- Share your experiences using the project
Thank you for contributing to APTRS!