Table of Contents
This project uses Bun as the package manager. Install the dependencies with:
bun install
Start the development server on localhost:5170
:
bun run dev
The development server is configured with hot module replacement for a smooth development experience.
- Open
src/components/Profile.tsx
to modify the main profile component. - Update styles in
src/index.css
or use Tailwind classes directly in your components. - Adjust the theme in
tailwind.config.js
to match your desired look and feel.
This template is set up for module federation. The configuration can be found in rsbuild.config.ts
. Key points:
- The profile module is exposed as
"./Profile"
- It shares dependencies with the host/"gateway"
- Feel free to install other packages and add components to the Profile, but do not modify App or bootstrap.
To create a production build:
bun run build
This will generate optimized files in the dist
directory.
To deploy your profile to web4, make sure you have built the project, then:
- Run the deploy script:
bun run deploy
-
Follow the prompts in the terminal:
- Enter the network (mainnet/testnet)
- Enter your account name (e.g., root.near)
The script will automatically:
- Create a web4 subaccount if it doesn't exist
- Deploy your profile to the web4 contract
You will be prompted to sign transactions through near-cli-rs
After successful deployment, your website will be accessible at:
- Testnet:
ACCOUNT_NAME.testnet.page
- Mainnet:
ACCOUNT_NAME.near.page
We welcome contributions! Please read our contribution guide for details on our code of conduct and the process for submitting pull requests.