A full-stack starter kit built with Go and Vue 3, featuring a modern architecture with clean separation of concerns, authentication, and a responsive UI.
Check out the live demo: https://go-vue-starter-kit.fly.dev
OpenAPI Docs: https://go-vue-starter-kit.fly.dev/docs
- Clean Architecture with dependency injection using Uber FX
 - RESTful API with Echo framework
 - JWT Authentication with access and refresh tokens
 - Database Migrations with custom migration tool
 - Email Service with SMTP support
 - Internationalization (i18n) support
 - Request Validation with custom validators
 - Structured Logging with configurable levels
 - Health Check endpoints
 - OpenAPI Documentation support
 
- Vue 3 with Composition API
 - TypeScript for type safety
 - Vite for fast development and building
 - Vue Router for navigation
 - Pinia for state management
 - Vuetify for UI components
 - Responsive Design with modern layouts
 - Authentication Flow with token management
 - Error Handling with user-friendly messages
 
- Docker support with multi-stage builds
 - Docker Compose for local development
 - Makefile for common development tasks
 - Hot Reload for development
 
- Go 1.25+
 - Node.js 22+
 - PNPM (for frontend dependencies)
 - PostgreSQL
 - Docker (optional)
 
git clone https://github.com/akfaiz/go-vue-starter-kit.git
cd go-vue-starter-kitCopy the environment file and configure your settings:
cp .env.example .envUpdate the .env file with your configuration, especially database and SMTP settings.
Create a PostgreSQL database and run migrations:
# Install Go dependencies
go mod tidy
# Run database migrations
go run . migrate up# Navigate to UI directory
cd ui
# Install dependencies
pnpm install
# Build frontend assets
pnpm build
# Return to root directory
cd ..# Install frontend dependencies
make web-install
# Build frontend
make web-build
# Build backend with embedded frontend
make build-embed
# Run in production mode
make run# Run server in development mode
DEV=1 go run . serve
# Run database migrations
go run . migrate upcd ui
# Start development server
pnpm dev
# Build for production
pnpm build
# Preview production build
pnpm preview# Start all services
docker-compose up
# Start in detached mode
docker-compose up -d
# View logs
docker-compose logs -f
# Stop services
docker-compose down# Build the image
docker build -t go-vue-starter-kit .
# Run the container
docker run -p 3000:3000 --env-file .env go-vue-starter-kit.
βββ cmd/                    # CLI commands
β   βββ root.go
β   βββ migrate/           # Database migration command
β   βββ serve/             # Server command
βββ internal/              # Private application code
β   βββ config/           # Configuration management
β   βββ db/               # Database connection
β   βββ delivery/         # Delivery layer (HTTP)
β   β   βββ http/
β   β       βββ handler/  # HTTP handlers
β   β       βββ middleware/ # HTTP middleware
β   β       βββ routes/   # Route definitions
β   βββ domain/           # Business domain interfaces
β   βββ hash/             # Hashing utilities
β   βββ lang/             # Internationalization
β   βββ model/            # Data models
β   βββ provider/         # External service providers (e.g., SMTP)
β   βββ repository/       # Data access layer
β   βββ service/          # Business logic layer
β   βββ validator/        # Request validation
βββ ui/                   # Vue.js frontend
β   βββ src/
β   β   βββ components/   # Vue components
β   β   βββ layouts/      # Layout components
β   β   βββ pages/        # Page components
β   β   βββ services/     # API services
β   β   βββ stores/       # Pinia stores
β   β   βββ utils/        # Utility functions
β   βββ public/           # Static assets
βββ web/                  # Embedded web assets
βββ db/                   # Database migrations
βββ pkg/                  # Public packages
βββ docker-compose.yml    # Docker Compose configuration
βββ Dockerfile           # Docker build configuration
βββ Makefile            # Development automation
βββ main.go             # Application entry point
go run . serve              # Start the server
go run . migrate up         # Run database migrationsmake dev                    # Run in development mode
make run                    # Run in production mode
make build                  # Build the application
make build-embed           # Build with embedded frontend
make web-install           # Install frontend dependencies
make web-build             # Build frontend
make clean                 # Clean build artifactspnpm dev                   # Start development server
pnpm build                 # Build for production
pnpm preview              # Preview production build
pnpm typecheck            # Run TypeScript type checking
pnpm lint                 # Run ESLintThe application uses JWT-based authentication with:
- Access tokens (short-lived, 15 minutes)
 - Refresh tokens (long-lived, 7 days)
 - Automatic token refresh on the frontend
 - Secure token storage in HTTP-only cookies
 
# Run Go tests
go test ./...
# Run frontend tests
cd ui && pnpm test- Fork the repository
 - Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
 
If you have any questions or need help, please open an issue on GitHub.