Skip to content

Latest commit

 

History

History
50 lines (33 loc) · 2.94 KB

File metadata and controls

50 lines (33 loc) · 2.94 KB

VP-Kuljetus Transport Management

Running the project

  • Change to correct node version (found in .nvmrc)
    • NOTE: If you're using nvm for managing node versions
    • nvm use
    • For instructions on setting up automatic node version switching see this
  • npm i
  • See Environment variables for setting up Infisical for managing environment variables
  • After setting up Infisical you can run the project with npm run start

Linting / formatting

This project uses Biome.js. Please install Biome's VS Code plugin to get automatic linting + formatting on save, suggestions and refactoring.

Routing

This project is using Tanstack Router. It is fully type-safe.

Routing is file-based and we are using flat routing. Route files are inside /routes folder. More info about how route file naming conventions found here.

Route typings and runtime definitions are generated automatically by Tanstack Router Vite plugin, when the project is started.

NOTE! Remember to start the project locally when creating new routes to get all the functionality and type-safety of the router during development.

Tanstack Router also provides Devtools. They help resolving router issues during development. Devtools will mount as a fixed, floating toggle in the corner of the screen to show and hide the devtools.

Localization

This project uses i18next for localization. Different features about what i18next can do can be found in the docs starting from here. As this is a React project, it uses react-i18next for compatibility layer. The documentation for it can be found here.

Environment variables

This project uses Infisical for managing environment variables. It provides a centralized way for serving environment variables to both CI/CD pipeline and local development. Proceed with the following steps to get started:

  1. Install Infisical CLI by referencing the official documentation here: Infisical CLI
  2. Request fellow developers to get access to
    1. Infisical organization
    2. VP-Kuljetus project
  3. Run infisical login and authenticate with your Infisical account
    1. Select Infisical Cloud when asked
  4. Run npm run start
  5. You will see in the terminal that Infisical has successfully injected the environment variables and the project has started

To update spec

Run git submodule update --init

To generate API

Run npm run build-client