The project:

https://github.com/sslboard/VanitySSL

Created with OpenAI Codex by [email protected]

First the base of the project

One prompt I used to get started with some context

VanitySSL is a TLS proxy written in Go that helps SaaS companies offer vanity domains with TLS encryption. It receives traffic, uses SNI to determine the customer, obtains SSL certificates from LetsEncrypt or other ACME CAs, and serves as a reverse proxy with added Headers to identify the customer.

The idea: customers point CNAME status.company.com to app.saas.com which is running VanitySSL. It received the traffic, uses SNI, obtains certificates, proxies to backend.saas.com.

An internal API allows CRUD of customers: {customerId, domain name} Configuration is via Env Vars (backend address, database folder)...

Database should be swappable, originally uses Badger. Use interface. Certificates are stored in db interface. Later, database could be Consul or Etcd or a Raft-based implementation of a KV store.

Implementation uses the best go ACME client, and best HTTP reverse proxy library... find them.

First, create a Readme.md to explain in details how this will all work. Detail the architecture, the design decisions, the dependencies that will be used.

Also detail the different implementation steps that will need to be taken to get an MVP.

The MVP

Bootstrapping the project code

can you do what's in the Readme and create the MVP ?

Focus on using best practices like 12 factors, etc... This will be deployed on linux hosts, create a docker file. Make sure the software architecture is flexible enough to swap proxy / acme / db implementations later if need be. Also write an architecture.md document with the various files / folders and their meaning and semantics

The minutia

4 prompts to fix smaller things