events extension for bonfire, used for learning purposes


Bonfire.Gatherings #

A template for creating custom extensions for Bonfire

How to use it #

  • Clone the repository on your /extensions folder
cd extensions
git clone {your-extension-name-here}
cd {your-extension-name-here} 
  • Rename all the modules names to match your extension name:
    • Find & replace Bonfire.Gatherings -> Bonfire.YourExtensionName
    • Find & replace bonfire_gatherings -> bonfire_your_extension_name
  • Rename the bonfire_gatherings.exs config file to match your extension name bonfire_your_extension_name.exs
  • Add paths to the router if you need it. If you add paths you will need to include the route module on bonfire-app router module
  • Add extension specific Fake functions
  • Add extension specific migrations
  • Add extension deps to deps.git and/or deps.hex
  • Delete the bonfire extension template git history and initiate a new .git
    rm -rf .git
    git init    
  • Create your empty extension repository on your preferred platform
  • Push your local changes
      git add .
      git commit -m "first commit"
      git branch -M main
      git remote add origin {your-remote-repository}
      git push -u origin main
  • Add the extension on your bonfire deps.path to include it in your local development
  • Add use_if_enabled(Bonfire.Gatherings.Web.Routes) in your app's Router module
  • Add the extension on deps.git also (specifying the branch name) to allow others that do not have it in their fork to use it
  • Write a meaningful readme
  • TADA 🔥!

Add your navigation #

The following pattern is likely to change in the coming period.

Each extension can specify it's own navbar in a quite flexible way, leveraging on 2 macro: declare_extension and declare_nav_link.

  • On your extension homepage call the declare_extension macro, specifying the extension name, its icon (that will be mostly used to list the extension with the other active ones) and the default_nav.
      icon: "bi:app",
      default_nav: [
  • The views you will include in the default_nav section, will be the ones that will be shown on the navigation sidebar.

  • The last step is to call declare_nav_link on each of those view/components already specified in declare_extension.

    page: "About",
    href: "/bonfire_gatherings/about",
    icon: "typcn:info-large"

Copyright (c) 2020 Bonfire, VoxPublica, and CommonsPub Contributors

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public
License along with this program. If not, see

Updated 24 Jan 2024
License agpl-3.0

Bonfire Networks

Open Collective account Open Source