A Django-based bug bounty platform where users can join as hunters or clients. Clients can publish bounties, and hunters can submit bugs. Each bounty offers a reward upon successful bug submission.
- User registration with email and password
- Role-based access control (Hunter or Client)
- JWT authentication
- OTP verification during registration
- Clients can create bounties
- Hunters can submit bugs
- Reward system for accepted bugs
- Python 3.x
- Django
- Django REST Framework
- PostgreSQL (or any preferred database)
- JWT for authentication
python-dotenvfor environment variables
- Python 3.x installed on your machine
- PostgreSQL database (or modify settings for your preferred database)
- Git (to clone the repository)
-
Clone the repository
git clone https://github.com/yourusername/bugbounty-platform.git cd bugbounty-platform -
Create a virtual environment
python -m venv venv
-
Activate the virtual environment
-
On Windows:
venv\Scripts\activate
-
On macOS/Linux:
source venv/bin/activate
-
-
Install the dependencies
pip install -r requirements.txt
-
Create a
.envfile in the project rootDEBUG=True SECRET_KEY=your-secret-key DATABASE_NAME=yourdatabase DATABASE_USER=yourusername DATABASE_PASSWORD=yourpassword DATABASE_HOST=localhost DATABASE_PORT=5432
Replace the values with your actual database credentials and a secure
SECRET_KEY. -
Update
settings.pyto load from.envEnsure that your
settings.pyis configured to read from the.envfile (this is already set up if you followed the instructions above).
-
Apply Migrations
python manage.py migrate
-
Create a Superuser (Optional, for admin access)
python manage.py createsuperuser
-
Run the Development Server
python manage.py runserver
-
Access the Application
- API endpoints are accessible at
http://localhost:8000/ - Admin panel is accessible at
http://localhost:8000/admin/(if you created a superuser)
- API endpoints are accessible at
API endpoints:
- User Registration:
POST /api/register/ - User Login:
POST /api/token/ - Token Refresh:
POST /api/token/refresh/ - OTP Verification:
POST /api/verify-otp/ - Bounties:
- List/Create:
GET/POST /api/bounties/ - Retrieve/Update/Delete:
GET/PUT/DELETE /api/bounties/<id>/
- List/Create:
- Bugs:
- List/Create:
GET/POST /api/bugs/ - Retrieve/Update/Delete:
GET/PUT/DELETE /api/bugs/<id>/
- List/Create:
For detailed API usage and request/response formats, refer to the API Documentation (you can create this file with detailed docs).
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a new branch (
git checkout -b feature/YourFeature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin feature/YourFeature) - Create a new Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.