A modern, production-ready starter template for building full-stack web applications with Go, React, TypeScript, and Vite.
- Clean architecture with separation of concerns
- SQLC for type-safe database queries
- Chi router for HTTP routing
- PostgreSQL database integration
- Docker support
- Environment configuration
- Structured logging
- Modern React with TypeScript
- Vite for fast development and building
- TailwindCSS for styling
- ESLint for code quality
- Docker support
- API proxy configuration
- Type-safe API calls
- Go 1.23.5 or later
- Node.js 18 or later
- PostgreSQL 15 or later
- Docker (optional)
-
Navigate to the backend directory:
cd backend -
Copy the environment file:
cp .env.example .env
-
Update the
.envfile with your database credentials -
Install dependencies:
go mod download
-
Generate SQLC code:
sqlc generate
-
Run the server:
go run cmd/server/main.go
-
Navigate to the frontend directory:
cd frontend -
Install dependencies:
npm install
-
Start the development server:
npm run dev
.
├── backend/
│ ├── cmd/ # Application entrypoints
│ ├── internal/ # Private application code
│ │ ├── db/ # Database models and queries
│ │ └── router/ # HTTP routing
│ ├── schema.sql # Database schema
│ └── query.sql # SQLC queries
└── frontend/
├── src/ # Source code
├── public/ # Static assets
└── index.html # Entry HTML file
- Backend API runs on
http://localhost:8080 - Frontend dev server runs on
http://localhost:5173 - API requests from frontend are automatically proxied to the backend
cd backend
go build -o server cmd/server/main.gocd frontend
npm run buildBoth frontend and backend include Dockerfile configurations for containerized deployment.
Feel free to submit issues and enhancement requests!
This project is licensed under the MIT License - see the LICENSE file for details.