Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/sour-tables-hear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@sei-js/create-sei": major
---

Updated default template and added extensions
21 changes: 12 additions & 9 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,25 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch the full history instead of a shallow clone

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 20
node-version-file: '.nvmrc'

- name: Enable Corepack
run: corepack enable
- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Yarn Install
run: yarn
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y rsync

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build All Packages
run: yarn build:all
run: pnpm build:all

- name: Test
run: yarn test:all
run: pnpm test:all
21 changes: 12 additions & 9 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,34 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch the full history instead of a shallow clone
- name: Use Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: 18
node-version-file: '.nvmrc'

- uses: browser-actions/setup-chrome@v1
- run: chrome --version

- name: Enable Corepack
run: corepack enable
- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y rsync

- name: Install dependencies
run: yarn install
run: pnpm install --frozen-lockfile

- name: Build packages
run: yarn build:all
run: pnpm build:all

- name: Run Jest tests
run: yarn test:coverage
run: pnpm test:coverage

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
files: '**/coverage-final.json'
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/notify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch the full history instead of a shallow clone

Expand Down
24 changes: 14 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,33 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch the full history instead of a shallow clone
- name: Setup Node.js 18.x
uses: actions/setup-node@v3
fetch-depth: 0
submodules: recursive
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
node-version-file: '.nvmrc'

- name: Enable Corepack
run: corepack enable
- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y rsync

- name: Install Dependencies
run: yarn
run: pnpm install --frozen-lockfile

- name: Build Packages
run: yarn build:all
run: pnpm build:all

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
# Release builds the packages and calls changeset publish
publish: yarn release
publish: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
Binary file removed .yarn/install-state.gz
Binary file not shown.
935 changes: 0 additions & 935 deletions .yarn/releases/yarn-4.7.0.cjs

This file was deleted.

