A full-stack SaaS boilerplate with Go backend, React frontend, and Go reverse proxy.
- Secure Login: JWT-based authentication (HS256).
- OTP Verification: Email-based One-Time Password verification for login.
- Password Management: Forgot password and reset password flows with secure email tokens.
- Role-Based Access Control (RBAC): Fine-grained permissions for Admin and User roles.
- Filtering: Advanced filtering with operators (equals, contains, greater than, etc.) via SQL-like query builder.
- Column Customization:
- Visibility: Toggle columns on/off.
- Reordering: Drag-and-drop column reordering.
- Resizing: Adjustable column widths.
- Persistence: User preferences (visibility, order, size) are saved to the database per user/table.
- Mass Actions: Multi-select support for bulk operations (e.g., Mass Delete).
- Export: Export selected or filtered data to Excel (
.xlsx).
- Tree Sidebar: Multi-level collapsible sidebar menu with active state highlighting.
- Responsive Design: Mobile-friendly layout with collapsible sidebar.
- Internationalization (i18n):
- Multi-language Support: Built-in support for Indonesian (
id) and English (en). - Easy Translation: JSON-based locale files.
- Multi-language Support: Built-in support for Indonesian (
- Background Jobs: Robust job queue system for async tasks with status monitoring.
- Email Templates: HTML email templates for polished communication (OTP, Reset Password).
- Docker Ready: Production-ready
Dockerfileanddocker-compose.yml.
| Layer | Technology |
|---|---|
| Backend | Go 1.24, Echo v4, GORM, PostgreSQL |
| Frontend | React 19, Vite 7, TypeScript, Tailwind CSS v4 |
| Proxy | Go reverse proxy with static file serving |
| Database | PostgreSQL with schema support |
| Auth | JWT (HS256) + OTP via email |
| SMTP with HTML templates |
boilerplate-saas-fullstack-go-react/
├── apps/
│ ├── backend/ # Go API server
│ ├── frontend/ # React SPA
│ └── reverse-proxy/ # Go reverse proxy
├── docker-compose.yml
├── .env.docker.example
├── architecture.md
└── codebase.md
- Go 1.24+
- Node.js 22+
- PostgreSQL 16+
Use the interactive generator to create a new SaaS application based on this boilerplate. This will generate a complete project with Go (Echo, GORM) backend and React (Vite, Tailwind) frontend, powered by Bun.
bun install
bun run generateFollow the prompts to configure:
- App Name: Human-readable name (e.g., "My SaaS")
- Backend Module Name: Go module name (e.g., "my-saas-backend")
- Backend Port: API server port (default: 3001)
- Frontend Port: Vite dev server port (default: 3002)
- Reverse Proxy Port: Unified entry point (default: 7777)
- Target Directory: Where to create the new project
The script will automatically:
- Copy the boilerplate files
- Rename the module in
go.modand imports - Update
docker-compose.yml,.env, andpackage.jsonwith your configuration - Update frontend title and vite config
-
Backend:
cd apps/backend cp .env.example .env # Edit .env with your database credentials go mod tidy go run .
-
Frontend:
cd apps/frontend cp .env.example .env bun install bun run dev -
Reverse Proxy (optional, for unified port):
cd apps/reverse-proxy cp .env.example .env go run .
Access at: http://localhost:7777
cp .env.docker.example .env.docker
# Edit .env.docker with your settings
docker compose up --buildAccess at: http://localhost:7777
| Method | Path | Auth | Description |
|---|---|---|---|
| POST | /api/auth/login |
No | Login |
| POST | /api/auth/verify-otp |
No | Verify OTP |
| POST | /api/auth/forgot-password |
No | Request password reset |
| POST | /api/auth/reset-password |
No | Reset password with token |
| GET | /api/auth/me |
Yes | Get current user |
| POST | /api/auth/change-password |
Yes | Change password |
| GET | /api/users |
Yes | List all users |
| GET | /api/users/:id |
Yes | Get user by ID |
| POST | /api/users |
Yes | Create user |
| PUT | /api/users/:id |
Yes | Update user |
| DELETE | /api/users/:id |
Yes | Deactivate user |
| GET | /api/table-settings/:module |
Yes | Get table settings |
| POST | /api/table-settings/:module |
Yes | Save table settings |
| DELETE | /api/table-settings/:module |
Yes | Delete table settings |
| GET | /api/background-jobs |
Yes | List all jobs |
| GET | /api/background-jobs/active |
Yes | List active jobs |
| GET | /api/background-jobs/:id |
Yes | Get job by ID |
| POST | /api/background-jobs/search |
Yes | Search jobs |
- Email:
[email protected] - Password:
admin123
⚠️ Change these in production viaADMIN_EMAILandADMIN_PASSWORDenvironment variables.
See .env.example files in each app directory and .env.docker.example at the root.