Giter VIP home page Giter VIP logo

mp-events's Introduction

MP Events

A lightweight, responsive, open source event calendar for use with Ministry Platform databases.

Features:

  • Ministry Platform API integration and event synchronization
  • Progressive Web App (PWA) compatibility
  • Offline caching
  • Custom dark and light themes
  • ICS hosting -- /api/ics
  • ICS calendar invites
  • Admin portal for creating custom themes and enabling features -- /admin

Experimental Features:

  • Weekly statistics email
  • Stats -- use stats(); in browser dev console
  • Debug log -- use debug(); in browser dev console

A running example: events.afumc.org

Installation

Method #1 (docker)

docker build -t mp-events https://github.com/austinginn/mp-events.git
nano .env

See .env section for creating your environment variables.

docker run --env-file ./.env -p 3000:3000 -d --name mp-events mp-events

Method #2 (node)

On a server with node installed:

git clone https://github.com/austinginn/mp-events.git
cd mp-events
git checkout stable
npm install
nano .env

See .env section for creating your environment variables. Once environment variables are configured:

npm start

Environment Variables

Create a .env file:

nano .env

Modify it with the following variables:

Key Description
CLIENT_ID Ministry Platform API Client ID (see MP Configuration)
CLIENT_SECRET Ministry Platform API Client Secret (see MP Configuration)
ROOT your subdomain that comes before the ministryplatform.com domain -- example.ministryplatform.com
EMAIL_HOST SMTP server for your email host
EMAIL_PORT SMTP server port
EMAIL_SECURE True for port 465, false for other ports
EMAIL_USER Email user name (typically [email protected])
EMAIL_SECRET Email password
PORTAL_SECRET Password used to access admin portal -- events.example.com/admin
UPDATE_SECRET Secret used for webhook (see MP Configuration)
STATS_EMAIL Email where weekly stats will be sent to (experimental feature)

Your final .env file should look something like this:

CLIENT_ID=client
CLIENT_SECRET=averysecuresecret
ROOT=example
EMAIL_HOST=office.smtp.com
EMAIL_PORT=443
EMAIL_SECURE=false
[email protected]
EMAIL_SECRET=noreplypassword
PORTAL_SECRET=averysecurepassword
UPDATE_SECRET=averysecuresecretforwebhook
[email protected]

*This file contains sensitive information. DO NOT push to a public repository.

Ministry Platform Configuration

API Client

With MP admin credentials navigate to your Ministry Platform page - example.ministryplatform.com/ministryplatform.

  • Administration -> API Clients -> New
  • Fill out the following fields
    • Display Name: MP Events
    • Client ID: mpevents
    • Client Secret: come up with something secure
    • Client User: apiuser
    • Authentication Flow: Client Credentials

Webhook

  • Administration -> Webhooks -> New
  • Fill out the following fields
    • Name: MP-Events Webhook
    • HTTP Method: Post
    • URI: your mp-events public domain/api/update -- https://events.example.com/api/update
    • Body Template: { "auth": "come up with something secure" } -- this should match .env UPDATE_SECRET from env section
    • Headers Template: Content-Type: application/json
    • Table Name: Events

Notes

There are many things outside of the scope of this document that need to be configured to make your MP-Events Calendar public. We use Digital Ocean at Alpharetta Methodist. You can support this project and get $100 in credits to host your own by creating an account using this link:
DigitalOcean Referral Badge
Here are some helpful resources from Digital Ocean:

Credit

Created and maintained by Austin Ginn for Alpharetta Methodist

mp-events's People

Contributors

austinginn avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.