2 changes: 0 additions & 2 deletions .yarnrc.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ The correct Yarn version will be automatically used thanks to the `packageManage

### Building

To build all packages and docs, run `yarn install` then `yarn build:all`
To build all packages and docs, run `pnpm install` then `pnpm build:all`
2 changes: 1 addition & 1 deletion docs/contributing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Before you begin, ensure you have:
Build all packages in the correct order:

```bash
yarn build:all
pnpm build:all
```

<Check>
Expand Down
47 changes: 17 additions & 30 deletions docs/create-sei/quick-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ You don't need to install `@sei-js/create-sei` globally. Use it directly with np
<CodeGroup>

```bash npx
npx @sei-js/create-sei app
npx @sei-js/create-sei app -name my-sei-app
```

```bash pnpm
pnpm create @sei-js/create-sei app
pnpm create @sei-js/create-sei app -name my-sei-app
```

</CodeGroup>
Expand All @@ -28,48 +28,35 @@ The CLI provides an interactive wizard to guide you through project setup:
<Step title="Run the CLI">
Execute the create-sei command with your project name:
```bash
npx @sei-js/create-sei app -n my-sei-app
npx @sei-js/create-sei app
```
</Step>

<Step title="Choose Framework">
Select your preferred frontend framework:
- **Next.js** - Full-stack React framework with SSR/SSG
- **Vite** - Fast build tool with React
- `cd my-sei-app`
- `yarn install`
- `yarn dev`

</Step>

<Step title="Project Setup">
The CLI automatically configures:
- TypeScript configuration
- Up to date NextJS
- Tailwind CSS styling
- ESLint configuration
- Prettier formatting
- Biome formatting
- Mantine UI components
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does the example app use mantine and tailwind?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can there be one example app with mantine and one with tailwind? i think generally people use one or the other

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, we can improve this a bit more pretty easily now. We can do tailwind by default and mantine as an extension

- Git initialization
</Step>
</Steps>

## Manual CLI Usage

Skip the interactive setup by specifying all options directly:

<CodeGroup>

```bash Next.js + Wagmi
npx @sei-js/create-sei app -n my-app -f next
```

```bash Vite + Ethers.js
npx @sei-js/create-sei app -n my-app -f vite
```

</CodeGroup>

### CLI Options

| Flag | Long Form | Description | Options |
|------|-----------|-------------|---------|
| `-n` | `--name` | Project name (must be valid package name) | Any valid npm package name |
| `-f` | `--framework` | Frontend framework | `vite`, `next` |
- `app`: Create a new Sei dApp
- `--name`: Project name (must be valid package name)
- `--extension`: Add one of the optional extensions to your project

- `list-extensions`: List the available extensions

<Info>
**Template Combinations**: The CLI creates different project templates based on your flag combinations. See all available combinations on the [Templates page](/create-sei/templates).
Expand All @@ -79,10 +66,10 @@ npx @sei-js/create-sei app -n my-app -f vite

After running the CLI, you'll have a fully configured Sei dApp ready for development:

- **Project Structure Created** - Organized file structure with components, hooks, and utilities properly scaffolded for your chosen framework and ecosystem.
- **Project Structure Created** - Organized file structure with components, hooks, and utilities properly scaffolded.

- **Wallet Integration Ready** - Pre-configured wallet connections and connection hooks ready to use.

- **Development Tools Configured** - TypeScript, ESLint, Prettier, and Tailwind CSS automatically configured with sensible defaults and ready for immediate development.
- **Development Tools Configured** - TypeScript, Biome, Mantine UI, and Tailwind CSS automatically configured with sensible defaults and ready for immediate development.

- **Sei Network Integration** - Built-in Sei network configuration and contract interaction examples to help you start building on Sei right away.
67 changes: 25 additions & 42 deletions docs/create-sei/templates.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,70 +8,53 @@ icon: "grid-2"
**New to @sei-js/create-sei?** Check out our [Quick Start guide](/create-sei/quick-start) for step-by-step instructions on getting started. This page is a reference for all available template combinations.
</Info>

## Choose a Template
## Default Template

<CardGroup cols={1}>
<Card
title="Next.js + Wagmi (EVM)"
icon="react"
>
Production-ready Next.js application with Wagmi for type-safe Ethereum wallet connections and blockchain interactions. Includes built-in support for MetaMask, WalletConnect, Coinbase Wallet, and other popular wallets. Best for full-stack dApps requiring server-side rendering, SEO optimization, and robust wallet integration.

<br/>

**CLI Flags:** `-f next -e evm -l wagmi`

<br/>

**Tech Stack:** `Next.js 14` `Wagmi v2` `Viem` `TanStack Query` `Tailwind CSS`

```bash
npx @sei-js/create-sei app -n my-app -f next -e evm -l wagmi
npx @sei-js/create-sei app --name my-sei-app
```
</Card>

---

## Extensions

Enhance your templates with additional functionality using extensions:

<CardGroup cols={1}>
<Card
title="Vite + Wagmi (EVM)"
icon="bolt"
title="List Available Extensions"
icon="list"
>
Ultra-fast development environment with Vite's instant hot module replacement and Wagmi's type-safe wallet connections. Features automatic wallet detection, connection state management, and optimized bundle sizes. Perfect for rapid prototyping, development testing, and single-page applications requiring fast iteration cycles.

<br/>
View all available extensions that can be added to your project:

**CLI Flags:** `-f vite -e evm -l wagmi`
```bash
npx @sei-js/create-sei list-extensions
```
</Card>

<Card
title="Precompiles Extension"
icon="database"
>
Add Sei precompile contract integration with examples for querying native blockchain data like token supply, staking info, and governance proposals. Perfect for dApps that need to interact with Sei's built-in smart contracts.

<br/>

**Tech Stack:** `Vite` `React 18` `TypeScript` `Wagmi v2` `Viem` `TanStack Query`
**Features:** Bank precompile, Staking precompile, Governance precompile examples

```bash
npx @sei-js/create-sei app -n my-app -f vite -e evm -l wagmi
npx @sei-js/create-sei app --name my-sei-precompile-app --extension precompiles
```
</Card>
</CardGroup>

---
## What's Included

Each template includes these essential features:

<CardGroup cols={2}>
<Card title="Wallet Connection" icon="wallet">
Ready-to-use wallet connection with support for MetaMask, WalletConnect, and other popular wallets
</Card>
<Card title="Network Configuration" icon="network-wired">
Pre-configured for Sei mainnet, Atlantic-2 testnet, and devnet environments
</Card>
<Card title="Type Safety" icon="shield-check">
Full TypeScript support with proper type definitions for contracts and blockchain interactions
</Card>
<Card title="Modern Tooling" icon="wrench">
ESLint, Prettier, and modern development tools configured out of the box
</Card>
<Card title="Responsive Design" icon="mobile">
Mobile-first responsive layouts with Tailwind CSS utility classes
</Card>
<Card title="Error Handling" icon="exclamation-triangle">
Comprehensive error boundaries and user feedback for blockchain interactions
</Card>
</CardGroup>
12 changes: 4 additions & 8 deletions docs/create-sei/welcome.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,12 @@ icon: "hammer"

## Overview

`@sei-js/create-sei` is a CLI tool that scaffolds production-ready Sei dApps in seconds. Choose from EVM or Cosmos templates with Next.js/Vite, modern wallet integration, and TypeScript support.
`@sei-js/create-sei` is a CLI tool that scaffolds production-ready Sei dApps in seconds. Quickly spin up templates with Next.js/Vite, modern wallet integration, and TypeScript support.

```bash
npx @sei-js/create-sei app -n my-sei-app -f next
npx @sei-js/create-sei app --name my-sei-app
```

<Warning>
**Cosmos Deprecation**: Per [SIP-3](https://github.com/sei-protocol/sei-improvement-proposals/blob/main/SIPS/sip-3.md), Sei is transitioning to EVM only. Use EVM templates for new projects.
</Warning>

<CardGroup cols={2}>
<Card title="EVM Templates" icon="ethereum">
Modern Ethereum-compatible development with Wagmi/Viem or Ethers.js
Expand All @@ -24,10 +20,10 @@ npx @sei-js/create-sei app -n my-sei-app -f next
Next.js for full-stack apps, Vite for lightweight builds
</Card>
<Card title="Production Ready" icon="rocket">
TypeScript, Tailwind CSS, ESLint, wallet connections included
TypeScript, Tailwind CSS, Mantine, Biome, and wallet connections included
</Card>
</CardGroup>

## What's Included

Every project includes wallet connections, contract interactions, TypeScript, Tailwind CSS, ESLint, and responsive layouts. No additional setup required.
Every project includes wallet connections, contract interactions, TypeScript, Tailwind CSS, Biome for formatting, and responsive layouts. No additional setup required.
4 changes: 2 additions & 2 deletions docs/sei-global-wallet/dynamic-nextjs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ const nextConfig = {
removeConsole: process.env.NODE_ENV === 'production',
},
webpack: (config) => {
config.externals.push('pino-pretty', 'lokijs', 'encoding');
config.externals.push('lokijs', 'encoding');
return config;
},
};
Expand Down Expand Up @@ -502,7 +502,7 @@ module.exports = nextConfig;
**Solution:** Add webpack externals to your `next.config.js`:
```javascript
webpack: (config) => {
config.externals.push('pino-pretty', 'lokijs', 'encoding');
config.externals.push('lokijs', 'encoding');
return config;
}
```
Expand Down
Loading