Skip to content

This is the open source CMS for the "Timeline of African American Music" project by Carnegie Hall.

License

Notifications You must be signed in to change notification settings

CarnegieHall/timeline.carnegiehall.org-cms

Repository files navigation

Timeline of African American Music

This project is the CMS tailored for the Timeline of African American Music by Carnegie Hall, built on Twill. An open-source Laravel based CMS.


Table of Contents

Release Notes

1.0.0

  • Initial release based on the code of The Timeline of African American Music released on January 2022.
  • Code contains structural elements but not specific data (images, text, values) associated with the Timeline of African American Music.
  • This code is provided “as is” and for you to use at your own risk. The information included in the contents of this repository is not necessarily complete. Carnegie Hall offers the scripts as-is and makes no representations or warranties of any kind.
  • Support or maintenance for use and modification is not provided. Future updates will be released at will.

Requirements

This project was built using Twill and is compatible with Laravel version 8, running on PHP 8.0. Twill shares Laravel's server requirements.

Frontend assets

Custom Vue.JS UI components built for the CMS are located in resources/js/components and are compiled via Lavavel Mix.

Database

This project has been developed and tested against MySQL 5.7.

Installation

Clone the project

git clone https://github.com/simonbetton/timeline.carnegiehall.org.git

Install top-level NPM dependencies

npm install

The root directory has a package.json which contains build-related dependencies for tasks including:

  • Building the custom Vue.JS components

Install top-level composer dependencies

composer install

The root directory has a composer.json which contains build-related dependencies for tasks including:

  • Building the Laravel and Twill dependencies

Build custom ui components

npm run production to compile the assets or npm run development when editing the components.

Copy the example environment file:

cp .env.example .env

Add secure application key:

Run the following command to use PHP's secure random bytes generator to build a cryptographically secure key for your application.

php artisan key:generate

Add Apple Music key and IDs:

Edit the following in the .env file:

APPLE_MUSIC_TEAM_ID=
APPLE_MUSIC_KEY_ID=

Add your Apple Music private key:

Add your private key in the root of the project directory /apple-music.p8

NB: The project root directory must NOT be publically accessible and you should never commit sensitive keys into a git repo.

Set up the server

Edit your /etc/hosts file:

127.0.0.1 timeline.test
127.0.0.1 admin.timeline.test

You're welcome to change these domains, but remember to update them in the .env file. See here for more info

Run the database migration:

Run the following to import the projects database table structure.

php artisan migrate

Run the dev server

Get the server running

Simply run your local environment via the following command while MySQL is also running.

php artisan serve

Add your first user

Create your first CMS user via CLI.

php artisan twill:superadmin

Launch the admin

Visit the CMS and login with the credentials used to create the user with the command above: http://admin.timeline.test:8000/

NB: You will need to change this domain if you changed your configuration above.

Update Deployment Webhook (optional)

Update the webhook URL used to trigger a Vercel deployment in the .env file.

TRIGGER_DEPLOYMENT_WEBHOOK=

Vercel is not required, though the URL is requested via a POST request.

If you wish to remove the link in the CMS, simply comment out the navigation item in /config/twill-navigation.php

//  'deploy' => [
//    'title' => 'Trigger Deploy',
//    'route' => 'admin.deploy'
//  ],

Learn more on Twill CMS

https://twill.io/tutorials

License

MIT

About

This is the open source CMS for the "Timeline of African American Music" project by Carnegie Hall.

Resources

License

Stars

Watchers

Forks