Skip to content

An app to showcase Salesforce CMS in react front end, run this on heroku.. go on..

Notifications You must be signed in to change notification settings

adamSellers/adams-fullstack-cms

Repository files navigation

Fullstack CMS on Salesforce

This app is a showcase of the Salesforce CMS running in headless mode. The Salesforce Content Delivery API is leveraged to show a list of News articles that are authored in Salesforce CMS. You can see a live version here.

Installation Notes

This application is built to be deployed on Heroku. Becasue the application uses Salesforce as the Identity Provider (IdP), there is some configuration that you'll need to do on your Heroku app to line everything up properly.

Dependencies

This app was built to be primarily run on top of the Salesforce stack. All of the following core technologies and Heroku add-ons are required:

  • Salesforce Identity: the app uses a core SF org to provide authentication. Be sure to create your connected app to run (see below)
  • Heroku: The app is designed to be built and run on Heroku, click the Heroku button below to get started!
  • Redis: Session store is done in Heroku Redis
  • Mongo DB: The relational DB bits, which is only storing user information at present, is done through Mongo DB. As of Nov 2020, mLab has removed their Heroku addon (boo!) but you can still create a free tier at Mongo Atlas. This is recommended to keep the app free to use as Object Rocket (the other Mongo addon in Heroku) doesn't have a free tier.
  • React / Redux: This is a react front end with Redux for the state store. Probably doesn't need Redux specifically, but the point of building this was for me to learn, so Redux is in.
  • Express: The backend is provided by Express.

Environment Variables

Once you've deployed the application to Heroku, you'll need to configure the following environment variables:

  • APPURL: this is the url of your application where it's hosted (either whatever.herokuapp.com or localhost etc), used for the callback function in the auth flow.
  • CLIENTID and CLIENTSECRET: these are used in the auth flow for the connected app. Be sure to setup your callback url in the connected app setup to be your APPURL (where the app is hosted) /auth/callback. eg: https://adams-fullstack-cms.herokuapp.com/auth/callback
  • MONGOATLAS_URI: the connection string to your mongo atlas database. Note, create a DB and a collection named 'users'.
  • API_VERSION: this is the version of the Salesforce API you wish to connect to. Min V49.0!

One-Click Heroku Deploy

Deploy

License'y Stuff

Copyright 2020 Adam Sellers

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

An app to showcase Salesforce CMS in react front end, run this on heroku.. go on..

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages