A simple template application built with:
- Go with Echo framework
- PostgreSQL database
- pgx for database connection
- scany for query result scanning
- Goose for database migrations
- React with TypeScript
- Vite as build tool
- shadcn/ui components
- TanStack Router for routing
- Tailwind CSS for styling
- Zod for schema validation
- Zustand for state management
- Go 1.24+
- Node.js 18+
- PostgreSQL (or use Docker Compose)
- Start PostgreSQL with Docker Compose:
docker-compose up -d- Migrations:
Migations will applied automatically on server start.
- Install dependencies:
go mod tidy- Run the server:
go run cmd/main.go- Navigate to the web directory:
cd web- Install dependencies:
npm install- Build the frontend:
npm run build- Make sure PostgreSQL is running and migrations are applied
- Start the Go server:
go run cmd/main.go - Open your browser to
http://localhost:3001 - Initial credentials for the admin user are:
- Username:
admin - Password:
admin
- Username:
For development you can use the provided Taskfile to run tasks easily. Besure to have the following dependecies installed:
- Task
- wgo
- golangci-lint (optional, for linting)
For development, you can run the frontend and backend separately:
- Backend:
task run:server - Frontend:
task run:web
This allows hot reloading for the frontend while developing.