Skip to content

Commit 1c936fa

Browse files
authored
feat: split marketing site & main app with Astro integration (#2098)
1 parent 93bb989 commit 1c936fa

Some content is hidden

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

62 files changed

+3893
-946
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ override.tf.json
5656
.terraformrc
5757
terraform.rc
5858

59+
# Astro
60+
.astro/
61+
5962
# TanStack Router
6063
# Generated route tree files should not be committed
6164
*/lib/routeTree.gen.ts

.vscode/extensions.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"recommendations": [
33
"anthropic.claude-code",
4+
"astro-build.vscode-astro",
45
"bradlc.vscode-tailwindcss",
56
"dbaeumer.vscode-eslint",
67
"dbcode.dbcode",

CLAUDE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ Full-stack React application template optimized for Cloudflare Workers deploymen
44

55
## Monorepo Structure
66

7-
- `apps/web/` - React 19 frontend (Vite, TanStack Router, Jotai, ShadCN UI, Tailwind CSS v4)
7+
- `apps/web/` - React 19 frontend (Vite, TanStack Router, Jotai, shadcn/ui, Tailwind CSS v4)
88
- `apps/api/` - tRPC API server
99
- `apps/edge/` - Cloudflare Workers edge deployment
1010
- `packages/core/` - Shared core utilities and WebSocket functionality
11-
- `packages/ui/` - Shared UI components and ShadCN management scripts
11+
- `packages/ui/` - Shared UI components and shadcn/ui management scripts
1212
- `db/` - Drizzle ORM schemas and migrations
1313
- `infra/` - Terraform infrastructure configuration
1414
- `docs/` - VitePress documentation site
@@ -17,7 +17,7 @@ Full-stack React application template optimized for Cloudflare Workers deploymen
1717
## Tech Stack
1818

1919
- **Runtime:** Bun (>=1.2.0), TypeScript 5.8
20-
- **Frontend:** React 19, TanStack Router, Jotai, ShadCN UI, Tailwind CSS v4, Better Auth
20+
- **Frontend:** React 19, TanStack Router, Jotai, shadcn/ui, Tailwind CSS v4, Better Auth
2121
- **Backend:** Hono framework, tRPC
2222
- **Database:** Neon PostgreSQL, Drizzle ORM
2323
- **Testing:** Vitest, Happy DOM
@@ -45,7 +45,7 @@ bun test:api # Test API (shortcut)
4545
bun test:edge # Test edge (shortcut)
4646

4747
# UI Components
48-
bun ui:add <component> # Add ShadCN component
48+
bun ui:add <component> # Add shadcn/ui component
4949
bun ui:list # List installed components
5050
bun ui:update # Update all components
5151
bun ui:essentials # Install essential components

README.md

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<a href="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/kriasoft/react-starter-kit?sponsor=1"><img src="https://img.shields.io/badge/-GitHub-%23555.svg?logo=github-sponsors" height="20"></a>
44
<a href="https://discord.gg/2nKEnKq"><img src="https://img.shields.io/discord/643523529131950086?label=Chat" height="20"></a>
55
<a href="https://github.com/kriasoft/react-starter-kit/stargazers"><img src="https://img.shields.io/github/stars/kriasoft/react-starter-kit.svg?style=social&label=Star&maxAge=3600" height="20"></a>
6-
<a href="https://twitter.com/koistya"><img src="https://img.shields.io/twitter/follow/koistya.svg?style=social&label=Follow&maxAge=3600" height="20"></a>
6+
<a href="https://x.com/ReactStarter"><img src="https://img.shields.io/twitter/follow/ReactStarter.svg?style=social&label=Follow&maxAge=3600" height="20"></a>
77

88
Building modern web applications shouldn't require weeks of configuration hell. This React Starter Kit eliminates the tedious setup work so you can focus on what matters: shipping great products.
99

@@ -29,16 +29,17 @@ Be sure to join our [Discord channel](https://discord.gg/2nKEnKq) for assistance
2929

3030
This starter kit uses a thoughtfully organized monorepo structure that promotes code reuse and maintainability:
3131

32-
- [`apps/web/`](./apps/web) — React frontend with Vite, TanStack Router, and Tailwind CSS
32+
- [`apps/app/`](./apps/app) — React 19 application with TanStack Router, Jotai, and Tailwind CSS v4
33+
- [`apps/web/`](./apps/web) — Astro marketing website for static site generation
3334
- [`apps/api/`](./apps/api) — tRPC API server powered by Hono framework
3435
- [`apps/edge/`](./apps/edge) — Cloudflare Workers entry point for edge deployment
3536
- [`packages/core/`](./packages/core) — Shared TypeScript types and utilities
37+
- [`packages/ui/`](./packages/ui) — Shared UI components with shadcn/ui management utilities
3638
- [`packages/ws-protocol/`](./packages/ws-protocol) — WebSocket protocol template with type-safe messaging
3739
- [`db/`](./db) — Database schemas, migrations, and seed data
3840
- [`docs/`](./docs) — VitePress documentation site
3941
- [`infra/`](./infra) — Terraform infrastructure configurations for multi-environment deployment
4042
- [`scripts/`](./scripts) — Build automation and development tools
41-
- [`packages/ui/`](./packages/ui) — Shared UI components with ShadCN management utilities
4243

4344
**Why Monorepo?** This structure enables seamless code sharing between frontend and backend, ensures type consistency across your entire stack, and simplifies dependency management. When you update a type definition, both client and server stay in sync automatically.
4445

@@ -59,26 +60,27 @@ This starter kit uses a thoughtfully organized monorepo structure that promotes
5960
- [Bun](https://bun.sh/) — Lightning-fast JavaScript runtime and package manager
6061
- [Cloudflare Workers](https://workers.cloudflare.com/) — Edge computing platform
6162

62-
**Frontend & UI**
63+
### Frontend & UI
6364

6465
- [React 19](https://react.dev/) — Latest React with concurrent features
6566
- [TanStack Router](https://tanstack.com/router) — Type-safe routing with data loading
6667
- [Tailwind CSS v4](https://tailwindcss.com/) — Utility-first CSS framework
67-
- [ShadCN UI](https://ui.shadcn.com/) — Beautiful, accessible components
68+
- [shadcn/ui](https://ui.shadcn.com/) — Beautiful, accessible components
6869
- [Jotai](https://jotai.org/) — Atomic state management
70+
- [Astro](https://astro.build/) — Static site generator for marketing pages
6971

70-
**Backend & API**
72+
### Backend & API
7173

72-
- [Hono](https://hono.dev/)Ultrafast web framework for the edge
74+
- [Hono](https://hono.dev/)Ultra-fast web framework for the edge
7375
- [tRPC](https://trpc.io/) — End-to-end type safety for APIs
7476
- [Better Auth](https://www.better-auth.com/) — Modern authentication solution
7577

76-
**Database & ORM**
78+
### Database & ORM
7779

7880
- [Drizzle ORM](https://orm.drizzle.team/) — TypeScript ORM with excellent DX
7981
- [Neon PostgreSQL](https://neon.tech/) — Serverless PostgreSQL database
8082

81-
**Development Tools**
83+
### Development Tools
8284

8385
- [Vite](https://vitejs.dev/) — Next-generation frontend tooling
8486
- [Vitest](https://vitest.dev/) — Blazing fast unit testing
@@ -117,10 +119,10 @@ Update environment variables in [`.env`](./.env) and `.env.local` files as well
117119

118120
Open two terminals and run these commands:
119121

120-
**Terminal 1 - Frontend:**
122+
**Terminal 1 - Application (React):**
121123

122124
```bash
123-
bun --filter @repo/web dev
125+
bun --filter @repo/app dev
124126
```
125127

126128
**Terminal 2 - Backend:**
@@ -130,6 +132,12 @@ bun --filter @repo/edge build --watch
130132
bun wrangler dev
131133
```
132134

135+
For the marketing website:
136+
137+
```bash
138+
bun --filter @repo/web dev
139+
```
140+
133141
### 5. Initialize Database
134142

135143
```bash
@@ -138,7 +146,7 @@ bun --filter @repo/db migrate
138146
bun --filter @repo/db seed # Optional: add sample data
139147
```
140148

141-
Open <http://localhost:5173> to see your app running. The backend API will be available at the port shown by `wrangler dev` (typically 8787).
149+
Open <http://localhost:5173> to see your React app running. The marketing website runs on <http://localhost:4321>. The backend API will be available at the port shown by `wrangler dev` (typically 8787).
142150

143151
## Production Deployment
144152

@@ -156,6 +164,7 @@ bun wrangler secret put OPENAI_API_KEY --env=production
156164

157165
```bash
158166
# Build all packages
167+
bun --filter @repo/app build
159168
bun --filter @repo/web build
160169
bun --filter @repo/edge build
161170

@@ -167,7 +176,7 @@ Your application will be live on your Cloudflare Workers domain within seconds.
167176

168177
## Contributors 👨‍💻
169178

170-
<a href="https://reactstarter.com/c/1"><img src="https://reactstarter.com/c/1.png" height="60" /></a>&nbsp;&nbsp;<a href="https://reactstarter.com/c/2"><img src="https://reactstarter.com/c/2.png" height="60" /></a>&nbsp;&nbsp;<a href="https://reactstarter.com/c/3"><img src="https://reactstarter.com/c/3.png" height="60" /></a>&nbsp;&nbsp;<a href="https://reactstarter.com/c/4"><img src="https://reactstarter.com/c/4.png" height="60" /></a>&nbsp;&nbsp;<a href="https://reactstarter.com/c/5"><img src="https://reactstarter.com/c/5.png" height="60" /></a>&nbsp;&nbsp;<a href="https://reactstarter.com/c/6"><img src="https://reactstarter.com/c/6.png" height="60" /></a>&nbsp;&nbsp;<a href="https://reactstarter.com/c/7"><img src="https://reactstarter.com/c/7.png" height="60" /></a>&nbsp;&nbsp;<a href="https://reactstarter.com/c/8"><img src="https://reactstarter.com/c/8.png" height="60" /></a>
179+
<a href="https://reactstarter.com/c/1"><img src="https://reactstarter.com/c/1.png" height="60" /></a>&nbsp;&nbsp;<a href="https://reactstarter.com/c/2"><img src="https://reactstarter.com/c/2.png" height="60" /></a>&nbsp;&nbsp;<a href="https://reactstarter.com/c/3"><img src="https://reactstarter.com/c/3.png" height="60" /></a>&nbsp;&nbsp;<a href="https://reactstarter.com/c/4"><img src="https://reactstarter.com/c/4.png" height="60" /></a>&nbsp;&nbsp;<a href="https://reactstarter.com/c/5"><img src="https://reactstarter.com/c/5.png" height="60" /></a>&nbsp;&nbsp;<a href="https://reactstarter.com/c/6"><img src="https://reactstarter.com/c/6.png" height="60" /></a>&nbsp;&nbsp;<a href="https://reactstarter.com/c/7"><img src="https://reactstarter.com/c/7.png" height="60" /></a>&nbsp;&nbsp;<a href="https://reactstarter.com/c/8"><img src="https://reactstarter.com/c/8.png" height="60" /></a>&nbsp;&nbsp;<a href="https://reactstarter.com/c/9"><img src="https://reactstarter.com/c/9.png" height="60" /></a>&nbsp;&nbsp;<a href="https://reactstarter.com/c/10"><img src="https://reactstarter.com/c/10.png" height="60" /></a>&nbsp;&nbsp;<a href="https://reactstarter.com/c/11"><img src="https://reactstarter.com/c/11.png" height="60" /></a>&nbsp;&nbsp;<a href="https://reactstarter.com/c/12"><img src="https://reactstarter.com/c/12.png" height="60" /></a>&nbsp;&nbsp;<a href="https://reactstarter.com/c/13"><img src="https://reactstarter.com/c/13.png" height="60" /></a>
171180

172181
## Backers 💰
173182

apps/api/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"typecheck": "tsc --noEmit"
1616
},
1717
"dependencies": {
18-
"@ai-sdk/openai": "^2.0.6",
18+
"@ai-sdk/openai": "^2.0.8",
1919
"@repo/core": "workspace:*",
2020
"@repo/db": "workspace:*",
2121
"@trpc/server": "^11.4.4",
@@ -27,15 +27,15 @@
2727
},
2828
"peerDependencies": {
2929
"hono": "^4.9.0",
30-
"zod": "^4.0.15"
30+
"zod": "^4.0.17"
3131
},
3232
"devDependencies": {
33-
"@cloudflare/workers-types": "^4.20250807.0",
33+
"@cloudflare/workers-types": "^4.20250809.0",
3434
"@repo/typescript-config": "workspace:*",
3535
"@types/bun": "^1.2.19",
3636
"hono": "^4.9.0",
3737
"typescript": "~5.9.2",
3838
"vitest": "~3.2.4",
39-
"zod": "^4.0.15"
39+
"zod": "^4.0.17"
4040
}
4141
}

apps/web/CLAUDE.md renamed to apps/app/CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Tech Stack
22

3-
React 19, TypeScript, Vite, TanStack Router, ShadCN UI, Tailwind CSS v4, Jotai, Better Auth.
3+
React 19, TypeScript, Vite, TanStack Router, shadcn/ui, Tailwind CSS v4, Jotai, Better Auth.
44

55
## Commands
66

0 commit comments

Comments
 (0)