Central is a free content management system to help service entities manage their directory of recovery meetings. It is currently in active development. Once it's ready, it will be deployed and usable by service entities for free with minimal configuration.
Central is developed on the MERN stack (MongoDB, Express, React, Node.js). It uses these frameworks:
You can set up and run Central yourself. It requires these third-party services:
Start by creating a .env
file in your project root with the following content, then continue to the next steps to configure services.
# Base URL (to populate edit URLs)
BASE_URL="http://localhost:3000"
# Random security salt (to protect sessions)
SESSION_SECRET="<make.up.a.cryptographic.salt>"
# MongoDB connection URL (to store data)
DATABASE_URL="mongodb+srv://<user>:<password>@cluster0.<cluster>.mongodb.net/<database>"
# Google Geocoding, Sheets, and Time Zone APIs
GOOGLE_API_KEY="<your.google.api.key>"
# SendGrid (to send email)
SENDGRID_API_KEY="<your.sendgrid.api.key>"
SENDGRID_SENDER="<your.sender@address.com>"
# Only necessary to seed OIAA data
GOOGLE_SHEET_API_KEY="<your.google.sheets.api.key>"
USER_NAME="<your.name>"
USER_EMAIL="<your.email@address.com>"
This will be the base for the edit_url
s in your JSON which link back to meeting entries. Use your Central URL without the trailing slash.
You can type any string of random characters here, or use a random string generator.
- Install MongoDB or sign up for Atlas
- Create a database
- Copy the connection string to your
.env
- In Cloud Console, enable the Geocoding and Time Zone APIs
- Go to Credentials > Create Credentials
- Restrict to these two APIs (if you can figure out how to restrict it to the proper IP addresses for Cloud Run, let us know!)
- Copy the API key and add it to your
.env
- Set up an account at SendGrid
- Get API key and sender email, add them to
.env
- Run
npm i
(you don't need to do this ever time but should do it when you pull changes) - Seeding with a Meeting Guide JSON feed and setting up a blank instance are both coming soon
- For now you must seed a sample of OIAA data by running
npm run seed
- Now run
npm run dev
. Your site should be running at http://localhost:3000/
- Add this repository (or a clone of it) to Cloud Run
- Set your environment variables with the values in your
.env