@jack-henry/create-consumer-app
v0.0.11
Published
<!-- SPDX-FileCopyrightText: 2025 Jack Henry
Downloads
366
Keywords
Readme
@jack-henry/create-consumer-app
A command-line tool to generate a Jack Henry oauth consumer application, pre-configured with @jack-henry/consumer-tools.
Usage
You can create a new project by running any of the following commands. You can optionally include the project name as a command-line argument.
# npm
npm create @jack-henry/consumer-app [your-project-name]
# yarn
yarn create @jack-henry/consumer-app [your-project-name]
# pnpm
pnpm create @jack-henry/consumer-app [your-project-name]If you don't specify a project name, the CLI will prompt you for one.
Features
- Interactive Setup: The CLI will prompt you for your project name, institution ID, client ID, client secret, API base URL, and redirect URIs.
- Template-Based Scaffolding: The generator copies a pre-configured template based on the
example-consumer-app. - File Renaming and Content Replacement: The generator will rename files and replace content from
example-consumer-apptoyour-project-name. - Dynamic
package.json: Thenamefield in the new project'spackage.jsonis automatically set to your project name. - Package Manager Selection: You can choose between
npm,yarn (v1), andyarn (v4). - Automatic Dependency Installation: The generator runs the appropriate install command to install all necessary dependencies.
- Next Steps Guidance: After completion, the CLI provides instructions on how to run your new application.
Configuration
During setup, the CLI creates a .env file in your project with the credentials you provide (institution ID, client ID, client secret, API URL, and redirect URIs). The vite.config.ts reads these variables at dev-server startup.
Generated Project Structure
Your new project will have the following structure:
your-project-name/
├── src/
│ ├── components/
│ ├── routing/
│ └── your-project-name.ts
├── index.html
├── package.json
├── README.md
└── ...SSL Certificate Generation
The development server uses a self-signed SSL certificate for HTTPS. This is generated automatically when you run the dev command for the first time.
How it Works
A local Certificate Authority (CA) is created in the certs directory of your project. This CA is then used to sign a server certificate, which is also stored in the certs directory.
The vite.config.ts is configured to use these certificates for the development server.
Trusting the Certificate Authority
Because the CA is self-signed, your browser will not trust it by default. This will result in a privacy warning when you try to access the application.
To resolve this, you need to trust the CA certificate. The CA certificate is located at certs/ca.pem in your project directory.
macOS
- Open the Keychain Access application.
- Select the System keychain.
- Drag and drop the
certs/ca.pemfile into the Keychain Access window. - Double-click the imported certificate.
- Expand the Trust section.
- Set When using this certificate to Always Trust.
- Close the certificate window. You may be prompted for your password.
Windows
- Double-click the
certs/ca.pemfile. - Click the Install Certificate... button.
- Select Local Machine and click Next.
- Select Place all certificates in the following store.
- Click Browse... and select Trusted Root Certification Authorities.
- Click OK, then Next, then Finish.
Firefox
Firefox has its own trust store.
- Open Firefox and go to
about:preferences#privacy. - Scroll down to the Certificates section and click View Certificates....
- Select the Authorities tab.
- Click Import....
- Select the
certs/ca.pemfile. - Check the box for Trust this CA to identify websites.
- Click OK.
