Skip to content

Commit edcb520

Browse files
committed
feat(template): modernize runtime and tooling defaults
1 parent 184d715 commit edcb520

11 files changed

Lines changed: 114 additions & 90 deletions

File tree

packages/create-sei/.rsyncignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ node_modules/
22
.next/
33
dist/
44
build/
5-
.yarn/
6-
yarn.lock
75
package-lock.json
86
.git/
97
.DS_Store

packages/create-sei/templates/next-template/.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Chain configuration
22
# Options: mainnet, testnet, devnet
3-
# Defaults to testnet (atlantic-2) if not set
3+
# Defaults to mainnet if not set
44
NEXT_PUBLIC_CHAIN=testnet
55

66
# WalletConnect Project ID (optional)
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
{
2-
"extends": "next/core-web-vitals"
3-
}
1+
{}

packages/create-sei/templates/next-template/README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,13 @@ This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next
44

55
Install dependencies by running
66
```bash
7-
npm install
8-
#or
9-
yarn
7+
bun install
108
```
119

1210
Then, run the development server:
1311

1412
```bash
15-
npm run dev
16-
# or
17-
yarn dev
13+
bun run dev
1814
```
1915

2016
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

packages/create-sei/templates/next-template/biome.json

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
3-
"organizeImports": {
4-
"enabled": true
2+
"$schema": "https://biomejs.dev/schemas/2.4.5/schema.json",
3+
"root": true,
4+
"assist": {
5+
"actions": {
6+
"source": {
7+
"organizeImports": "on"
8+
}
9+
}
510
},
611
"linter": {
712
"enabled": true,
@@ -20,8 +25,7 @@
2025
"formatWithErrors": false,
2126
"indentStyle": "tab",
2227
"lineEnding": "lf",
23-
"lineWidth": 160,
24-
"attributePosition": "auto"
28+
"lineWidth": 160
2529
},
2630
"javascript": {
2731
"formatter": {
@@ -32,8 +36,12 @@
3236
"arrowParentheses": "always",
3337
"bracketSpacing": true,
3438
"bracketSameLine": false,
35-
"quoteStyle": "single",
36-
"attributePosition": "auto"
39+
"quoteStyle": "double"
40+
}
41+
},
42+
"css": {
43+
"parser": {
44+
"tailwindDirectives": true
3745
}
3846
},
3947
"json": {
@@ -42,7 +50,6 @@
4250
}
4351
},
4452
"files": {
45-
"include": ["src/**/*.ts", "src/**/*.tsx", "*.json", "*.md"],
46-
"ignore": ["node_modules/**", "dist/**", ".next/**", ".yarn/**"]
53+
"includes": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.css"]
4754
}
4855
}
Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
11
/** @type {import('next').NextConfig} */
2-
const nextConfig = {};
2+
const nextConfig = {
3+
eslint: {
4+
// Linting is handled by Biome — skip ESLint during builds.
5+
ignoreDuringBuilds: true,
6+
},
7+
images: {
8+
remotePatterns: [
9+
{
10+
protocol: "https",
11+
hostname: "cdn.sei.io",
12+
},
13+
],
14+
},
15+
};
316

417
export default nextConfig;

