Set up by following the steps at Basic Setup Guide.
What is this app for? - Used to test CITZ IMB node packages.
- General Information
- Basic Setup Guide - Start Here!
- Directory Structure - How the repo is designed.
- Git Aliases - Available git aliases.
- Scripts - Scripts for running and working on the web app.
- Included Packages - Which CITZ IMB node packages are being tested.
- Running on a NodeJS:20 with React, Express, and Postgres.
- Used to test CITZ IMB node packages.
-
Create a
.envfile based on theexample.envfile. -
Run
npm run upto start the app.
.
├── .github/
| ├── config/
| | └── dep-report.json5 # Configure options for NPM Dep Report.
| ├── helpers/
| | ├── github-api/ # Functions to access the GitHub API.
| | ├── create-npm-dep-report-issues.js # Creates GitHub Issues for Npm Dep Reports.
| | ├── create-npm-dep-report.js # Creates text bodies for Npm Dep Reports.
| | ├── parse-json5-config.js # Parses json5 files for GitHub actions output.
| | └── parse-npm-deps.js # Parses package.json files for changes to package versions.
| ├── workflows/
| | └── npm-dep-report.yaml # Reports on new package versions.
├── src/
| ├── backend/ # Express API.
| | ├── scripts/ # Utility scripts used to run the server.
| | ├── src/
| | | ├── migrations/ # Migrations on database (check src/backend/README).
| | | ├── modules/ # Modules of functionality (routes, controllers, entities, services).
| | | └── utils/ # Utility functions for the express api.
| | ├── config.ts # Utilizes env vars and exports common variables.
| | ├── dataSource.ts # Connection to database and configuration with typeorm.
| | ├── express.ts # Express configuration and base route configuration.
| | ├── index.ts # Server and database connection initialization.
| | └── package.json # Configure packages.
| ├── frontend/ # React.
| | ├── src/
| | | ├── assets/ # Images.
| | | ├── components/
| | | | ├── common/ # Common or reusable visual components.
| | | | ├── icons/ # Icons as svg components.
| | | | └── layout/ # Layout components like PageLayout.
| | | ├── css/ # Base styles and variables.
| | | ├── pages/ # Page components.
| | | ├── AppRouter.tsx # Router for loading pages at routes.
| | | ├── global.d.ts # Global type declarations (used for config endpoint).
| | | └── main.tsx # Main JavaScript run in index.html.
| | ├── index.html # Set web app meta data and title.
| | ├── nginx.conf # Configure proxy pass for prod build.
| | ├── package.json # Configure packages.
| | └── vite.config.ts # Configure vite server and proxy pass for dev build.
These aliases are available within the repository.
# List all available aliases.
$ git aliases# Amend staged changes to the last commit without changing the commit message.
$ git amend# Undo the last commit and bring it's changes back into the staging area.
$ git undo-last-commit-soft# Undo the last commit and discard it's changes.
$ git undo-last-commit-hard# Start the web app (ensure env vars set).
$ npm run up# Stop the web app.
$ npm run down# Prune all containers, images and volumes.
$ npm run prune# Clean install packages in frontend and backend (requires prune and up to affect live site).
$ npm run install# Clean install packages in frontend (requires prune and up to affect live site).
$ npm run install:frontend# Clean install packages in backend (requires prune and up to affect live site).
$ npm run install:backend# Prunes, clean installs packages, and rebuilds containers.
$ npm run rebuild# Shell into frontend container.
# Type 'exit' + ENTER to exit shell.
$ npm run shell:frontend# Shell into backend container (used when working with migrations).
# Type 'exit' + ENTER to exit shell.
$ npm run shell:backend# Shell into database container.
# Type 'exit' + ENTER to exit shell.
$ npm run shell:database- @bcgov/citz-imb-kc-react - Integrating with Pathfinder SSO Keycloak in a NodeJS App.
- @bcgov/citz-imb-kc-express - Integrating with Pathfinder SSO Keycloak in a NodeJS App.
- @bcgov/citz-imb-kc-css-api - Integrating with Pathfinder SSO Keycloak CSS API.
- @bcgov/citz-imb-richtexteditor - Reusable rich text editor component.