Skip to content

Commit 5f507a3

Browse files
authored
refactor: migrate to ShadCN UI, TanStack Router, Bun runtime (#2075)
1 parent 95c3e61 commit 5f507a3

File tree

189 files changed

+9816
-15885
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

189 files changed

+9816
-15885
lines changed

.env

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ APP_ENV=local
1010
APP_NAME=Acme Co.
1111
APP_HOSTNAME=localhost
1212
APP_ORIGIN=http://localhost:5173
13-
API_ORIGIN=https://api-mcfytwakla-uc.a.run.app
13+
API_ORIGIN=http://localhost:8787
1414
APP_STORAGE_BUCKET=example.com
1515

1616
# Google Cloud
@@ -20,12 +20,6 @@ GOOGLE_CLOUD_REGION=us-central1
2020
GOOGLE_CLOUD_DATABASE="(default)"
2121
GOOGLE_CLOUD_CREDENTIALS={"type":"service_account","project_id":"example","private_key_id":"xxx","private_key":"-----BEGIN PRIVATE KEY-----\nxxxxx\n-----END PRIVATE KEY-----\n","client_email":"application@exmaple.iam.gserviceaccount.com","client_id":"xxxxx","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_x509_cert_url":"https://www.googleapis.com/robot/v1/metadata/x509/application%40example.iam.gserviceaccount.com"}
2222

23-
# Firebase
24-
# https://console.firebase.google.com/
25-
FIREBASE_APP_ID=1:736557952746:web:b5ee23841e24c0b883b193
26-
FIREBASE_API_KEY=AIzaSyAZDmdeRWvlYgZpwm6LBCkYJM6ySIMF2Hw
27-
FIREBASE_AUTH_DOMAIN=kriasoft.web.app
28-
2923
# OpenAI
3024
# https://platform.openai.com/
3125
OPENAI_ORGANIZATION=xxxxx
@@ -47,3 +41,8 @@ GA_MEASUREMENT_ID=G-XXXXXXXX
4741
# https://app.sendgrid.com/settings/api_keys
4842
SENDGRID_API_KEY=xxxxx
4943
FROM_EMAIL=hello@example.com
44+
45+
# Algolia Search
46+
# https://dashboard.algolia.com/account/api-keys/all
47+
ALGOLIA_APP_ID=xxxxx
48+
ALGOLIA_ADMIN_API_KEY=xxxxx

.eslintrc.cjs

Lines changed: 0 additions & 81 deletions
This file was deleted.

.github/copilot-instructions.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
## Introduction
2+
3+
This repository, named React Starter Kit, is a boilerplate for building web applications using Bun, TypeScript, and React. It is designed to be a starting point for developers who want to create modern web applications with a focus on performance, simplicity, and best practices.
4+
5+
## Project Structure
6+
7+
- `app` - Front-end code built with React and TypeScript.
8+
- `server` - Back-end server built with Bun and Hono.
9+
- `modules/ai` - AI related modules.
10+
- `modules/ws` - WebSocket router, types, etc.
11+
- `modules/*` - Other server modules.
12+
- `api` - API routes for the server using Hono
13+
- `ws` - WebSocket routes for the server using `WebSocketRouter`.
14+
- `packages/*` - Shared packages and libraries.
15+
- `scripts` - Development and build scripts.
16+
17+
## Coding Style
18+
19+
- Use functional programming principles.
20+
- Follow existing code style and conventions.
21+
- Use modern TypeScript features.
22+
- Avoid outdated coding patterns, e.g. using `_` for private variables.
23+
- Use Bun/Hono features and idioms, for example pub-sub for WebSocket.

.github/workflows/main.yml

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ on:
2121
required: true
2222

2323
env:
24-
NODE_VERSION: 20.5.x
24+
BUN_VERSION: latest
2525
VERSION: ${{ github.event.pull_request.number }}
2626
HUSKY: 0
2727

@@ -32,24 +32,25 @@ jobs:
3232
steps:
3333
- uses: actions/checkout@v4
3434

35-
# Configure Node.js and install NPM dependencies
36-
- uses: actions/setup-node@v4
37-
with: { node-version: "${{ env.NODE_VERSION }}", cache: "yarn" }
38-
- run: yarn install
35+
# Configure Bun and install dependencies
36+
- uses: oven-sh/setup-bun@v2
37+
with:
38+
bun-version: ${{ env.BUN_VERSION }}
39+
- run: bun install
3940

4041
# Analyze code for potential problems
41-
- run: yarn prettier --check .
42+
- run: bun prettier --check .
4243
if: ${{ github.event_name == 'pull_request' }}
43-
- run: yarn lint
44+
- run: bun lint
4445
if: ${{ github.event_name == 'pull_request' }}
45-
- run: yarn tsc --build
46-
- run: yarn workspace app test
46+
- run: bun tsc --build
47+
- run: bun --filter app test
4748
if: ${{ github.event_name == 'pull_request' }}
48-
# - run: yarn workspace edge test
49+
# - run: bun --filter edge test
4950
# if: ${{ github.event_name == 'pull_request' }}
5051

5152
# Compile and save build artifacts
52-
- run: yarn build
53+
- run: bun build
5354
- uses: actions/upload-artifact@v4
5455
with: { name: "build", path: "app/dist\nedge/dist\n" }
5556

@@ -62,10 +63,11 @@ jobs:
6263
url: ${{ inputs.environment == 'prod' && 'https://example.com' || format('https://{0}.example.com', inputs.environment || 'test') }}
6364
steps:
6465
- uses: actions/checkout@v4
65-
- uses: actions/setup-node@v4
66-
with: { node-version: "${{ env.NODE_VERSION }}", cache: "yarn" }
67-
- run: yarn install
66+
- uses: oven-sh/setup-bun@v2
67+
with:
68+
bun-version: ${{ env.BUN_VERSION }}
69+
- run: bun install
6870
- uses: actions/download-artifact@v4
6971
with: { name: "build" }
70-
- run: yarn workspace edge deploy --env=${{ inputs.environment || 'test' }}
72+
- run: bun --filter edge deploy --env=${{ inputs.environment || 'test' }}
7173
if: ${{ false }}

.gitignore

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,17 @@
44
# Compiled output
55
/*/dist/
66

7-
# Yarn package manager with PnP
8-
# https://yarnpkg.com/getting-started/qa/#which-files-should-be-gitignored
9-
.pnp.*
10-
.yarn/*
11-
!.yarn/patches
12-
!.yarn/plugins
13-
!.yarn/releases
14-
!.yarn/sdks
15-
!.yarn/versions
7+
# Bun package manager
8+
# https://bun.sh/docs/install/lockfile
169
node_modules
10+
bun.lockb
1711

1812
# Logs
19-
yarn-debug.log*
20-
yarn-error.log*
13+
*.log
2114

2215
# Cache
2316
/.cache
17+
/*/.swc/
2418
.eslintcache
2519

2620
# Testing
@@ -34,15 +28,26 @@ yarn-error.log*
3428
# Visual Studio Code
3529
# https://github.com/github/gitignore/blob/master/Global/VisualStudioCode.gitignore
3630
.vscode/*
31+
!.vscode/extensions.json
32+
!.vscode/launch.json
33+
!.vscode/mcp.json
3734
!.vscode/settings.json
3835
!.vscode/tasks.json
39-
!.vscode/launch.json
40-
!.vscode/extensions.json
41-
!.vscode/react.code-snippets
4236

4337
# WebStorm
4438
.idea
4539

40+
# Wrangler CLI
41+
# https://developers.cloudflare.com/workers/wrangler/
42+
.wrangler/
43+
wrangler.toml.backup
44+
45+
# TanStack Router
46+
# Generated route tree files should not be committed
47+
*/lib/routeTree.gen.ts
48+
*/.tanstack/
49+
4650
# macOS
4751
# https://github.com/github/gitignore/blob/master/Global/macOS.gitignore
4852
.DS_Store
53+

.husky/pre-commit

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
#!/usr/bin/env sh
2-
. "$(dirname -- "$0")/_/husky.sh"
3-
4-
yarn prettier --check .
5-
yarn lint
6-
yarn tsc --build
1+
bun test

.prettierignore

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
# Compiled & generated output
2-
/*/dist/
32
/app/queries/
3+
/*/dist/
4+
/**/*.generated.ts
45

56
# Cache
67
/.cache
78

8-
# Yarn
9-
/.yarn
10-
/.pnp.*
9+
# Bun and Node.js modules
10+
/node_modules
11+
/bun.lock
1112

1213
# TypeScript
1314
/tsconfig.base.json

.vscode/extensions.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"graphql.vscode-graphql",
1111
"mikestead.dotenv",
1212
"streetsidesoftware.code-spell-checker",
13-
"vscode-icons-team.vscode-icons",
14-
"zixuanchen.vitest-explorer"
13+
"vscode-icons-team.vscode-icons"
1514
]
1615
}

.vscode/mcp.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"servers": {
3+
"github": {
4+
"type": "http",
5+
"url": "https://api.githubcopilot.com/mcp/"
6+
}
7+
}
8+
}

.vscode/react.code-snippets

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)