chore: unify dev setup with concurrently
Adds concurrently to start both the Vite frontend and Hono backend simultaneously in one terminal via the `bun run dev` command. Also updates documentation in README.md and CLAUDE.md to reflect the new development workflow.
This commit is contained in:
@@ -9,7 +9,8 @@ GearBox is a single-user web app for managing gear collections (bikepacking, sim
|
|||||||
## Commands
|
## Commands
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Development (run both in separate terminals)
|
# Development
|
||||||
|
bun run dev # Starts both Vite client (:5173) and Hono server (:3000) concurrently
|
||||||
bun run dev:client # Vite dev server on :5173 (proxies /api to :3000)
|
bun run dev:client # Vite dev server on :5173 (proxies /api to :3000)
|
||||||
bun run dev:server # Hono server on :3000 with hot reload
|
bun run dev:server # Hono server on :3000 with hot reload
|
||||||
|
|
||||||
|
|||||||
41
README.md
41
README.md
@@ -10,7 +10,7 @@ A single-user web app for managing gear collections (bikepacking, sim racing, et
|
|||||||
- Research threads for comparing candidates before buying
|
- Research threads for comparing candidates before buying
|
||||||
- Image uploads for items and candidates
|
- Image uploads for items and candidates
|
||||||
|
|
||||||
## Quick Start
|
## Quick Start (Docker)
|
||||||
|
|
||||||
### Docker Compose (recommended)
|
### Docker Compose (recommended)
|
||||||
|
|
||||||
@@ -81,3 +81,42 @@ docker compose up -d
|
|||||||
```
|
```
|
||||||
|
|
||||||
Database migrations run automatically on startup.
|
Database migrations run automatically on startup.
|
||||||
|
|
||||||
|
## Tech Stack
|
||||||
|
|
||||||
|
- **Runtime & Package Manager:** [Bun](https://bun.sh)
|
||||||
|
- **Frontend:** React 19, Vite, TanStack Router, TanStack Query, Tailwind CSS v4, Zustand
|
||||||
|
- **Backend:** Hono, Drizzle ORM, SQLite (`bun:sqlite`)
|
||||||
|
|
||||||
|
## Local Development Setup
|
||||||
|
|
||||||
|
### Prerequisites
|
||||||
|
|
||||||
|
You must have [Bun](https://bun.sh/) installed on your machine. Docker is not required for local development.
|
||||||
|
|
||||||
|
### Installation
|
||||||
|
|
||||||
|
1. Install all dependencies:
|
||||||
|
```bash
|
||||||
|
bun install
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Initialize the local SQLite database (`gearbox.db`):
|
||||||
|
```bash
|
||||||
|
bun run db:push
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Start the development servers:
|
||||||
|
```bash
|
||||||
|
bun run dev
|
||||||
|
```
|
||||||
|
This single command will start both the Vite frontend server (port `5173`) and the Hono backend server (port `3000`) concurrently.
|
||||||
|
|
||||||
|
Open [http://localhost:5173](http://localhost:5173) in your browser to view the app.
|
||||||
|
|
||||||
|
## Additional Commands
|
||||||
|
|
||||||
|
- `bun run build` — Build the production assets into `dist/client/`
|
||||||
|
- `bun test` — Run the test suite
|
||||||
|
- `bun run lint` — Check formatting and lint rules using Biome
|
||||||
|
- `bun run db:generate` — Generate Drizzle migrations after making schema changes
|
||||||
@@ -4,6 +4,7 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"dev": "concurrently -k -c \"blue,green\" -n \"server,client\" \"bun run dev:server\" \"bun run dev:client\"",
|
||||||
"dev:client": "vite",
|
"dev:client": "vite",
|
||||||
"dev:server": "bun --hot src/server/index.ts",
|
"dev:server": "bun --hot src/server/index.ts",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
@@ -23,6 +24,7 @@
|
|||||||
"@types/react-dom": "^19.2.3",
|
"@types/react-dom": "^19.2.3",
|
||||||
"@vitejs/plugin-react": "^6.0.1",
|
"@vitejs/plugin-react": "^6.0.1",
|
||||||
"better-sqlite3": "^12.8.0",
|
"better-sqlite3": "^12.8.0",
|
||||||
|
"concurrently": "^9.1.2",
|
||||||
"drizzle-kit": "^0.31.9",
|
"drizzle-kit": "^0.31.9",
|
||||||
"vite": "^8.0.0"
|
"vite": "^8.0.0"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user