π Getting Started
SuperStack uses Docker, so make sure Docker is installed before you begin.
1. Get SuperStack
Option 1: Use the Template (Recommended)
The easiest way to get started:
Click Use this template
and create a new repository (e.g. myapp
) on GitHub.
Clone it to your machine:
git clone https://github.com/yourname/myapp.git
cd myapp
Option 2: Clone and Track Upstream (Advanced)
If you want to keep SuperStackβs Git history and pull upstream changes later, clone SuperStack:
git clone https://github.com/explodinglabs/superstack.git myapp
cd myapp
Create your own repo, then:
git remote rename origin upstream
git remote add origin https://github.com/yourname/myapp.git
git push -u origin main
You can now pull upstream changes with:
git pull upstream main
2. Configure Environment Variables
Copy the example environment file:
cp example.env .env
This .env
file is used to configure:
- Secrets β Passwords, keys, etc.
- Ports β Adjust the exposed ports (specifically, Caddy's) depending on environment or application (you may bring up multiple).
β οΈ Important: The .env file is for local development only. Never store real secrets in version control or production. Use CI/CD environment variables or a secrets manager instead.
3. Start the Stack
docker compose up -d
That's it β your backend is live.
You can now open http://localhost:8000/openapi/ to explore your API (assuming 8000 is your Caddy port).
π§© What Just Happened?
SuperStack automatically:
- Starts a fresh Postgres database
- Applies initial migrations
- Launches PostgREST and Swagger UI
- Serves everything through Caddy
flowchart TD
Caddy["Caddy (API Gateway)"]
Caddy --> Services["Services (PostgREST, Swagger UI + more)"]
Services --> Postgres
π‘ Only Caddy exposes a port β all services are routed through it.
Project Structure
π bin/ β Helper scripts (e.g. wrappers for CLI tools)
π caddy/ β Custom Caddy configuration and certificates
π docs/ β Markdown files for SuperStack documentation
π postgres/ β SQL migrations and configuration of the postgres container
π compose.yaml β Main Docker Compose config
π compose.override.yaml β Optional local overrides (development only)
π example.env β Example environment variables β copy to `.env`
π LICENSE β License file (MIT)
π logo.png β SuperStack logo for README/docs
π mkdocs.yml β MkDocs configuration for documentation site
π README.md β Overview and quick start for the repository
π Resetting
If you want to start fresh:
docker compose down --volumes
docker compose up -d
This will wipe your database and re-run all migrations from scratch.
β What's Next?
π Create your database schema with migrations
π Deploy to a remote environment