joegasewicz / joegasewicz/leadstorefront

Map custom domains to user storefronts with Caddy

Open
#14 0 comments 0 reactions 0 assignees View on GitHub
api feature infra
Dominant language
Go
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

## Summary
Use Caddy to map incoming custom-domain requests to the correct user storefront.

## Context
Users will configure their own domain/nameservers to point at the platform API/public IP. Once traffic reaches the platform, Caddy should route the request to the user's storefront.

## Scope
- Design how custom domains are stored and resolved to storefronts.
- Configure Caddy routing for user-owned domains.
- Map incoming Host headers to the correct storefront target.
- Route matched domains to the user's storefront, such as the internal `/sites/:site_id` target or an equivalent storefront resolver.
- Support HTTPS certificate issuance for user domains where possible.
- Document the DNS/nameserver setup users must complete themselves.

## Acceptance Criteria
- A configured user domain resolves to the correct storefront.
- Unknown domains fail safely.
- Caddy can load or receive updated domain mappings from platform data/config.
- User-facing DNS setup instructions are documented.
- Certificate and reload behavior is documented.

Contributor guide

No contributing guide indexed for this repository

Research direction

No files, tests, or entry points are named. Start by tracing how platform data could resolve Host headers to the internal /sites/:site_id target, then review the Caddy routing and certificate requirements. Done means configured domains reach the correct storefront, unknown domains fail safely, mappings can update, and DNS, certificate, and reload behavior are documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend, infrastructure
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.