π A modern, production-ready full-stack boilerplate for building scalable web applications
wavelet is a generic, production-ready full-stack boilerplate built with Go (Gin + GORM) on the backend and Next.js (App Router + Shadcn UI) on the frontend. It ships with everything you need to bootstrap a modern SaaS, internal tool, or developer platform β without the boilerplate headaches.
The project was designed from the ground up to be framework-first and business-agnostic: plug in your own domain logic while reusing the battle-tested infrastructure that comes out of the box.
- π Multi-auth System β Local password login/registration + pluggable OIDC/OAuth2 providers (supports multiple auth sources simultaneously)
- ποΈ Personal Access Tokens β API key management for programmatic access; supports
Authorization: BearerandX-Access-Tokenheaders - π€ User Management β Admin panel for listing, searching, filtering, enabling/disabling user accounts
- βοΈ Dynamic System Config β Key-value system configuration management with live reload, controllable from the admin UI
- π Async Task Queue β Background job processing with Asynq (Redis-backed), including a scheduling dashboard
- π S3 File Storage β Unified file upload/download via S3-compatible APIs with local disk cache
- π Observability β Structured logging (Zap) + distributed tracing (OpenTelemetry)
- π¨ Modern UI β Responsive, dark-mode-ready design system built with Tailwind CSS 4 and Shadcn UI
- π Built-in Documentation β Integrated docs portal with usage guides, API reference, privacy policy, and terms of service
βββββββββββββββββββ βββββββββββββββββββββββββββββββ βββββββββββββββββββ
β Frontend β β Backend β β Database β
β (Next.js) βββββΊβ (Go) βββββΊβ (PostgreSQL) β
β β β β β β
β β’ React 19 β β β’ Gin HTTP Framework β β β’ PostgreSQL β
β β’ TypeScript β β β’ GORM ORM β β β’ Redis Cache β
β β’ Tailwind 4 β β β’ Multi-provider Auth β β β
β β’ Shadcn UI β β β’ AccessToken Middleware β β β
β β β β’ Asynq Task Queue β β β
β β β β’ OpenTelemetry Tracing β β β
β β β β’ Swagger API Docs β β β
βββββββββββββββββββ βββββββββββββββββββββββββββββββ βββββββββββββββββββ
β
ββββββββββββ΄βββββββββββ
β Multi-Process CLI β
β (Cobra + Viper) β
β β’ api (HTTP) β
β β’ worker (Queue) β
β β’ scheduler(Cron) β
βββββββββββββββββββββββ
- Go 1.25+ β Primary language
- Gin β HTTP web framework
- GORM β ORM with PostgreSQL & ClickHouse support
- Redis β Cache, session store, and task queue backend
- Asynq β Distributed task queue (Redis-backed)
- Cobra + Viper β CLI entrypoint and configuration management
- OpenTelemetry β Distributed tracing and observability
- Zap β Structured, high-performance logging
- Swagger (Swaggo) β Auto-generated API documentation
- AWS SDK v2 β S3-compatible file storage
- Snowflake β Distributed ID generation
- Next.js 16 β React framework with App Router
- React 19 β UI library
- TypeScript β Type safety
- Tailwind CSS 4 β Utility-first styling
- Shadcn UI β Accessible, composable component library
- Lucide Icons β Icon library
- Go >= 1.25
- Node.js >= 18.0
- PostgreSQL >= 14
- Redis >= 6.0
- pnpm >= 8.0 (recommended)
git clone https://github.com/Rain-kl/Wavelet.git refreshing
cd refreshingcp config.example.yaml config.yamlEdit config.yaml to configure your database and Redis. OIDC auth sources are configured at runtime in the admin settings page.
# Start local dependencies (PostgreSQL + Redis)
docker compose up -d
# Optional: also start ClickHouse
docker compose --profile clickhouse up -d
# If you use an external PostgreSQL instance instead of Docker, create the database manually
createdb -h <host> -p 5432 -U postgres refreshing
# Database schema is auto-migrated on first startup# Install Go dependencies
go mod tidy
# Generate Swagger API documentation
make swagger
# Start the HTTP API server
go run main.go apiThe backend also supports separate
schedulerandworkerprocesses for async task processing:go run main.go scheduler # Cron job scheduler go run main.go worker # Asynq task worker
cd frontend
# Install dependencies
pnpm install
# Start dev server (Turbopack)
pnpm dev| Service | URL |
|---|---|
| Frontend | http://localhost:3000 |
| Swagger API Docs | http://localhost:8000/swagger/index.html |
| Health Check | http://localhost:8000/api/health |
Key configuration options (see config.example.yaml for the full reference):
| Option | Description | Example |
|---|---|---|
app.addr |
Backend listen address | :8000 |
database.host |
PostgreSQL host | 127.0.0.1 |
database.database |
Database name | refreshing |
redis.host |
Redis host | 127.0.0.1 |
storage.endpoint |
S3-compatible endpoint | s3.amazonaws.com |
# Run API server
go run main.go api
# Run task scheduler
go run main.go scheduler
# Run async worker
go run main.go worker
# Regenerate Swagger docs (required after controller changes)
make swagger
# Format & vet code
make tidycd frontend
# Development mode (Turbopack)
pnpm dev
# Production build
pnpm build
# Start production server
pnpm start
# Lint & format
pnpm lint
pnpm formatwavelet/
βββ main.go # Entry point (delegates to internal/cmd)
βββ config.example.yaml # Configuration template
βββ Makefile # Common commands (swagger, tidy, license, cross-build)
βββ docker/ # Docker image build files (integrated/frontend/backend)
βββ docs/ # Swagger auto-generated docs
βββ frontend/ # Next.js frontend application
β βββ app/ # App Router pages
β βββ components/ # React components (ui, common, layout)
β βββ lib/services/ # API service layer
β βββ types/ # TypeScript type definitions
βββ internal/ # Go backend (private)
βββ cmd/ # CLI commands (api, scheduler, worker)
βββ apps/ # Business modules (oauth, user, admin, upload)
βββ model/ # GORM entities and business methods
βββ router/ # HTTP route registration
βββ task/ # Async task definitions and workers
βββ db/ # Database and Redis initialization
βββ storage/ # S3 file storage abstraction
βββ common/ # Shared utilities and response helpers
Swagger API documentation is auto-generated and available once the backend is running:
http://localhost:8000/swagger/index.html
The built-in frontend docs portal at /docs includes:
- Usage Guide β Step-by-step walkthrough for getting started
- API Reference β Detailed interface documentation
- Privacy Policy β Template privacy policy (customize as needed)
- Terms of Service β Template terms of service
# Backend tests
go test ./...
# Frontend lint
cd frontend && pnpm lintBuild static binaries for all 6 targets (Linux / macOS / Windows Γ amd64 / arm64) with a single command. The compiled frontend is embedded in every binary β no separate deployment needed.
Prerequisites: Docker with BuildKit enabled (Docker 23+ defaults to on).
# Build all 6 binaries β ./bin/
make cross-build
# Stamp a release version
make cross-build VERSION=v1.2.3
# Build only a specific OS (both architectures)
make cross-build GOOS=linux
make cross-build GOOS=darwin
make cross-build GOOS=windows
# Build only a specific architecture (all OSes)
make cross-build GOARCH=amd64
make cross-build GOARCH=arm64
# Combine filters β single binary
make cross-build GOOS=linux GOARCH=arm64
make cross-build GOOS=darwin GOARCH=amd64 VERSION=v1.2.3Output files in ./bin/:
| File | Platform |
|---|---|
wavelet_linux_amd64 |
Linux x86-64 |
wavelet_linux_arm64 |
Linux ARM64 |
wavelet_darwin_amd64 |
macOS Intel |
wavelet_darwin_arm64 |
macOS Apple Silicon |
wavelet_windows_amd64.exe |
Windows x86-64 |
wavelet_windows_arm64.exe |
Windows ARM64 |
The version string is accessible at runtime via
wavelet --version.
# Build image
docker build -t refreshing .
# Run (pass your config as a volume mount)
docker run -d -p 8000:8000 \
-v $(pwd)/config.yaml:/app/config.yaml \
refreshing api-
Build the frontend:
cd frontend && pnpm build
-
Compile the backend:
go build -o refreshing main.go
-
Configure
config.yamlfor production. -
Start services:
./refreshing api # HTTP API ./refreshing scheduler # Cron scheduler (optional) ./refreshing worker # Task worker (optional)
We welcome contributions! Please read the following before submitting code:
- Fork the repository
- Create a feature branch (
git checkout -b feature/your-feature) - Commit your changes (
git commit -am 'Add your feature') - Push to the branch (
git push origin feature/your-feature) - Open a Pull Request
This project is licensed under the Apache 2.0 License.