diff --git a/docs/.nojekyll b/docs/.nojekyll
new file mode 100644
index 0000000..e69de29
diff --git a/docs/README.md b/docs/README.md
new file mode 100644
index 0000000..f2d451b
--- /dev/null
+++ b/docs/README.md
@@ -0,0 +1,23 @@
+  
+
+# Sablier - Scale to Zero
+
+Sablier is an API that start containers for a given duration.
+
+It provides an integrations with multiple reverse proxies and different loading strategies.
+
+Which allows you to start your containers on demand and shut them down automatically as soon as there's no activity.
+
+
+
+## Glossary
+
+I'll use these terms in order to be provider agnostic.
+
+- **Session**: A Session is a set of **instances**
+- **Instance**: An instance is either a docker container, docker swarm service, kubernetes deployment or kubernetes statefulset
+
+## Credits
+
+- [Hourglass icons created by Vectors Market - Flaticon](https://www.flaticon.com/free-icons/hourglass)
+- [tarampampam/error-pages](https://github.com/tarampampam/error-pages/) for the themes
\ No newline at end of file
diff --git a/docs/_sidebar.md b/docs/_sidebar.md
new file mode 100644
index 0000000..d4d85a4
--- /dev/null
+++ b/docs/_sidebar.md
@@ -0,0 +1,24 @@
+- [Introduction](/)
+- [Getting started](/getting-started)
+- [Installation](/installation)
+- [Configuration](/configuration)
+- [Strategies](/strategies)
+- [Themes](/themes)
+- [FAQ](/faq)
+- [Versioning](/versioning)
+- **Providers**
+ - [Overview](/providers/overview)
+ - [Docker](/providers/docker)
+ - [Docker Swarm](/providers/docker_swarm)
+ - [Kubernetes](/providers/kubernetes)
+- **Reverse Proxy Plugins**
+ - [Overview](/plugins/overview)
+ - [Traefik](/plugins/traefik)
+ - [Nginx](/plugins/nginx)
+ - [Caddy](/plugins/caddy)
+- **Guides**
+ - [Overview](/guides/overview)
+ - [VSCode Server with Traefik and Kubernetes](/guides/code-server-traefik-kubernetes.md)
+- **Links**
+- [Github](https://github.com/acouvreur/sablier)
+- [
Docker Hub](https://hub.docker.com/r/acouvreur/sablier)
\ No newline at end of file
diff --git a/docs/api/README.md b/docs/api/README.md
new file mode 100644
index 0000000..bb18fe9
--- /dev/null
+++ b/docs/api/README.md
@@ -0,0 +1,95 @@
+# Documentation for Sablier
+
+
+## Documentation for API Endpoints
+
+All URIs are relative to *http://localhost:10000*
+
+| Class | Method | HTTP request | Description |
+|------------ | ------------- | ------------- | -------------|
+| *ScaleApi* | [**scaleBlocking**](Apis/ScaleApi.md#scaleblocking) | **GET** /api/strategies/blocking | Hangs the request until the services are ready |
+*ScaleApi* | [**scaleDynamic**](Apis/ScaleApi.md#scaledynamic) | **GET** /api/strategies/dynamic | The waiting page for the given services |
+| *ThemeApi* | [**getTheme**](Apis/ThemeApi.md#gettheme) | **GET** /api/strategies/dynamoc/themes | |
+
+
+
+## Documentation for Models
+
+ - [instance](./Models/instance.md)
+ - [session](./Models/session.md)
+ - [status](./Models/status.md)
+ - [themes](./Models/themes.md)
+
+
+
+## Documentation for Authorization
+
+All endpoints do not require authorization.
+
+## API
+
+To run the following examples you can create two containers:
+
+- `docker create --name nginx nginx`
+- `docker create --name apache httpd`
+
+### GET `/api/strategies/dynamic`
+
+**Description**: The `/api/strategies/dynamic` endpoint allows you to request a waiting page for multiple instances
+
+| Parameter | Value | Description |
+| -------------------------------- | -------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
+| `names` | array of string | The instances to be started (cannot be used with `group` parameter) |
+| `group` | string | The instance group to be started (using `sablier.group=mygroup` labels) (cannot be used with `names` parameter) |
+| `session_duration` | duration [time.ParseDuration](https://pkg.go.dev/time#ParseDuration) | The session duration for all services, which will reset at each subsequent calls |
+| `show_details` *(optional)* | bool | The details about instances |
+| `display_name` *(optional)* | string | The display name |
+| `theme` *(optional)* | string | The theme to use |
+| `refresh_frequency` *(optional)* | duration [time.ParseDuration](https://pkg.go.dev/time#ParseDuration) | The refresh frequency for the loading page |
+
+Go to http://localhost:10000/api/strategies/dynamic?names=nginx&names=apache&session_duration=5m&show_details=true&display_name=example&theme=hacker-terminal&refresh_frequency=10s and you should see
+
+A special header `X-Sablier-Session-Status` is returned and will have the value `ready` if all instances are ready. Or else `not-ready`.
+
+
+
+### GET `/api/strategies/blocking`
+
+**Description**: The `/api/strategies/blocking` endpoint allows you to wait until the instances are ready
+
+| Parameter | Value | Description |
+| ---------------------- | -------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
+| `names` | array of string | The instances to be started (cannot be used with `group` parameter) |
+| `group` | string | The instance group to be started (using `sablier.group=mygroup` labels) (cannot be used with `names` parameter) |
+| `session_duration` | duration [time.ParseDuration](https://pkg.go.dev/time#ParseDuration) | The session duration for all services, which will reset at each subsequent calls |
+| `timeout` *(optional)* | duration [time.ParseDuration](https://pkg.go.dev/time#ParseDuration) | The maximum time to wait for instances to be ready |
+
+A special header `X-Sablier-Session-Status` is returned and will have the value `ready` if all instances are ready. Or else `not-ready`.
+
+**Curl example**
+```bash
+curl -X GET -v "http://localhost:10000/api/strategies/blocking?names=nginx&names=apache&session_duration=5m&timeout=5s"
+* Trying 127.0.0.1:10000...
+* Connected to localhost (127.0.0.1) port 10000 (#0)
+> GET /api/strategies/blocking?names=nginx&names=apache&session_duration=5m&timeout=30s HTTP/1.1
+> Host: localhost:10000
+> User-Agent: curl/7.74.0
+> Accept: */*
+>
+* Mark bundle as not supporting multiuse
+< HTTP/1.1 200 OK
+< Content-Type: application/json; charset=utf-8
+< X-Sablier-Session-Status: ready
+< Date: Mon, 14 Nov 2022 19:20:50 GMT
+< Content-Length: 245
+<
+{"session":
+ {"instances":
+ [
+ {"instance":{"name":"nginx","currentReplicas":1,"desiredReplicas":1,"status":"ready"},"error":null},
+ {"instance":{"name":"apache","currentReplicas":1,"desiredReplicas":1,"status":"ready"},"error":null}
+ ],
+ "status":"ready"
+ }
+}
+```
\ No newline at end of file
diff --git a/docs/assets/img/docker.svg b/docs/assets/img/docker.svg
new file mode 100644
index 0000000..2666809
--- /dev/null
+++ b/docs/assets/img/docker.svg
@@ -0,0 +1,4 @@
+
+
\ No newline at end of file
diff --git a/docs/assets/img/github.svg b/docs/assets/img/github.svg
new file mode 100644
index 0000000..aa05db9
--- /dev/null
+++ b/docs/assets/img/github.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/docs/assets/img/integration.png b/docs/assets/img/integration.png
new file mode 100644
index 0000000..c339f5c
Binary files /dev/null and b/docs/assets/img/integration.png differ
diff --git a/docs/img/reverse-proxy-integration.png b/docs/assets/img/reverse-proxy-integration.png
similarity index 100%
rename from docs/img/reverse-proxy-integration.png
rename to docs/assets/img/reverse-proxy-integration.png
diff --git a/docs/configuration.md b/docs/configuration.md
new file mode 100644
index 0000000..a4445eb
--- /dev/null
+++ b/docs/configuration.md
@@ -0,0 +1,122 @@
+# Configuration
+
+There are three different ways to define configuration options in Sablier:
+
+1. In a configuration file
+2. As environment variables
+3. In the command-line arguments
+
+These ways are evaluated in the order listed above.
+
+If no value was provided for a given option, a default value applies.
+
+## Configuration File
+
+At startup, Sablier searches for configuration in a file named sablier.yml (or sablier.yaml) in:
+
+- `/etc/sablier/`
+- `$XDG_CONFIG_HOME/`
+- `$HOME/.config/`
+- `.` *(the working directory).*
+
+You can override this using the configFile argument.
+
+```bash
+sablier --configFile=path/to/myconfigfile.yml
+```
+
+```yaml
+provider:
+ # Provider to use to manage containers (docker, swarm, kubernetes)
+ name: docker
+server:
+ # The server port to use
+ port: 10000
+ # The base path for the API
+ base-path: /
+storage:
+ # File path to save the state (default stateless)
+ file:
+sessions:
+ # The default session duration (default 5m)
+ default-duration: 5m
+ # The expiration checking interval.
+ # Higher duration gives less stress on CPU.
+ # If you only use sessions of 1h, setting this to 5m is a good trade-off.
+ expiration-interval: 20s
+logging:
+ level: trace
+strategy:
+ dynamic:
+ # Custom themes folder, will load all .html files recursively (default empty)
+ custom-themes-path:
+ # Show instances details by default in waiting UI
+ show-details-by-default: false
+ # Default theme used for dynamic strategy (default "hacker-terminal")
+ default-theme: hacker-terminal
+ # Default refresh frequency in the HTML page for dynamic strategy
+ default-refresh-frequency: 5s
+ blocking:
+ # Default timeout used for blocking strategy (default 1m)
+ default-timeout: 1m
+```
+
+## Environment Variables
+
+All environment variables can be used in the form of the config file such as
+
+```yaml
+strategy:
+ dynamic:
+ custom-themes-path: /my/path
+```
+
+Becomes
+
+```bash
+STRATEGY_DYNAMIC_CUSTOM_THEMES_PATH=/my/path
+```
+
+## Arguments
+
+To get the list of all available arguments:
+
+```bash
+sablier --help
+
+# or
+
+docker run acouvreur/sablier[:version] --help
+# ex: docker run acouvreur/sablier:1.4.0-beta.3 --help
+```
+
+All arguments can be used in the form of the config file such as
+
+```yaml
+strategy:
+ dynamic:
+ custom-themes-path: /my/path
+```
+
+Becomes
+
+```bash
+sablier start --strategy.dynamic.custom-themes-path /my/path
+```
+
+## Reference
+
+```
+ -h, --help help for start
+ --provider.name string Provider to use to manage containers [docker swarm kubernetes] (default "docker")
+ --server.base-path string The base path for the API (default "/")
+ --server.port int The server port to use (default 10000)
+ --sessions.default-duration duration The default session duration (default 5m0s)
+ --sessions.expiration-interval duration The expiration checking interval. Higher duration gives less stress on CPU. If you only use sessions of 1h, setting this to 5m is a good trade-off. (default 20s)
+ --storage.file string File path to save the state
+ --strategy.blocking.default-timeout duration Default timeout used for blocking strategy (default 1m0s)
+ --strategy.dynamic.custom-themes-path string Custom themes folder, will load all .html files recursively
+ --strategy.dynamic.default-refresh-frequency duration Default refresh frequency in the HTML page for dynamic strategy (default 5s)
+ --strategy.dynamic.default-theme string Default theme used for dynamic strategy (default "hacker-terminal")
+ --strategy.dynamic.show-details-by-default Show the loading instances details by default (default true)
+```
diff --git a/docs/faq.md b/docs/faq.md
new file mode 100644
index 0000000..c9a1e8f
--- /dev/null
+++ b/docs/faq.md
@@ -0,0 +1,5 @@
+# Frequenty Asked Questions
+
+## How to start multiple instances?
+
+## How do I do
\ No newline at end of file
diff --git a/docs/favicon.ico b/docs/favicon.ico
new file mode 100644
index 0000000..0f8f98b
Binary files /dev/null and b/docs/favicon.ico differ
diff --git a/docs/getting-started.md b/docs/getting-started.md
new file mode 100644
index 0000000..2f5c77a
--- /dev/null
+++ b/docs/getting-started.md
@@ -0,0 +1,178 @@
+# Getting started
+
+This Getting Started will get you through what you need to understand how to use Sablier as a scale to zero middleware with a reverse proxy.
+
+
+
+## Identify your provider
+
+The first thing you need to do is to identify your [Provider](/providers/overview).
+
+?> A Provider is how Sablier can interact with your instances and scale them up and down to zero.
+
+You can check the available providers [here](/providers/overview?id=available-providers).
+
+## Identify your reverse proxy
+
+Once you've identified you're [Provider](/providers/overview), you'll want to identify your [Reverse Proxy](/plugins/overview).
+
+?> Because Sablier is designed as an API that can be used on its own, reverse proxy integrations acts as a client of that API.
+
+You can check the available reverse proxy plugins [here](/plugins/overview?id=available-reverse-proxies)
+
+## Connect it all together
+
+- Let's say we're using the [Docker Provider](/providers/docker).
+- Let's say we're using the [Caddy Reverse Proxy Plugin](/plugins/caddy).
+
+### 1. Initial setup with Caddy
+
+Suppose this is your initial setup with Caddy. You have your reverse proxy with a Caddyfile that does a simple reverse proxy on `/whoami`.
+
+
+
+#### **docker-compose.yaml**
+
+```yaml
+services:
+ proxy:
+ image: caddy:2.6.4
+ ports:
+ - "8080:80"
+ volumes:
+ - ./Caddyfile:/etc/caddy/Caddyfile:ro
+
+ whoami:
+ image: containous/whoami:v1.5.0
+```
+
+#### **Caddyfile**
+
+```Caddyfile
+:80 {
+ route /whoami {
+ reverse_proxy whoami:80
+ }
+}
+```
+
+
+
+At this point you can run `docker compose up` and go to `http://localhost:8080/whoami` and you will see your service.
+
+
+### 2. Install Sablier with the Docker Provider
+
+Add the Sablier container in the `docker-compose.yaml` file.
+
+```yaml
+services:
+ proxy:
+ image: caddy:2.6.4
+ ports:
+ - "8080:80"
+ volumes:
+ - ./Caddyfile:/etc/caddy/Caddyfile:ro
+
+ whoami:
+ image: containous/whoami:v1.5.0
+
+ sablier:
+ image: acouvreur/sablier:1.4.0-beta.3
+ command:
+ - start
+ - --provider.name=docker
+ volumes:
+ - '/var/run/docker.sock:/var/run/docker.sock'
+```
+
+### 3. Add the Sablier Caddy Plugin to Caddy
+
+Because Caddy does not provide any runtime evaluation for the plugins, we need to build Caddy with this specific plugin.
+
+I'll use the provided Dockerfile to build the custom Caddy image.
+
+```bash
+docker build https://github.com/acouvreur/sablier.git#v1.4.0-beta.3:plugins/caddy
+ --build-arg=CADDY_VERSION=2.6.4
+ -t caddy:2.6.4-with-sablier
+```
+
+Then change the image to from `caddy:2.6.4` to `caddy:2.6.4-with-sablier`
+
+```yaml
+services:
+ proxy:
+ image: caddy:2.6.4-with-sablier
+ ports:
+ - "8080:80"
+ volumes:
+ - ./Caddyfile:/etc/caddy/Caddyfile:ro
+
+ whoami:
+ image: containous/whoami:v1.5.0
+
+ sablier:
+ image: acouvreur/sablier:1.4.0-beta.3
+ command:
+ - start
+ - --provider.name=docker
+ volumes:
+ - '/var/run/docker.sock:/var/run/docker.sock'
+```
+
+### 4. Configure Caddy to use the Sablier Caddy Plugin on the `whoami` service
+
+This is how you opt-in your services and link them with the plugin.
+
+
+
+#### **docker-compose.yaml**
+
+```yaml
+services:
+ proxy:
+ image: caddy:local
+ ports:
+ - "8080:80"
+ volumes:
+ - ./Caddyfile:/etc/caddy/Caddyfile:ro
+
+ whoami:
+ image: containous/whoami:v1.5.0
+ labels:
+ - sablier.enable=true
+ - sablier.group=demo
+
+ sablier:
+ image: acouvreur/sablier:local
+ volumes:
+ - '/var/run/docker.sock:/var/run/docker.sock'
+```
+
+#### **Caddyfile**
+
+```Caddyfile
+:80 {
+ route /whoami {
+ sablier url=http://sablier:10000 {
+ group demo
+ session_duration 1m
+ dynamic {
+ display_name My Whoami Service
+ }
+ }
+
+ reverse_proxy whoami:80
+ }
+}
+```
+
+Here we've configured the following things when we're accessing the service on `http://localhost:8080/whoami`:
+- The containers that have the label `sablier.group=demo` will be started on demand
+- The period of innactivity after which the containers should be shut down is one minute
+- It uses the dynamic configuration and configures the title with `My Whoami Service`
+
+
+
+?> We've assigned the group `demo` to the service and we use this to identify the workload i
\ No newline at end of file
diff --git a/docs/guides/code-server-prompt.png b/docs/guides/code-server-prompt.png
deleted file mode 100644
index 1a3145b..0000000
Binary files a/docs/guides/code-server-prompt.png and /dev/null differ
diff --git a/docs/guides/code-server-traefik-kubernetes.md b/docs/guides/code-server-traefik-kubernetes.md
index 7bf747c..4820998 100644
--- a/docs/guides/code-server-traefik-kubernetes.md
+++ b/docs/guides/code-server-traefik-kubernetes.md
@@ -1,13 +1,4 @@
-# Sablier Guide: Code-Server + Traefik + Kubernetes Ingress
-
-- [Sablier Guide: Code-Server + Traefik + Kubernetes Ingress](#sablier-guide-code-server--traefik--kubernetes-ingress)
- - [1. Prerequisites](#1-prerequisites)
- - [2. Create the Kubernetes Cluster using K3S](#2-create-the-kubernetes-cluster-using-k3s)
- - [3. Deploy Traefik using Helm](#3-deploy-traefik-using-helm)
- - [3. Deploy Sablier](#3-deploy-sablier)
- - [4. Deploy Code-Server](#4-deploy-code-server)
- - [5. Routing Code-Server through Traefik with the Sablier Plugin Middleware](#5-routing-code-server-through-traefik-with-the-sablier-plugin-middleware)
- - [6. Clean up](#6-clean-up)
+# Code-Server + Traefik + Kubernetes Ingress
## 1. Prerequisites
diff --git a/docs/guides/overview.md b/docs/guides/overview.md
new file mode 100644
index 0000000..a170755
--- /dev/null
+++ b/docs/guides/overview.md
@@ -0,0 +1,5 @@
+# Guides
+
+Guides are here to help you to understand more how to use this API in complex use cases.
+
+Because the nature of Sablier involves multiple reverse proxies and multiple providers, the complexity multiplies.
\ No newline at end of file
diff --git a/docs/guides/sablier-middleware-loading.png b/docs/guides/sablier-middleware-loading.png
deleted file mode 100644
index 05b7010..0000000
Binary files a/docs/guides/sablier-middleware-loading.png and /dev/null differ
diff --git a/docs/health.md b/docs/health.md
new file mode 100644
index 0000000..2048a7d
--- /dev/null
+++ b/docs/health.md
@@ -0,0 +1,23 @@
+## Sablier Healthcheck
+
+### Using the `/health` route
+
+You can use the route `/health` to check for healthiness.
+
+- Returns 200 `OK` when ready
+- Returns 503 `Service Unavailable` when terminating
+
+### Using the `sablier health` command
+
+You can use the command `sablier health` to check for healthiness.
+
+`sablier health` takes on argument `--url` which defaults to `http://localhost:10000/health`.
+
+```yml
+services:
+ sablier:
+ image: acouvreur/sablier:1.4.0-beta.3
+ healthcheck:
+ test: ["sablier", "health"]
+ interval: 1m30s
+```
\ No newline at end of file
diff --git a/docs/img/api-dynamic.png b/docs/img/api-dynamic.png
deleted file mode 100644
index e4d82f7..0000000
Binary files a/docs/img/api-dynamic.png and /dev/null differ
diff --git a/docs/img/demo.gif b/docs/img/demo.gif
deleted file mode 100644
index f11f3f7..0000000
Binary files a/docs/img/demo.gif and /dev/null differ
diff --git a/docs/img/ghost.png b/docs/img/ghost.png
deleted file mode 100644
index 67108e5..0000000
Binary files a/docs/img/ghost.png and /dev/null differ
diff --git a/docs/img/hacker-terminal.png b/docs/img/hacker-terminal.png
deleted file mode 100644
index 3e52216..0000000
Binary files a/docs/img/hacker-terminal.png and /dev/null differ
diff --git a/docs/img/hourglass.png b/docs/img/hourglass.png
deleted file mode 100644
index 3ea3a4c..0000000
Binary files a/docs/img/hourglass.png and /dev/null differ
diff --git a/docs/img/matrix.png b/docs/img/matrix.png
deleted file mode 100644
index e464b93..0000000
Binary files a/docs/img/matrix.png and /dev/null differ
diff --git a/docs/img/shuffle.png b/docs/img/shuffle.png
deleted file mode 100644
index e4234bc..0000000
Binary files a/docs/img/shuffle.png and /dev/null differ
diff --git a/docs/index.html b/docs/index.html
new file mode 100644
index 0000000..f141acc
--- /dev/null
+++ b/docs/index.html
@@ -0,0 +1,59 @@
+
+
+