Skip to content

Commit ce24a9b

Browse files
committed
refactor: update routeTree and file routes for consistency; change import styles to use double quotes
fix: update installation commands in RouteComponent to use pnpm and vp feat: integrate FastResponse from srvx into global Response in server.ts chore: adjust auto-imports in types to use consistent formatting chore: remove bun types from tsconfig.json for cleaner type management fix: update nitro plugin import and configuration in vite.config.ts fix: remove unused bun-sqlite-dialect from advanced chunks database test
1 parent 87f1198 commit ce24a9b

14 files changed

Lines changed: 409 additions & 2556 deletions

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: 2
22

33
updates:
4-
- package-ecosystem: "bun"
4+
- package-ecosystem: "npm"
55
directory: "/"
66
schedule:
77
interval: "daily"

.github/workflows/build.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,16 @@ jobs:
1212
- name: Checkout code
1313
uses: actions/checkout@v4
1414

15-
- name: Setup Bun
16-
uses: oven-sh/setup-bun@v2
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v4
1717
with:
18-
bun-version: latest
18+
node-version: 22
19+
20+
- name: Setup pnpm
21+
uses: pnpm/action-setup@v4
1922

2023
- name: Install dependencies
21-
run: bun install
24+
run: pnpm install
2225

2326
- name: Build project
24-
run: bun run build
27+
run: pnpm build

AGENTS.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,24 @@ Core application code lives in `src/`. Use `src/routes/` for TanStack Router fil
66

77
## Build, Test, and Development Commands
88

9-
Use Bun for all local workflows:
10-
11-
- `bun dev`: start the Vite/TanStack Start dev server on port `3000`.
12-
- `bun build`: create a production build.
13-
- `bun typecheck`: run TypeScript checks for app and node configs.
14-
- `bun lint`: run `oxlint --fix` on the codebase.
15-
- `bun format`: format files with `oxfmt`.
16-
- `bun test`: run the Vitest suite.
17-
- `bun db:generate` / `bun db:migrate`: generate and apply Drizzle migrations.
9+
Use Vite+ (`vp`) for all local workflows:
10+
11+
- `vp dev --port 3000`: start the Vite/TanStack Start dev server on port `3000`.
12+
- `vp build`: create a production build.
13+
- `vp check`: format, lint, and type-check in one pass.
14+
- `vp lint --fix`: run Oxlint on the codebase.
15+
- `vp fmt`: format files with Oxfmt.
16+
- `vp test`: run the Vitest suite.
17+
- `pnpm db:generate` / `pnpm db:migrate`: generate and apply Drizzle migrations.
1818
- `docker-compose up -d`: start the local PostgreSQL service when needed.
1919

2020
## Coding Style & Naming Conventions
2121

22-
Write TypeScript with 2-space indentation, no semicolon style, and ESM imports, matching the existing codebase. Prefer `PascalCase` for React components, `camelCase` for hooks and utilities, and descriptive route filenames such as `index.tsx` and `__root.tsx`. Keep shared UI in `src/components/ui/`, app-wide providers in `src/components/providers/`, and avoid bypassing `src/core/utils/` for common helpers. Run `bun lint` and `bun format` before opening a PR.
22+
Write TypeScript with 2-space indentation, no semicolon style, and ESM imports, matching the existing codebase. Prefer `PascalCase` for React components, `camelCase` for hooks and utilities, and descriptive route filenames such as `index.tsx` and `__root.tsx`. Keep shared UI in `src/components/ui/`, app-wide providers in `src/components/providers/`, and avoid bypassing `src/core/utils/` for common helpers. Run `vp check` before opening a PR.
2323

2424
## Testing Guidelines
2525

26-
This repo uses Vitest with `happy-dom`. Name tests `*.test.ts` or `*.test.tsx`; place broad setup-style tests in `src/__tests__/` and keep feature-specific tests close to the code when practical. No coverage threshold is enforced in config, so contributors should add or update tests for new route logic, state transitions, and utility behavior. Run `bun test` locally before pushing.
26+
This repo uses Vitest with `happy-dom`. Name tests `*.test.ts` or `*.test.tsx`; place broad setup-style tests in `src/__tests__/` and keep feature-specific tests close to the code when practical. No coverage threshold is enforced in config, so contributors should add or update tests for new route logic, state transitions, and utility behavior. Run `vp test` locally before pushing.
2727

2828
## Commit & Pull Request Guidelines
2929

README.md

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 🚀 React Template
22

3-
A modern, high-performance full-stack React template powered by **Bun** and **TanStack Start**. Designed for developer experience, type-safety, and modularity.
3+
A modern, high-performance full-stack React template powered by **Vite+** and **TanStack Start**. Designed for developer experience, type-safety, and modularity.
44

55
## 📋 Overview
66

@@ -10,7 +10,7 @@ This template provides a solid foundation for building full-stack applications w
1010

1111
- ⚛️ **React 19**: Leveraging the latest React features and improvements.
1212
- 🚀 **TanStack Start**: Full-stack React framework with type-safe routing and SSR.
13-
-**Bun**: Ultra-fast runtime, package manager, and test runner.
13+
-**Vite+**: Unified toolchain for dev, build, lint, format, and test.
1414
- 🗄️ **Drizzle ORM**: Type-safe TypeScript ORM for PostgreSQL.
1515
- 🎨 **Tailwind CSS v4**: Utility-first styling with the latest engine.
1616
- 🧩 **Shadcn UI**: 50+ accessible UI components built on `@base-ui/react`.
@@ -20,14 +20,14 @@ This template provides a solid foundation for building full-stack applications w
2020

