A Django server for managing the verification of constituents, publishing of representative information, and signing to recall them.
- This repo hosts the open-source server powering Public Gavel.
- It exposes APIs to facilitate verification and registration of constituents in a credible and secure way.
- Django Rest framework
- PostgreSQL
- Docker
- JWT
Before you begin, ensure you have the following installed on your machine:
- Docker
- Docker Compose
- Python 3.8 or higher
- PostgreSQL
-
Clone the repository:
git clone https://github.com/Friendsofthepeople/django-recall-server.git cd django-recall-server
-
Create and activate a virtual environment:
python3 -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install dependencies:
pip install -r requirements.txt
-
Configure environment variables:
Create a
.env
file in the project root and add the following variables:SECRET_KEY=your_secret_key DEBUG=True ALLOWED_HOSTS=localhost,127.0.0.1 DATABASE_NAME=your_db_name DATABASE_USER=your_db_user DATABASE_PASSWORD=your_db_password DATABASE_HOST=db DATABASE_PORT=5432
-
Build and start the Docker containers:
docker-compose up --build
-
Apply database migrations:
docker-compose exec web python manage.py migrate
-
Create a superuser:
docker-compose exec web python manage.py createsuperuser
Start the development server:
docker-compose up
Access the server at http://localhost:8000
.
API documentation is available at http://localhost:8000/api/docs/
.
We welcome contributions from the community! Here’s how you can get involved:
-
Fork the repository.
-
Clone your fork:
git clone https://github.com/yourusername/django-recall-server.git cd django-recall-server
-
Create a branch for your feature or bug fix:
git checkout -b feature/your-feature-name
-
Make your changes and commit them:
git commit -m "Description of your changes"
-
Push your changes to your fork:
git push origin feature/your-feature-name
-
Create a pull request on the main repository.
We adhere to the Contributor Covenant Code of Conduct. Please read CODE_OF_CONDUCT.md for more information.
-
Report Bugs:
Use GitHub issues to report bugs. Make sure to provide detailed information about the issue and steps to reproduce it.
-
Suggest Features:
Use GitHub issues to suggest new features. Describe your idea and how it can benefit the project.
-
Write Code:
- Follow the project’s coding standards.
- Write tests for your code.
- Ensure your code passes all tests before submitting a pull request.
-
Review Pull Requests:
- Help review and test pull requests submitted by others.
- Register a voter to People's Gavel and assign them a tokenized ID.
- Ability to create admins.
- Ability to publish a representative's profile, docket, responsibilities, and duties.
- Ability to raise a call to recall them.
*** Note TODO section outlines the specific tasks contributors can work on to enhance the functionality of the project. ***
This project is licensed under the MIT License. See the LICENSE file for more details.
Happy hacking with you!