No description
Find a file
Moritz a19026e430
All checks were successful
continuous-integration/drone/push Build is passing
docs: update roles and permissions architecture and implementation plan
2025-11-13 16:17:01 +01:00
.forgejo chore: added PR and issue templates 2025-08-11 14:05:48 +02:00
assets feat: set users locale 2025-08-21 13:29:50 +02:00
config feat: docker-compose prod setup 2025-10-30 20:01:19 +01:00
docs docs: update roles and permissions architecture and implementation plan 2025-11-13 16:17:01 +01:00
lib docs: add @doc to public functions in EmailSync, Validations, and Senders 2025-11-13 11:20:33 +01:00
priv chore: added trigram migration for fuzzy search 2025-10-30 16:48:45 +01:00
rel/overlays/bin Add Release scripts & Dockerfile 2025-05-22 02:12:20 +02:00
test test: aded more tests for fuzzy search 2025-11-12 11:55:48 +01:00
.credo.exs docs: enable Credo ModuleDoc check and fix remaining modules 2025-11-13 11:20:33 +01:00
.dockerignore Add Release scripts & Dockerfile 2025-05-22 02:12:20 +02:00
.drone.yml remove test branch for building 2025-10-30 20:12:56 +01:00
.editorconfig configure renovate 2025-05-14 16:39:57 +02:00
.env.example feat: docker-compose prod setup 2025-10-30 20:01:19 +01:00
.formatter.exs chore(AshAuthenticationPhoenix): added library and updated ressources testing password strategy 2025-07-02 17:03:37 +02:00
.gitignore Ignore elixir_ls folder 2025-07-31 14:14:46 +02:00
.igniter.exs chore(AshAuthenticationPhoenix): added library and updated ressources testing password strategy 2025-07-02 17:03:37 +02:00
.sobelow-conf Add basic CI setup (#30) 2025-04-28 14:24:30 +02:00
.tool-versions chore(deps): update dependency just to v1.43.0 2025-10-18 00:14:27 +00:00
CODE_GUIDELINES.md docs: enable Credo ModuleDoc check and fix remaining modules 2025-11-13 11:20:33 +01:00
docker-compose.prod.yml use registry image for prod 2025-10-30 20:17:24 +01:00
docker-compose.yml feat: docker-compose prod setup 2025-10-30 20:01:19 +01:00
Dockerfile feat: docker-compose prod setup 2025-10-30 20:01:19 +01:00
Justfile Fix error when deleting members 2025-10-09 16:42:44 +02:00
LICENSE feat: add license closes #150 2025-10-02 17:12:06 +02:00
mix.exs chore(deps): update mix dependencies 2025-10-09 00:15:05 +00:00
mix.lock chore(deps): update mix dependencies 2025-10-17 14:09:15 +00:00
README.md docs: add comprehensive project documentation and reduce redundancy 2025-11-13 11:15:57 +01:00
renovate.json chore: run renovate each day of the first week of the month 2025-10-17 19:40:03 +02:00
renovate_backend_config.js configure renovate 2025-05-14 16:39:57 +02:00

Mila

Mila — simple, usable, self-hostable membership management for small to mid-sized clubs.

Build Status License

🚧 Project Status

⚠️ Early development — not production-ready. Expect breaking changes.
Contributions and feedback are welcome!

Overview

Mila is a free and open-source membership management tool designed for real club needs.
It is self-hosting friendly, aims for accessibility and GDPR compliance, and focuses on usability instead of feature overload.

💡 Why Mila?

Most membership tools for clubs are either:

  • Too complex — overloaded with features small and mid-sized clubs dont need
  • Too expensive — hidden fees, closed ecosystems, vendor lock-in
  • Too rigid — no way to adapt fields, processes, or roles to your clubs reality

Mila is different:

  • Simple: Focused on what clubs really need — members, dues, communication.
  • Usable: Clean, accessible UI, GDPR-compliant, designed with everyday volunteers in mind.
  • Flexible: Customize what data you collect about members, role-based permissions, and self-service for members.
  • Truly open: 100% free and open source — no lock-in, transparent code, self-host friendly.

Our philosophy: software should help people spend less time on administration and more time on their community.

📸 Screenshots

Screenshot placeholder
This is how Mila might look in action.

🔑 Features

  • Manage member data with ease
  • 🚧 Overview of membership fees & payment status
  • Full-text search
  • 🚧 Sorting & filtering
  • 🚧 Roles & permissions (e.g. board, treasurer)
  • Custom fields (flexible per club needs)
  • SSO via OIDC (tested with Rauthy)
  • 🚧 Self-service & online application
  • 🚧 Accessibility, GDPR, usability improvements
  • 🚧 Email sending

🚀 Quick Start (Development)

Prerequisites

We recommend using asdf for managing tool versions.

  • Tested with: asdf 0.16.5
  • Required versions are documented in .tool-versions in this repo
Install system dependencies (Debian/Ubuntu)
# Debian 12
apt-get -y install build-essential autoconf m4 libncurses-dev libwxgtk3.2-dev libwxgtk-webview3.2-dev libgl1-mesa-dev libglu1-mesa-dev libpng-dev libssh-dev unixodbc-dev xsltproc fop libxml2-utils openjdk-17-jdk icu-devtools bison flex pkg-config

# Ubuntu 24
apt-get -y install build-essential autoconf m4 libwxgtk3.2-dev libwxgtk-webview3.2-dev libgl1-mesa-dev libglu1-mesa-dev libpng-dev libssh-dev unixodbc-dev xsltproc fop libxml2-utils libncurses-dev openjdk-11-jdk icu-devtools bison flex libreadline-dev
Install asdf
mkdir ~/.asdf
cd ~/.asdf
wget https://github.com/asdf-vm/asdf/releases/download/v0.16.5/asdf-v0.16.5-linux-amd64.tar.gz
tar -xvf asdf-v0.16.5-linux-amd64.tar.gz
ln -s ~/.asdf/asdf ~/.local/bin/asdf

Then follow the official “Shell Configuration” steps in the asdf docs.

Fish example (~/.config/fish/config.fish):

asdf completion fish > ~/.config/fish/completions/asdf.fish
set -gx PATH "$HOME/.asdf/shims" $PATH

Bash example (~/.bash_profile and ~/.bashrc):

export PATH="${ASDF_DATA_DIR:-$HOME/.asdf}/shims:$PATH"
. <(asdf completion bash)

Install project dependencies

git clone https://git.local-it.org/local-it/mitgliederverwaltung.git mila
cd mila
asdf install

# Inside the repo folder:
mix local.hex 
mix archive.install hex phx_new 

Note: running mix local.hex must be done inside the repo folder,
because .tool-versions defines the Erlang/Elixir versions.

Run the app

  1. Copy env file:

    cp .env.example .env
    # Set OIDC_CLIENT_SECRET inside .env
    
  2. Start everything (database, Mailcrab, Rauthy, app):

    just run
    
  3. Services will be available at:

🔐 Testing SSO locally

Mila uses OIDC for Single Sign-On. In development, a local Rauthy instance is provided.

  1. just run
  2. go to localhost:8080, go to the Admin area
  3. Login with "admin@localhost" and password from BOOTSTRAP_ADMIN_PASSWORD_PLAIN in docker-compose.yml
  4. add client from the admin panel
  5. copy client secret to .env file
  6. abort and run just run again

Now you can log in to Mila via OIDC!

⚙️ Configuration

  • Env vars: see .env.example
    • OIDC_CLIENT_SECRET — secret for your OIDC client
  • Database defaults (Docker Compose):
    • Host: localhost
    • Port: 5000
    • User/pass: postgres / postgres
    • DB: mila_dev

🏗️ Architecture

Tech Stack Overview:

  • Backend: Elixir + Phoenix + Ash Framework
  • Frontend: Phoenix LiveView + Tailwind CSS + DaisyUI
  • Database: PostgreSQL
  • Auth: AshAuthentication (OIDC + password)

Code Structure:

  • lib/accounts/ & lib/membership/ — Ash resources and domains
  • lib/mv_web/ — Phoenix controllers, LiveViews, components
  • assets/ — Tailwind, JavaScript, static files

📚 Full tech stack details: See CODE_GUIDELINES.md
📖 Implementation history: See docs/development-progress-log.md
🗄️ Database schema: See docs/database-schema-readme.md

🧑‍💻 Development

Common commands:

just run                      # Start full dev environment
just test                     # Run test suite
just lint                     # Code style checks
just audit                    # Security audits
just reset-database           # Reset local DB

📚 Full development guidelines: See CODE_GUIDELINES.md

📦 Production Deployment

Local Production Testing

For testing the production Docker build locally:

  1. Generate secrets:

    mix phx.gen.secret  # for SECRET_KEY_BASE
    mix phx.gen.secret  # for TOKEN_SIGNING_SECRET
    
  2. Create .env file:

    # Copy template and edit
    cp .env.example .env
    nano .env
    
    # Required variables:
    SECRET_KEY_BASE=<your-generated-secret>
    TOKEN_SIGNING_SECRET=<your-generated-secret>
    PHX_HOST=localhost
    
    # Optional (have defaults in docker-compose.prod.yml):
    # OIDC_CLIENT_ID=mv
    # OIDC_BASE_URL=http://localhost:8080/auth/v1
    # OIDC_REDIRECT_URI=http://localhost:4001/auth/user/rauthy/callback
    # OIDC_CLIENT_SECRET=<from-rauthy-client>
    
  3. Start development environment (for Rauthy):

    docker compose up -d
    
  4. Start production environment:

    docker compose -f docker-compose.prod.yml up
    
  5. Run database migrations:

    docker compose -f docker-compose.prod.yml exec app /app/bin/mv eval "Mv.Release.migrate"
    
  6. Access the production app:

Note: The local production setup uses network_mode: host to share localhost with the development Rauthy instance. For real production deployment, configure an external OIDC provider and remove network_mode: host.

Real Production Deployment

For actual production deployment:

  1. Use an external OIDC provider (not the local Rauthy)
  2. Update docker-compose.prod.yml:
    • Remove network_mode: host
    • Set OIDC_BASE_URL to your production OIDC provider
    • Configure proper Docker networks
  3. Set up SSL/TLS (e.g., via reverse proxy like Nginx/Traefik)
  4. Use secure secrets management (environment variables, Docker secrets, vault)
  5. Configure database backups

🤝 Contributing

We welcome contributions!

  • Open issues and PRs in this repo.
  • Please follow existing code style and conventions.
  • Expect breaking changes while the project is in early development.

📄 License

License: AGPLv3
See the LICENSE file for details.

📬 Contact