nectar/kinode/packages/app_store/ui
2024-10-09 18:17:50 +02:00
..
src app_store UI: launch button loader 2024-10-09 18:17:50 +02:00
.gitignore add missing files 2024-03-28 13:46:44 -04:00
build.sh WIP: build all frontends, gitignore output 2024-07-25 17:46:12 +03:00
index.html app_store UI: further simplification 2024-07-26 15:00:09 +03:00
package-lock.json app_store UI: add ability to recheck mirrors dropdown 2024-08-27 19:18:03 +03:00
package.json fix build script, WIP homepage 2024-07-26 14:15:05 +03:00
README.md unify-0.0.1 2024-03-22 16:50:45 -04:00
tsconfig.json unify-0.0.1 2024-03-22 16:50:45 -04:00
tsconfig.node.json unify-0.0.1 2024-03-22 16:50:45 -04:00
vite.config.ts app_store UI: details page 2024-07-26 16:39:27 +03:00

App Store UI

This UI template uses the React framework compiled with Vite. It is based on the Vite React Typescript template.

Setup

There are 2 ways to set up this repo:

  1. Place this repo next to the pkg repo of your Kinode project (usually the top level).
  2. Set BASE_URL in vite.config.ts to the URL of your Kinode project (i.e. /chess:chess:sys) and comment out lines 8 and 9.

Development

Run npm i, npm run tc, and then npm start to start working on the UI. By default, the dev server will proxy requests to http://localhost:8080. You can change the proxy target by setting VITE_NODE_URL like so: VITE_NODE_URL=http://localhost:8081 npm start

You may see an error:

[vite] Pre-transform error: Failed to load url /our.js (resolved id: /our.js). Does the file exist?

You can safely ignore this error. The file will be served by the node via the proxy.

public vs assets

The public/assets folder contains files that are referenced in index.html, src/assets is for asset files that are only referenced in src code.

Building

Run npm run build, the build will be generated in the dist directory. If this repo is next to your Kinode pkg directory then you can npm run build:copy to build and copy it for installation.

About Vite + React

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:

  • Configure the top-level parserOptions property like this:
export default {
  // other rules...
  parserOptions: {
    ecmaVersion: 'latest',
    sourceType: 'module',
    project: ['./tsconfig.json', './tsconfig.node.json'],
    tsconfigRootDir: __dirname,
  },
}
  • Replace plugin:@typescript-eslint/recommended to plugin:@typescript-eslint/recommended-type-checked or plugin:@typescript-eslint/strict-type-checked
  • Optionally add plugin:@typescript-eslint/stylistic-type-checked
  • Install eslint-plugin-react and add plugin:react/recommended & plugin:react/jsx-runtime to the extends list