This repo holds a companion Node.js Express application called "AwesomeCRM" for the Modeling Organizations guide on the FusionAuth website. The guide walks through how to model organizations in FusionAuth using the Entity Management feature.
The docker-compose.yml
file and the kickstart
directory are used to start and configure a local FusionAuth server.
The /complete-application
directory contains a fully working version of the application.
- Docker, to run FusionAuth
- Node 16 or later, to run the AwesomeCRM Express application
NOTE: Before running the command to install FusionAuth, add your FusionAuth license key to the ./kickstart/kickstart.json
file. Find the licenseId
field on line 24 and replace the field value with your license key. Please visit https://fusionauth.io/pricing to read more about FusionAuth licensing.
In the root of this project directory (next to this README) are two files: a Docker compose file and an environment variables configuration file. Assuming you have Docker installed on your machine, you can stand up FusionAuth on your machine with the following command.
docker compose up -d
The FusionAuth configuration files use a unique feature of FusionAuth called Kickstart. When FusionAuth comes up for the first time, it will look at the Kickstart file and mimic API calls to configure FusionAuth for use.
NOTE: If you ever want to reset the FusionAuth system, delete the volumes created by Docker Compose by executing
docker compose down -v
.
FusionAuth will be configured with these settings:
- Your Client Id is:
e9fdb985-9173-4e01-9d73-ac2d60d1dc8e
- Your Client Secret is:
super-secret-secret-that-should-be-regenerated-for-production
- Your example usernames are:
[email protected]
, password ispassword
. Richard is the admin for the "Pied Piper" entity.[email protected]
, password ispassword
. Erlich is the admin for the "Aviato" entity.[email protected]
, password ispassword
. Jared is the admin for the "Hooli" entity.
- Your admin username for FusionAuth is
[email protected]
and your password ispassword
. - Your
fusionAuthBaseUrl
ishttp://localhost:9011/
You can log in to the FusionAuth admin UI and look around if you want to, but with Docker and Kickstart, everything will already be configured correctly.
To run the application, first go into the project directory.
cd complete-application
Install dependencies.
npm install
Start the application.
npm start
Browse to the application at http://localhost:3000.