Skip to content

feat(template): modernize runtime and tooling defaults#309

Merged
codebycarson merged 2 commits intomainfrom
pr/template-runtime
Mar 9, 2026
Merged

feat(template): modernize runtime and tooling defaults#309
codebycarson merged 2 commits intomainfrom
pr/template-runtime

Conversation

@codebycarson
Copy link
Copy Markdown
Collaborator

This pull request updates the Next.js template in create-sei to modernize the stack, streamline configuration, and improve compatibility with Bun, Biome, and Tailwind v4. The most important changes include switching the default package manager to Bun, updating linting and formatting to use Biome, and migrating Tailwind theme configuration to CSS-first. There are also improvements to chain selection logic and wallet integration, as well as minor code style updates.

Tooling and configuration modernization:

  • Switched default install and run commands in README.md from npm/yarn to Bun, reflecting Bun as the recommended package manager.
  • Updated .env.example to default NEXT_PUBLIC_CHAIN to mainnet instead of testnet.
  • Migrated linting and formatting from ESLint to Biome, including updating biome.json to v2 schema, adding Biome as a dev dependency, and removing .eslintrc.json. [1] [2] [3] [4] [5] [6]
  • Added a prebuild script to run Biome checks before building in package.json.
  • Updated next.config.mjs to skip ESLint during builds and allow images from cdn.sei.io.

Tailwind and theme configuration:

  • Migrated Tailwind theme values to CSS-first via @theme in globals.css, and removed custom theme config from tailwind.config.js (now empty for compatibility). [1] [2]

Chain and wallet integration improvements:

  • Added explicit seiDevnet chain definition using viem and improved chain selection logic in providers.tsx to default to mainnet and use environment variable. [1] [2]
  • Updated wallet and RainbowKit configuration for better readability and maintainability.

Code style and compatibility updates:

  • Updated all imports and style objects in providers.tsx and shell.tsx to use double quotes for consistency, and replaced <img> with Next.js <Image> for optimized image loading. [1] [2] [3] [4] [5]

Cleanup:

  • Removed .yarn/ and yarn.lock from .rsyncignore to reflect the switch from Yarn to Bun.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 9, 2026

🦋 Changeset detected

Latest commit: 7536762

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sei-js/create-sei Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR modernizes the Next.js starter template in create-sei by switching to Bun as the recommended package manager, migrating linting/formatting from ESLint to Biome v2, upgrading Tailwind configuration to the v4 CSS-first approach, and improving chain selection and wallet integration.

Changes:

  • Tooling modernization: Biome v2 replaces ESLint, Bun replaces npm/yarn, prebuild linting gate added, and biome.json updated to v2 schema/API.
  • Tailwind v4 migration: Theme values moved from tailwind.config.js to CSS @theme in globals.css; tailwind.config.js is now empty.
  • Chain/wallet improvements: Explicit seiDevnet chain defined via viem, chain selection defaulting to mainnet, and <img> replaced with Next.js <Image> in shell.tsx.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
biome.json Upgraded to Biome v2 schema, updated organizeImports to new assist API, added CSS Tailwind directive support, changed quote style to double
package.json Added @biomejs/biome as dev dependency, added prebuild script
next.config.mjs Skip ESLint during builds, added cdn.sei.io remote image pattern
globals.css Migrated from @tailwind directives to @import "tailwindcss" + @theme
tailwind.config.js Emptied; custom theme values moved to CSS
providers.tsx Custom seiDevnet definition, mainnet default, double-quote style alignment
shell.tsx Replaced <img> with <Image>, double-quote style alignment
.env.example Updated comment to reflect mainnet default
README.md Updated install/dev commands to use Bun
.eslintrc.json Emptied (ESLint replaced by Biome)
.rsyncignore Removed .yarn/ and yarn.lock entries
Comments suppressed due to low confidence (1)

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

  • The getSelectedChain function is defined inside the Providers component but reads only from process.env.NEXT_PUBLIC_CHAIN, which is a build-time constant (inlined by Next.js at build time and never changes at runtime). Defining and calling this function inside the component means it is recreated on every render, and the useMemo dependency on chain — which always resolves to the same module-level object — adds unnecessary overhead. Consider moving getSelectedChain (and the chain constant it produces) to module level, similar to how queryClient and connectors are already defined at module level.
	const getSelectedChain = () => {
		const chainName = process.env.NEXT_PUBLIC_CHAIN || "mainnet";
		switch (chainName.toLowerCase()) {
			case "testnet":
				return seiTestnet;
			case "devnet":
				return seiDevnet;
			default:
				return sei;
		}
	};

	const chain = getSelectedChain();

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.69%. Comparing base (184d715) to head (7536762).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #309   +/-   ##
=======================================
  Coverage   79.69%   79.69%           
=======================================
  Files          83       83           
  Lines        1305     1305           
  Branches      158      215   +57     
=======================================
  Hits         1040     1040           
+ Misses        265      259    -6     
- Partials        0        6    +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Improve runtime defaults for create-sei's Next.js template and update Biome settings. Add a .changeset for a patch release.

Changes include:
- .env.example: clarify default chain behavior and example override (testnet).
- biome.json: include *.json and *.md in includes and add ignore patterns (node_modules, dist, .next, .yarn).
- Template adjustments: add a prebuild Biome check and include Biome in devDependencies; configure Next.js to allow Sei CDN images and skip ESLint during builds; update provider/shell setup and template docs/configs (README, Tailwind v4 config).

These updates align the template with current defaults and improve developer/runtime experience.
@codebycarson codebycarson marked this pull request as ready for review March 9, 2026 18:54
@codebycarson codebycarson requested a review from besated March 9, 2026 19:00
@codebycarson codebycarson merged commit 9168186 into main Mar 9, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants