COS20031_Hermes/
├── client/ # React + Vite frontend
│ ├── package.json
│ └── ...
├── server/ # Bun + Hono backend
│ ├── package.json
│ ├── index.ts
│ └── tsconfig.json
└── package.json # Root package for orchestration
bun install:allThis will install dependencies for root, client, and server.
bun start:allThis single command will start:
- Server on
http://localhost:3000(Bun + Fastify API) - Client on
http://localhost:5173(Vite React App)
bun install:all- Install all dependencies (root, client, server)bun start:all- Run both client and server concurrentlybun dev:client- Run only the clientbun dev:server- Run only the serverbun build- Build the client for productionbun lint- Lint the client code
bun dev- Start Vite dev server (port 5173)bun build- Build for productionbun lint- Run ESLint
bun dev- Start server with hot reload (port 3000)bun start- Start server without hot reload
cd client
bun add package-namecd server
bun add package-name- Client (Frontend):
http://localhost:5173 - Server (Backend API):
http://localhost:3000
GET /- API welcome message
- React 19
- Vite 7
- TypeScript
- Tailwind CSS 4
- React Router 7
- ShadCN UI Components
- Bun Runtime
- Fastify Web Framework
- TypeScript
- @fastify/cors
- PostgreSQL (Database)
The server uses PostgreSQL as the database. You need to configure the database connection in the server's .env file.
Suggested Download PGAdmin at: https://www.postgresql.org/download/
Create a file at server/.env with the following configuration:
# Database Configuration
DB_HOST="localhost"
DB_PORT=5432
DB_USER="your_postgres_username"
DB_PASSWORD="your_postgres_password"
DB_NAME="hermes_db"
# Server Configuration
PORT=3000
NODE_ENV="development"- DB_HOST: PostgreSQL server host (default:
localhost) - DB_PORT: PostgreSQL port (default:
5432) - DB_USER: Your PostgreSQL username
- DB_PASSWORD: Your PostgreSQL password
- DB_NAME: Database name for the Hermes application
- PORT: Server port (default:
3000) - NODE_ENV: Environment mode (
developmentorproduction)
Make sure PostgreSQL is installed and running on your machine before starting the server.
- Always use
bun start:allto run both servers simultaneously - The output is color-coded (blue for server, green for client)
- Each directory has its own
package.jsonfor isolated dependencies - Hot reload is enabled for both client and server during development