GibzB / django-recall-server

A Django server for managing the verification of constituents, publishing of representative information, and signing to recall them.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

django-recall-server

A Django server for managing the verification of constituents, publishing of representative information, and signing to recall them.

About Repo

  • 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.

Stack

  • Django Rest framework
  • PostgreSQL
  • Docker
  • JWT

Join the Community

Table of Contents

Installation

Prerequisites

Before you begin, ensure you have the following installed on your machine:

  • Docker
  • Docker Compose
  • Python 3.8 or higher
  • PostgreSQL

Setup

  1. Clone the repository:

    git clone https://github.com/Friendsofthepeople/django-recall-server.git
    cd django-recall-server
  2. Create and activate a virtual environment:

    python3 -m venv venv
    source venv/bin/activate  # On Windows use `venv\Scripts\activate`
  3. Install dependencies:

    pip install -r requirements.txt
  4. 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
  5. Build and start the Docker containers:

    docker-compose up --build
  6. Apply database migrations:

    docker-compose exec web python manage.py migrate
  7. Create a superuser:

    docker-compose exec web python manage.py createsuperuser

Usage

Running the Server

Start the development server:

docker-compose up

Access the server at http://localhost:8000.

API Documentation

API documentation is available at http://localhost:8000/api/docs/.

Contributing

We welcome contributions from the community! Here’s how you can get involved:

Getting Started

  1. Fork the repository.

  2. Clone your fork:

    git clone https://github.com/yourusername/django-recall-server.git
    cd django-recall-server
  3. Create a branch for your feature or bug fix:

    git checkout -b feature/your-feature-name
  4. Make your changes and commit them:

    git commit -m "Description of your changes"
  5. Push your changes to your fork:

    git push origin feature/your-feature-name
  6. Create a pull request on the main repository.

Code of Conduct

We adhere to the Contributor Covenant Code of Conduct. Please read CODE_OF_CONDUCT.md for more information.

How to Contribute

  1. Report Bugs:

    Use GitHub issues to report bugs. Make sure to provide detailed information about the issue and steps to reproduce it.

  2. Suggest Features:

    Use GitHub issues to suggest new features. Describe your idea and how it can benefit the project.

  3. Write Code:

    • Follow the project’s coding standards.
    • Write tests for your code.
    • Ensure your code passes all tests before submitting a pull request.
  4. Review Pull Requests:

    • Help review and test pull requests submitted by others.

TODO

  • 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. ***

Join the Community

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Happy hacking with you!

About

A Django server for managing the verification of constituents, publishing of representative information, and signing to recall them.

License:MIT License


Languages

Language:Python 97.8%Language:Dockerfile 2.2%