/sejm-stats

About site for polish parliament with extended functionality

Primary LanguageTypeScriptOtherNOASSERTION

Codacy Badge

Sejm Stats logo

Sejm Stats

Making Polish parliamentary data more accessible
and understandable for citizens.

๐Ÿ“š Dokumentacja (PL) ยท ๐Ÿ“– Project Docs ยท ๐Ÿ’ฌ Discord ยท โค๏ธ Patronite ยท ๐ŸŽฅ YouTube

Sejm Stats Preview

Sejm-stats provides a clear and concise view of complex parliamentary data, making it easier for citizens to stay informed about the actions and decisions of their representatives.

๐Ÿš€ Quick Start

To get started with development:

  1. Clone the repository:

    git clone https://github.com/miskibin/sejm-stats
    cd sejm-stats
    
  2. Choose your development environment:

๐Ÿ› ๏ธ Development Setup

Sejm-stats is split into two environments: backend and frontend.

Backend Development

  1. Create a .env file in the root directory with the following content:

    POSTGRES_DB=example
    POSTGRES_USER=postgres
    POSTGRES_PASSWORD=postgres
    POSTGRES_PORT=5432
    DATABASE_HOST=db
    DEBUG=true
    SECRET_KEY=does_not_matter
    EMAIL_HOST_PASSWORD=only_used_when_debug_is_false
    BUILD_TARGET=prod
    C_FORCE_ROOT=true
    
  2. Use Visual Studio Code and open the project in a devcontainer.

  3. Run the server:

    python manage.py runserver 0.0.0.0:8000
    
  4. To update data, run the Celery worker:

    celery -A core worker -l info
    

Note

๐Ÿค– The UI for the Django part is obsolete and will be removed soon.

Frontend Development

Tip

๐Ÿค– If you don't want to run the backend locally, you can use the production API. Set NEXT_PUBLIC_API_URL=https://sejm-stats.pl/apiInt in /frontend/.env file.

  1. Install npm

  2. Navigate to the frontend directory:

    cd ./frontend
    
  3. Install dependencies:

    npm i
    
  4. Run the development server:

    npm run dev
    

๐Ÿค Contributing

When creating a pull request, we enforce a specific title format using blumilksoftware/action-pr-title GitHub action. The rules are:

  • #123 - Some PR title - for PRs that deal with a specific issue, where 123 is the issue number
  • - Some PR title - for PRs that don't have a related issue

For any inquiries or contributions, please refer to our GitHub repository or join our Discord server. Your support through Patronite or feedback on YouTube is also highly appreciated.

Tip

๐Ÿค– If you have any questions, feel free to ask on Discord!

Sejm-stats is open for contributions!