nectar/kinode/packages/app_store/ui
2024-06-10 20:47:16 -06:00
..
public/assets background images -> gradients; remove unused fonts 2024-05-01 11:42:42 -04:00
src fix: render capabilities even if they're not just strings 2024-06-10 20:47:16 -06:00
.eslintrc.cjs unify-0.0.1 2024-03-22 16:50:45 -04:00
.gitignore add missing files 2024-03-28 13:46:44 -04:00
build.sh settings: stub out 2024-04-23 04:14:59 +09:00
chat_metadata.json unify-0.0.1 2024-03-22 16:50:45 -04:00
index.html show all installed packages on homepage 2024-05-02 17:13:32 -04:00
package-lock.json appstore update: draft 0.1 2024-04-08 11:59:08 -04:00
package.json homepage and appstore touch-up 2024-05-10 15:16:26 -04: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 Fixed vite config 2024-04-15 22:43:46 +01:00
yarn.lock appstore facelift 2024-04-08 11:59:08 -04: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