Automatic Music Calendar (AMC) is a MERN app (MongoDb, Express, React, NodeJS) built to collect, organize, and present an always-up-to-date schedule of upcoming local live music events. While I wrote this app originally to serve the Charleston, South Carolina music scene, AMC was flexibly designed to be open source, and pluggable with any source sites. To do so, simply fork the project, and update it with minimal config options and your custom scraper files. By setting up a recurring job to run the web scraping , you can source your event data from any set of websites you want and expect that your app's event data is always up to date.
AMC requires a running instance of MongoDB. Mongo setup is outside the scope of this guide, but connection details can be found in the .env
file at the project root.
Once variables are setup, AMC is ready to run out of the box. It comes packaged with default scrapers which pull data from several Charleston, SC music venues. If you would like to pull event from different sources, simply add or remove scrapers from the /scrapers
directory. Instructions on how to write a custom scraper can be found below. Once satisfied, you can start the app by running these commands from your terminal.
Clone the repo to your local machine
$ git clone https://github.com/TheRyanMiller/AutomaticMusicCalendar.git
Change into the project directory and install the server-side NPM packages, and then the client-side NPM packages.
$ cd AutomaticMusicCalendar
$ npm install
$ cd client
$ npm install
Issue this command from the
/client
directory to launch the app locally
$ npm run
By default, AMC uses Firebase to offer users the ability to login via Facebook and Google. If you intend to allow logins, you will need to setup a Firebase account and project. See here for details.
Create an .env
file at the project root, and set the following variables. An example file has been provided ./envExample
.
MONGO_URL_DEV=
[MongoDB connection string] e.g. mongodb://localhost:27017/chslivemusic
API_PORT=
3001
REACT_APP_FIREBASE_API_KEY=
[Your Personal Firebase API Key]
REACT_APP_FIREBASE_AUTH_DOMAIN=
[Your personal Firebas Auth Domain]
REACT_APP_PROJECT_ID=
[Firebase Project ID]
REACT_APP_API=
[Your AMC Server API] e.g. localhost:3001/api
Several scrapers come packaged in this repository by default
- They Royal American
- The Pour House
- The Music Farm
- Tin Roof
Even if you choose not to use these specific scrapers, they may still prove useful to you as examples of how to write your own. Each event event item can contain the following properties:
_id
String. Unique event identifier.
title
String. Title of event, typically the headline act
openers
String. Single string list of opening acts.
infoLink
String. Direct link to event on source site
fee
String. Price of admission or cover charge
showUrl
String. URL to event
location
String. Location of event - string
doorsTime
String. Time of doors (e.g. "7pm").
showTime
String. Time of show (e.g. "8pm").
time
Date. Time of event
locAcronym
String. Location acronymn identifier associated with event location
ticketLink
String. Ticket Link.
updateDate
Date. Current date (new Date()
)