2121
### Prerequisites
2222

23-
- [Bun](https://bun.sh) installed on your machine.
23+
- [Node.js](https://nodejs.org) v22+ and [pnpm](https://pnpm.io) installed on your machine.
2424
- [Docker](https://www.docker.com/) (optional, for local PostgreSQL).
2525

2626
### Installation
2727

2828
```bash
2929
# Install dependencies
30-
bun install
30+
pnpm install
3131

3232
# Setup environment variables
3333
cp .env.example .env.local
@@ -41,13 +41,13 @@ cp .env.example .env.local
4141
docker-compose up -d
4242

4343
# Run migrations
44-
bun db:migrate
44+
pnpm db:migrate
4545
```
4646

4747
### Development
4848

4949
```bash
50-
bun dev
50+
vp dev
5151
```
5252

5353
Open [http://localhost:3000](http://localhost:3000) to see the application.
@@ -56,12 +56,11 @@ Open [http://localhost:3000](http://localhost:3000) to see the application.
5656

5757
| Technology | Category | Description |
5858
| -------------------------------------------- | --------- | ---------------------------------------------- |
59-
| [Bun](https://bun.sh) | Runtime | Fast all-in-one JavaScript runtime |
59+
| [Vite+](https://viteplus.dev) | Toolchain | Unified dev, build, lint, format, and test |
6060
| [React 19](https://react.dev) | Frontend | The library for web and native user interfaces |
6161
| [TanStack Start](https://tanstack.com/start) | Framework | Full-stack React framework |
6262
| [Tailwind CSS v4](https://tailwindcss.com) | Styling | Utility-first CSS framework |
6363
| [Drizzle ORM](https://orm.drizzle.team) | Database | TypeScript ORM for SQL databases |
64-
| [Vite](https://vitejs.dev) | Bundler | Next generation frontend tooling (Rolldown) |
6564

6665
## 📂 Project Structure
6766

@@ -85,17 +84,16 @@ Open [http://localhost:3000](http://localhost:3000) to see the application.
8584

8685
## 📜 Development Commands
8786

88-
| Command | Description |
89-
| ----------------- | -------------------------------------- |
90-
| `bun dev` | Start development server on port 3000 |
91-
| `bun build` | Build the application for production |
92-
| `bun typecheck` | Run TypeScript type checking |
93-
| `bun lint` | Lint code using oxlint |
94-
| `bun format` | Format code using oxfmt |
95-
| `bun test` | Run tests with Vitest |
96-
| `bun db:generate` | Generate Drizzle migrations |
97-
| `bun db:migrate` | Apply Drizzle migrations |
98-
| `bun up` | Update dependencies to latest versions |
87+
| Command | Description |
88+
| ------------------ | ------------------------------------- |
89+
| `vp dev` | Start development server on port 3000 |
90+
| `vp build` | Build the application for production |
91+
| `vp check` | Format, lint, and type-check |
92+
| `vp lint --fix` | Lint code using Oxlint |
93+
| `vp fmt` | Format code using Oxfmt |
94+
| `vp test` | Run tests with Vitest |
95+
| `pnpm db:generate` | Generate Drizzle migrations |
96+
| `pnpm db:migrate` | Apply Drizzle migrations |
9997

10098
## 🔐 Environment Variables
10199

drizzle.config.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
import { defineConfig } from "drizzle-kit";
22

3-
const getEnv = () => (typeof Bun !== "undefined" ? Bun.env : process.env);
4-
53
export default defineConfig({
64
schema: "./src/core/database/schema/index.ts",
75
out: "./drizzle",
86
dialect: "postgresql",
97
dbCredentials: {
10-
url: getEnv().DATABASE_URL!,
8+
url: process.env.DATABASE_URL!,
119
},
1210
});

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"embla-carousel-react": "^8.6.0",
3535
"input-otp": "^1.4.2",
3636
"next-themes": "^0.4.6",
37+
"nitro": "3.0.260311-beta",
3738
"pg": "^8.20.0",
3839
"pino": "^10.3.1",
3940
"pino-pretty": "^13.1.3",
@@ -43,6 +44,7 @@
4344
"react-resizable-panels": "2.1.7",
4445
"recharts": "2.15.4",
4546
"sonner": "^2.0.7",
47+
"srvx": "^0.11.15",
4648
"tailwind-merge": "^3.5.0",
4749
"vaul": "^1.1.2",
4850
"zod": "^4.3.6",
@@ -52,7 +54,6 @@
5254
"@iconify-json/mingcute": "^1.2.7",
5355
"@iconify-json/svg-spinners": "^1.2.4",
5456
"@tailwindcss/vite": "^4.2.2",
55-
"@tanstack/nitro-v2-vite-plugin": "^1.154.9",
5657
"@types/node": "^22.15.3",
5758
"@types/pg": "^8.20.0",
5859
"@types/react": "^19.2.14",

0 commit comments

Comments
 (0)