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.
- Release Notes
- Requirements
- Installation
- Set up the server
- Run the dev server
- Launch the admin
- Update Deployment Webhook (optional)
- 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.
This project was built using Twill and is compatible with Laravel version 8, running on PHP 8.0. Twill shares Laravel's server requirements.
Custom Vue.JS UI components built for the CMS are located in
resources/js/components
and are compiled via
Lavavel Mix.
This project has been developed and tested against MySQL 5.7.
git clone https://github.com/simonbetton/timeline.carnegiehall.org.git
npm install
The root directory has a package.json
which contains build-related
dependencies for tasks including:
- Building the custom Vue.JS components
composer install
The root directory has a composer.json
which contains build-related
dependencies for tasks including:
- Building the Laravel and Twill dependencies
npm run production
to compile the assets or npm run development
when
editing the components.
cp .env.example .env
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
Edit the following in the .env
file:
APPLE_MUSIC_TEAM_ID=
APPLE_MUSIC_KEY_ID=
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.
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 following to import the projects database table structure.
php artisan migrate
Simply run your local environment via the following command while MySQL is also running.
php artisan serve
Create your first CMS user via CLI.
php artisan twill:superadmin
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 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'
// ],
MIT