Skip to content

A webplatform for displaying mandates and files for political partys. Written for the german pirate party.

License

Notifications You must be signed in to change notification settings

Piratenpartei/Piratenmandate

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ΄β€β˜ οΈ Kommunalpiraten - Mandate Management Platform

🚨 This project is actively maintained

Freiheit, WΓΌrde, Kommunalpolitik

A web platform for displaying and managing mandates and files for political parties. Built specifically for the German Pirate Party's municipal representatives to track and organize their political work in a decentralized, transparent manner.

🎯 Goals & Objectives

  • Decentralized Mandate Tracking: Enable municipal representatives to independently document and share their political work, decisions, and files in a standardized format across different cities and regions.

  • Transparent Political Work: Provide citizens with easy access to their representatives' activities, voting records, and published materials, fostering accountability and democratic participation.

  • Collaborative Content Management: Allow multiple contributors to add and maintain content while preventing abuse through a sophisticated permission system and moderation workflow.

  • Regional Data Integration: Comes pre-loaded with German states and cities data, enabling immediate deployment and consistent geographic reference across all installations.

This project is built on CodeIgniter framework and follows modern web development practices with Docker containerization for easy deployment.


πŸš€ Getting Started

This section guides you through setting up the Kommunalpiraten platform for development or production use.

🐳 Docker Installation (Recommended)

The easiest way to get started is using Docker and Docker Compose, which provides a complete development environment with all dependencies.

πŸ”§ Prerequisites

▢️ Quick Start

  1. Clone the repository:

    git clone <repository-url> kommunalpiraten
    cd kommunalpiraten
  2. Start the environment:

    docker-compose up -d
  3. Access the application:

  4. Initial Login:

    • Username: admin
    • Password: password
    • ⚠️ Change the default password immediately after first login!

πŸ—„οΈ Database Setup

The MySQL database is automatically initialized with:

  • Pre-loaded German states and cities data
  • Default admin user account
  • Required table structure

Database credentials:

  • Host: db (within Docker containers)
  • Database: kommunalpiraten
  • Username: root
  • Password: password

πŸ“¦ Manual Installation

For manual installation without Docker:

πŸ”§ Requirements

  • PHP 7.2 or higher
  • MySQL 5.7+ or MariaDB 10.2+
  • Apache or Nginx web server
  • Composer (optional, for dependencies)

▢️ Installation Steps

  1. Setup Web Server: Point your web server's document root to the project directory

  2. Database Configuration:

    CREATE DATABASE kommunalpiraten;
    -- Import the SQL dump
    mysql kommunalpiraten < DATABASE_DUMP/kommunalpiraten.sql
    -- Fix MySQL GROUP BY mode
    SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
  3. Configure Database Connection: Edit application/config/database.php with your database credentials

  4. Set Permissions:

    chmod 755 application/cache application/logs uploads

πŸ¦Έβ€β™‚οΈ Usage

🐳 Docker Commands

# Start all services
docker-compose up -d

# Stop all services
docker-compose down

# View logs
docker-compose logs

# Access web container shell
docker-compose exec web bash

# Access MySQL shell
docker-compose exec db mysql -u root -p kommunalpiraten

# Rebuild containers
docker-compose down
docker-compose build --no-cache
docker-compose up -d

πŸ“Š Available Services

  • web: CodeIgniter application (PHP 7.2 + Apache)
  • db: MySQL 8.0 database with automatic data import
  • phpmyadmin: Web interface for database management

πŸ”§ Development

  • Source Code: Mounted as volume, changes are immediately reflected
  • Logs: Available in application/logs/
  • Cache: Stored in application/cache/
  • Uploads: File uploads saved in uploads/
  • Data Persistence: MySQL data persists between container restarts

🌐 Network Ports

  • 9005: Web application
  • 9001: MySQL database (for external connections)
  • 9002: phpMyAdmin interface

πŸ› οΈ Troubleshooting

🐳 Docker Issues

Containers won't start:

docker-compose down
docker system prune -f
docker-compose up -d

Database connection errors:

# Check if database container is running
docker-compose ps

# Wait for database initialization (first start only)
docker-compose logs db

Reset database:

# This will delete all data and reimport from dump
docker-compose down -v
docker-compose up -d

πŸ”’ Security Notes

  • Change default admin password immediately
  • Remove or secure the DATABASE_DUMP folder in production
  • Configure proper file permissions for upload directories
  • Review and adjust database connection settings for production use

πŸ“– About

The Kommunalpiraten platform enables decentralized management of political mandates and documentation. Built for transparency and collaboration, it allows:

  • Municipal Representatives to document their work, decisions, and published materials
  • Citizens to access and track their representatives' activities
  • Party Organizations to maintain consistent documentation across regions
  • Contributors to collaboratively maintain and improve content through a permission-based system

πŸ—οΈ Architecture

  • Frontend: CodeIgniter PHP framework with responsive Bootstrap UI
  • Backend: MySQL database with comprehensive German geographic data
  • Deployment: Docker containerization for consistent environments
  • Security: Role-based permission system with abuse prevention

🀝 Contributing

This project welcomes contributions from developers, political representatives, and citizens interested in improving democratic transparency tools.

πŸ“„ License

This project is developed for the German Pirate Party's infrastructure and follows open-source principles for transparency and collaboration.

About

A webplatform for displaying mandates and files for political partys. Written for the german pirate party.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 74.1%
  • CSS 8.8%
  • SCSS 5.8%
  • Less 5.3%
  • JavaScript 3.1%
  • HTML 1.9%
  • Other 1.0%