Skip to content

keypom/trial-account-app

Repository files navigation

near-vite-starter

Near + Vite + TypeScript + Tanstack + Tailwind + Playwright

Table of Contents

This project a Vite app bootstrapped with @near-js/client, @tanstack/react-router, and @tanstack/react-query. It uses tailwind for styling, shadcn components, and offers a playwright suite for testing.

To easily add more components, browse the shadcn catalog and follow its installation guide. You can also easily generate themes through tools like this one, and copy and paste your colors into the input.css.

Getting Started

Installing dependencies

pnpm install

Running the app

First, run the development server:

pnpm run dev

Building for production

pnpm run build

Running tests

pnpm run test

Load shadcn component

pnpm dlx shadcn@latest add <component-name>

See the full testing guide.

Learn more about NEAR

To learn more about NEAR, take a look at the following resources:

You can check out the NEAR repository - your feedback and contributions are welcome!

Ethereum wallet login

If developing in testnet and logging in with an Ethereum wallet, you will need to top up the created EVM wallet on NEAR Testnet. Go to Aurora's NEAR wallet playground, switch to the chain, connect to Metamask and load accounts, then Add funds.

Note that you should also modify the Project IDs in ethereum-wallet for the REOWN_PROJECT_ID.

Preparing for production

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 tseslint.config({
  languageOptions: {
    // other options...
    parserOptions: {
      project: ['./tsconfig.node.json', './tsconfig.app.json'],
      tsconfigRootDir: import.meta.dirname,
    },
  },
})
  • Replace tseslint.configs.recommended to tseslint.configs.recommendedTypeChecked or tseslint.configs.strictTypeChecked
  • Optionally add ...tseslint.configs.stylisticTypeChecked
  • Install eslint-plugin-react and update the config:
// eslint.config.js
import react from 'eslint-plugin-react'

export default tseslint.config({
  // Set the react version
  settings: { react: { version: '18.3' } },
  plugins: {
    // Add the react plugin
    react,
  },
  rules: {
    // other rules...
    // Enable its recommended rules
    ...react.configs.recommended.rules,
    ...react.configs['jsx-runtime'].rules,
  },
})

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you're interested in contributing to this project, please read the contribution guide.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published