# Changemaker Lite

Changemaker Lite is a streamlined documentation and development platform featuring essential self-hosted services for creating, managing, and automating political campaign workflows.

## Features

- **Homepage**: Modern dashboard for accessing all services
- **Code Server**: VS Code in your browser for remote development
- **MkDocs Material**: Beautiful documentation with live preview
- **Static Site Server**: High-performance hosting for built sites
- **Listmonk**: Self-hosted newsletter and email campaign management
- **PostgreSQL**: Reliable database backend
- **n8n**: Workflow automation and service integration
- **NocoDB**: No-code database platform and smart spreadsheet interface
- **Map**: Interactive map visualization for geographic data with real-time geolocation, walk sheet generation, and QR code integration
- **Influence**: Campaign tool for connecting Alberta residents with elected representatives at all government levels

## Quick Start

The whole system can be set up in minutes using Docker Compose. It is recommended to run this on a server with at least 8GB of RAM and 4 CPU cores for optimal performance. Instructions to build to production are available in the mkdocs/docs/build directory, at cmlite.org, or in the site preview.

```bash
# Clone the repository
git clone https://gitea.bnkops.com/admin/changemaker.lite
cd changemaker.lite

# Configure environment (creates .env file)
./config.sh

# Start all services
docker compose up -d
```

## Map 

Instructions on how to build the map are available in the map directory. 

Instructions on how to build for production are available in the mkdocs/docs/build directory or in the site preview. 

### Quick Start for Map

Update the .env file in the map directory with your NocoDB URLs, and then run:

```bash
cd map
docker compose up -d
```

## Influence

The Influence Campaign Tool helps Alberta residents connect with elected representatives at federal, provincial, and municipal levels. Users can look up representatives by postal code and send advocacy emails through customizable campaigns.

Detailed setup and configuration instructions are available in the `influence/README.MD` file.

### Quick Start for Influence

Configure your environment and start the service:

```bash
cd influence
cp example.env .env
# Edit .env with your NocoDB and SMTP settings
./scripts/build-nocodb.sh  # Set up database tables
docker compose up -d
```

## Service Access

After starting, access services at:

- **Homepage Dashboard**: http://localhost:3010
- **Documentation (Dev)**: http://localhost:4000
- **Documentation (Built)**: http://localhost:4001  
- **Code Server**: http://localhost:8888
- **Listmonk**: http://localhost:9000
- **n8n**: http://localhost:5678
- **NocoDB**: http://localhost:8090
- **Map Viewer**: http://localhost:3000
- **Influence Campaign Tool**: http://localhost:3333

## Production Deployment

If you are deploying to production, using Cloudflare, you can use the included 'start-production.sh' script to set up a secure deployment with HTTPS. Ensure your domain and cloudflare settings are correctly configured in the root .env before running. More information on the required API tokens and settings can be found in the mkdocs/docs/build directory or at cmlite.org.

```bash
./start-production.sh
```

## Documentation

Complete documentation is available in the MkDocs site, including:

- Service configuration guides
- Integration examples
- Workflow automation tutorials
- Map application setup and usage
- Troubleshooting guides

Visit http://localhost:4000 after starting services to access the full documentation.