packages/create-sei/templates/next-template/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"private": true,
55
"scripts": {
66
"dev": "next dev",
7+
"prebuild": "biome check .",
78
"build": "next build",
89
"start": "next start",
910
"lint": "biome lint .",
@@ -35,6 +36,7 @@
3536
"wagmi": "^2.16.4"
3637
},
3738
"devDependencies": {
39+
"@biomejs/biome": "^2.4.5",
3840
"@types/node": "^24.3.0",
3941
"@types/react": "^19.1.10",
4042
"@types/react-dom": "^19.1.7",
Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1+
@import "tailwindcss";
12

2-
@tailwind base;
3-
@tailwind components;
4-
@tailwind utilities;
3+
@theme {
4+
--color-sei-red: #9e1f19;
5+
--color-sei-dark: #1a1a1a;
6+
}
57

68
@layer base {
7-
html {
8-
@apply h-full;
9-
}
10-
11-
body {
12-
@apply h-full bg-gray-50 text-gray-900 antialiased;
13-
}
9+
html {
10+
@apply h-full;
11+
}
12+
13+
body {
14+
@apply h-full bg-gray-50 text-gray-900 antialiased;
15+
}
1416
}

packages/create-sei/templates/next-template/src/components/providers/providers.tsx

Lines changed: 41 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,47 @@
1-
'use client';
1+
"use client";
22

3-
import { MantineProvider } from '@mantine/core';
4-
import { Notifications } from '@mantine/notifications';
5-
import { RainbowKitProvider, connectorsForWallets, lightTheme } from '@rainbow-me/rainbowkit';
6-
import { metaMaskWallet } from '@rainbow-me/rainbowkit/wallets';
7-
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
8-
import { type ReactNode, useMemo } from 'react';
9-
import { http, WagmiProvider, createConfig } from 'wagmi';
3+
import { MantineProvider } from "@mantine/core";
4+
import { Notifications } from "@mantine/notifications";
5+
import { connectorsForWallets, lightTheme, RainbowKitProvider } from "@rainbow-me/rainbowkit";
6+
import { metaMaskWallet } from "@rainbow-me/rainbowkit/wallets";
7+
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
8+
import { type ReactNode, useMemo } from "react";
9+
import { createConfig, http, WagmiProvider } from "wagmi";
1010

11-
import '@rainbow-me/rainbowkit/styles.css';
12-
import { sei, seiDevnet, seiTestnet } from 'viem/chains';
11+
import "@rainbow-me/rainbowkit/styles.css";
12+
import { defineChain } from "viem";
13+
import { sei, seiTestnet } from "viem/chains";
14+
15+
const seiDevnet = defineChain({
16+
id: 713715,
17+
name: "Sei Devnet",
18+
nativeCurrency: { name: "Sei", symbol: "SEI", decimals: 18 },
19+
rpcUrls: {
20+
default: {
21+
http: ["https://evm-rpc-arctic-1.sei-apis.com"],
22+
},
23+
},
24+
blockExplorers: {
25+
default: {
26+
name: "Seitrace",
27+
url: "https://seitrace.com",
28+
},
29+
},
30+
testnet: true,
31+
});
1332

1433
const queryClient = new QueryClient();
1534

1635
const connectors = connectorsForWallets(
1736
[
1837
{
19-
groupName: 'Recommended',
38+
groupName: "Recommended",
2039
wallets: [metaMaskWallet],
2140
},
2241
],
2342
{
24-
appName: 'Sei dApp',
25-
projectId: process.env.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID || 'your-project-id',
43+
appName: "Sei dApp",
44+
projectId: process.env.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID || "your-project-id",
2645
}
2746
);
2847

@@ -33,11 +52,11 @@ interface ProvidersProps {
3352
export default function Providers({ children }: ProvidersProps) {
3453
// Chain selection via environment variable, defaults to sei mainnet
3554
const getSelectedChain = () => {
36-
const chainName = process.env.NEXT_PUBLIC_CHAIN || 'mainnet';
55+
const chainName = process.env.NEXT_PUBLIC_CHAIN || "mainnet";
3756
switch (chainName.toLowerCase()) {
38-
case 'testnet':
57+
case "testnet":
3958
return seiTestnet;
40-
case 'devnet':
59+
case "devnet":
4160
return seiDevnet;
4261
default:
4362
return sei;
@@ -68,14 +87,14 @@ export default function Providers({ children }: ProvidersProps) {
6887
<Notifications />
6988
<RainbowKitProvider
7089
theme={lightTheme({
71-
accentColor: '#9E1F19',
72-
accentColorForeground: 'white',
73-
borderRadius: 'medium',
74-
fontStack: 'system',
90+
accentColor: "#9E1F19",
91+
accentColorForeground: "white",
92+
borderRadius: "medium",
93+
fontStack: "system",
7594
})}
7695
appInfo={{
77-
appName: 'Sei dApp',
78-
learnMoreUrl: 'https://docs.sei.io/learn/wallets',
96+
appName: "Sei dApp",
97+
learnMoreUrl: "https://docs.sei.io/learn/wallets",
7998
}}
8099
modalSize="compact"
81100
initialChain={chain.id}

packages/create-sei/templates/next-template/src/components/shell/shell.tsx

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
'use client';
1+
"use client";
22

3-
import { ActionIcon, AppShell, Container, Group } from '@mantine/core';
4-
import { ConnectButton } from '@rainbow-me/rainbowkit';
5-
import { IconBook, IconCode, IconLogout } from '@tabler/icons-react';
6-
import Link from 'next/link';
7-
import type { PropsWithChildren } from 'react';
8-
import { useAccount, useDisconnect } from 'wagmi';
3+
import { ActionIcon, AppShell, Container, Group } from "@mantine/core";
4+
import { ConnectButton } from "@rainbow-me/rainbowkit";
5+
import { IconBook, IconCode, IconLogout } from "@tabler/icons-react";
6+
import Image from "next/image";
7+
import Link from "next/link";
8+
import type { PropsWithChildren } from "react";
9+
import { useAccount, useDisconnect } from "wagmi";
910

1011
export default function Shell({ children }: PropsWithChildren) {
1112
const { address, isConnected } = useAccount();
@@ -17,7 +18,7 @@ export default function Shell({ children }: PropsWithChildren) {
1718
<Container size="xl" h="100%">
1819
<Group justify="space-between" align="center" h="100%">
1920
<Link href="/" aria-label="Sei">
20-
<img src="https://cdn.sei.io/assets/sei-icon.svg" alt="Sei" style={{ height: 28, display: 'block' }} />
21+
<Image src="https://cdn.sei.io/assets/sei-icon.svg" alt="Sei" width={28} height={28} style={{ display: "block" }} />
2122
</Link>
2223
<Group align="center" gap="md">
2324
<ActionIcon
@@ -29,10 +30,10 @@ export default function Shell({ children }: PropsWithChildren) {
2930
radius="md"
3031
aria-label="View Resources"
3132
style={{
32-
transition: 'all 0.2s ease',
33-
'&:hover': {
34-
transform: 'translateY(-1px)',
35-
boxShadow: '0 4px 12px rgba(0, 0, 0, 0.1)',
33+
transition: "all 0.2s ease",
34+
"&:hover": {
35+
transform: "translateY(-1px)",
36+
boxShadow: "0 4px 12px rgba(0, 0, 0, 0.1)",
3637
},
3738
}}
3839
>
@@ -47,10 +48,10 @@ export default function Shell({ children }: PropsWithChildren) {
4748
radius="md"
4849
aria-label="View Development Guide"
4950
style={{
50-
transition: 'all 0.2s ease',
51-
'&:hover': {
52-
transform: 'translateY(-1px)',
53-
boxShadow: '0 4px 12px rgba(0, 0, 0, 0.1)',
51+
transition: "all 0.2s ease",
52+
"&:hover": {
53+
transform: "translateY(-1px)",
54+
boxShadow: "0 4px 12px rgba(0, 0, 0, 0.1)",
5455
},
5556
}}
5657
>
@@ -65,10 +66,10 @@ export default function Shell({ children }: PropsWithChildren) {
6566
onClick={() => disconnect()}
6667
aria-label="Disconnect Wallet"
6768
style={{
68-
transition: 'all 0.2s ease',
69-
'&:hover': {
70-
transform: 'translateY(-1px)',
71-
boxShadow: '0 4px 12px rgba(0, 0, 0, 0.1)',
69+
transition: "all 0.2s ease",
70+
"&:hover": {
71+
transform: "translateY(-1px)",
72+
boxShadow: "0 4px 12px rgba(0, 0, 0, 0.1)",
7273
},
7374
}}
7475
>

0 commit comments

Comments
 (0)