Skip to main content

Go React Scaffold

A production-ready full-stack template combining Go + Echo backend, React + TypeScript frontend, and MongoDB — with authentication, middleware, and integrations built in.

Everything you need to start building

Skip the boilerplate and start with a proven foundation for full-stack applications.

Backend with Go

RESTful API built with Echo framework, JWT authentication, and MongoDB integration

Frontend with React

Modern React 18 + TypeScript + Vite setup with TailwindCSS for rapid UI development

Authentication

Secure JWT-based auth with bcrypt password hashing and HTTP-only cookies

Database Ready

MongoDB connection with Docker setup and ready-to-use CRUD utilities

Integrations

Optional Paypack payments, Telegram bot notifications, and Plunk email support

Developer Tools

Live reload with Air, Docker Compose for dependencies, and Make commands

Quick start

Get your development environment running in minutes.

1

Clone the repository

Start by cloning the template and navigating to the project directory.
git clone https://github.com/samueltuyizere/go-react-scaffold.git
cd go-react-scaffold
2

Start the backend

Configure environment variables and launch the Go backend with MongoDB.
cd backend
cp .env.example .env
make docker-run  # Start MongoDB
make run         # Start Go server on :8080
Make sure to set SESSION_KEY in your .env file for JWT signing.
3

Start the frontend

Install dependencies and run the React development server.
cd frontend
npm install
npm run dev      # Start Vite dev server on :5173
4

Test authentication

Register a new user and verify the authentication flow works.
curl -X POST http://localhost:8080/register \
  -H "Content-Type: application/json" \
  -d '{"email": "[email protected]", "password": "securepass"}'
{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "user": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "email": "[email protected]",
    "status": "pending"
  }
}

Tech stack

Modern, proven technologies that work well together.

Frontend

  • React 18 with TypeScript
  • Vite for fast builds and HMR
  • TailwindCSS for styling
  • ESLint with strict TypeScript rules

Backend

  • Go 1.23+ with Echo v4 framework
  • JWT authentication with bcrypt
  • MongoDB for data persistence
  • CORS, logging, and recovery middleware

Ready to build your application?

Follow the quickstart guide to get your development environment running in under 5 minutes.

Get Started Now

Build docs developers (and LLMs) love