Skip to content

RMI/pbtar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pathways-based transition assessment repository (pbtar)

Production Development (main)
Link Production Development
node checks Node Package Checks Node Package Checks
Azure Deploy Azure Static Web Apps CI/CD Azure Static Web Apps CI/CD

Running the application

  1. Clone the Repo
git clone https://github.com/RMI/pbtar
cd pbtar
  1. Create an .env file to store the desired frontend port
cp env.example .env
  1. Run the service
npm run dev

Deployments

The application is deployed using Azure Static Web Apps:

Pull requests automatically deploy to preview environments with URLs provided in the PR comments.

Development

Set-Up

This project uses Node.js and npm for dependency management.

To install Node.js, follow the official installation guide.

  1. Install Dependencies
cd pbtar
npm install
  1. Running the Frontend You can locally serve the frontend alone with:
npm run dev

The local development service will be accessible at http://localhost:3000. It automatically reloads on file changes.

  1. Building the application To render the site,
npm run build

# or for a PROD BUILD
VITE_BUILD_MODE=production npm run build

Then you can serve the dist/ directory using your favorite local server. For example, to use python's server,

python3 -m http.server 9001 -d ./dist

Contributing

Dependencies are managed using npm. To add a new library, run:

npm install <library> # for runtime dependencies
npm install --save-dev <library> # for development dependencies

Testing

This project uses Vitest for unit testing. To run the tests, use:

npm run test

Linting and Formatting

This project uses ESLint and Prettier for code consistency:

# Check code for issues
npm run lint

# Fix linting issues automatically
npm run lint:fix

# Format code with Prettier
npm run format

Documentation

JSON Schema

To render JSON Schema documentation (available in-app at /schema.html route), run npm run docs:json:schema, which invokes the scripts/generate-schema-docs.sh. This script creates and activates a python virtual environment, and renders the public/schema.html file, which will be picked up by the build process.

There is a GitHub workflow (schema-docs in .github/workflows/node-json-schema.yml) to check that the documentation and the schema do not diverge.

Releases

This project uses semantic-release to manage release versions. See "Releases" on the right of the main GitHub repository page to see the latest released version, or click through to see pre-releases.

Managing Releases (For developers)

To trigger an update in released version, use Conventional Commits in your normal development process. Commits with a feat prefix (in the commit summary) will cause a bump in the minor version (x.X.x), while a fix, build, docs, perf, refactor, style, or test prefix will bump the patch version (x.x.X). The commit summary used will appear in the release notes.

The "released" version of the application is updated when the production branch is updated, but we can see pre-release versions by updating main (updates x.x.x-dev.y) or next (updates x.x.x-rc.y). When opening a Pull Request, an GitHub workflow will dry-run the release process and comment with a preview of the expected version tag and release notes.

License

This project is licensed under the MIT License

About

Pathways-based transition assessment repository

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 8