Skip to content

Commit a6262b1

Browse files
committed
Update docs
1 parent 0010d95 commit a6262b1

File tree

3 files changed

+47
-43
lines changed

3 files changed

+47
-43
lines changed

docs/gettingstarted.md

Lines changed: 33 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ cd myapp
1111
```
1212

1313
<details>
14-
<summary>Click here to see how to change this clone to point "origin" to your own hosted repository (Recommended)</summary>
14+
<summary>
15+
Recommended: Change the clone to point to your own hosted repository.
16+
</summary>
1517

1618
Rename "origin" to "upstream":
1719

@@ -33,11 +35,6 @@ git remote add origin https://github.com/yourname/myapp
3335

3436
Now you can pull/push to your own repo as normal:
3537

36-
```sh
37-
git pull
38-
git push origin head
39-
```
40-
4138
<h3>Why not just fork SuperStack?</h3>
4239

4340
Because you can't make a fork private.
@@ -56,8 +53,8 @@ Copy the example file:
5653
cp example.env .env
5754
```
5855

59-
> ⚠️ The .env file is for local development only. For remote deployments,
60-
> set environment variables using CI/CD or inline in the `docker compose up` command (be sure to avoid saving secrets in shell history).
56+
> ⚠️ The `.env` file is for local development only, don't write secrets to a
57+
> file on other environments.
6158
6259
## 3. Start the Stack
6360

@@ -67,19 +64,20 @@ docker compose up -d
6764

6865
That's it – your backend is live.
6966

70-
You can now open [localhost:8000/openapi/](http://localhost:8000/openapi/)
71-
to explore your API.
67+
You can now open
68+
[http://localhost:8000/openapi/](http://localhost:8000/openapi/) to explore
69+
your API.
7270

7371
---
7472

7573
## 🧩 What Just Happened?
7674

7775
SuperStack automatically:
7876

79-
- Starts a fresh **Postgres** database
80-
- Applies initial **migrations**
81-
- Launches **PostgREST** and **Swagger UI**
82-
- Serves everything through **Caddy**
77+
1. Starts a fresh Postgres database
78+
2. Applies initial migrations
79+
3. Launches PostgREST and Swagger UI
80+
4. Serves everything through Caddy
8381

8482
```mermaid
8583
flowchart TD
@@ -90,12 +88,31 @@ flowchart TD
9088

9189
> 💡 Only Caddy exposes a port – all services are routed through it.
9290
93-
## Nuke everything
91+
## 🔄 Resetting
9492

95-
To wipe your stack and start clean:
93+
If you want to start fresh:
9694

9795
```sh
9896
docker compose down --volumes
97+
docker compose up -d
98+
```
99+
100+
This will wipe your database and re-run all migrations from scratch.
101+
102+
## Project Structure
103+
104+
```
105+
📁 bin/ → Helper scripts (e.g. wrappers for CLI tools)
106+
📁 caddy/ → Custom Caddy configuration and certificates
107+
📁 docs/ → Markdown files for SuperStack documentation
108+
📁 postgres/ → SQL migrations and configuration of the postgres container
109+
📄 compose.yaml → Main Docker Compose config
110+
📄 compose.override.yaml → Optional local overrides (development only)
111+
📄 example.env → Example environment variables — copy to `.env`
112+
📄 LICENSE → License file (MIT)
113+
📄 logo.png → SuperStack logo for README/docs
114+
📄 mkdocs.yml → MkDocs configuration for documentation site
115+
📄 README.md → Overview and quick start for the repository
99116
```
100117

101118
## ➕ What's Next?

docs/migrations.md

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
# 📜 Migrations
22

3-
SuperStack includes a simple built-in system for managing database schema
4-
migrations.
3+
SuperStack includes a simple system for managing database schema changes.
54

65
## ✍️ Writing Migrations
76

8-
Place your migration scripts in:
7+
Place SQL scripts in:
98

109
```
1110
postgres/migrations/
@@ -14,9 +13,9 @@ postgres/migrations/
1413
Each file should be:
1514

1615
- A `.sql` file
17-
- Numbered in order (e.g. `00-init.sql`, `01-extensions.sql`, `02-auth.sql`)
16+
- Numbered in order (e.g. `00-init.sql`, `01-extensions.sql`, `02-create_auth_schema.sql`)
1817
- Written in plain SQL
19-
- But can include environment variables.
18+
- But can include environment variables
2019

2120
## ▶️ Applying Migrations
2221

@@ -41,22 +40,10 @@ Already-applied scripts are skipped on subsequent runs.
4140

4241
> 💡 `bin/postgres` is short for `docker compose exec postgres`
4342
44-
## 🔄 Resetting
45-
46-
If you want to start fresh:
47-
48-
```sh
49-
docker compose down --volumes
50-
docker compose up -d
51-
```
52-
53-
This will wipe your database and re-run all migrations from scratch.
54-
5543
## 🔁 Transactions
5644

57-
Use `BEGIN;` and `COMMIT;` to wrap migration files when all included
58-
statements are transactional. This ensures that all changes are applied
59-
atomically.
45+
Use `BEGIN;` and `COMMIT;` to wrap migration files when all included statements
46+
are transactional. This ensures that all changes are applied atomically.
6047

6148
For example:
6249

@@ -78,11 +65,10 @@ create table movie (
7865
commit;
7966
```
8067

81-
> 💡 If your migration script only contains one statement, there's no need
82-
> to use a transaction, the statement will be auto-committed.
68+
> 💡 Statements outside of begin/commit are auto-committed.
8369
84-
Avoid wrapping non-transactional operations in a transaction — these will
85-
cause errors if used inside `BEGIN ... COMMIT`.
70+
Avoid wrapping non-transactional operations in a transaction — these will cause
71+
errors if used inside `BEGIN ... COMMIT`.
8672

8773
Examples of non-transactional statements include:
8874

mkdocs.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,12 @@ markdown_extensions:
4444
nav:
4545
- Home: index.md
4646
- Getting Started: gettingstarted.md
47-
- Build your App:
47+
- Working with the Stack:
48+
- Psql: psql.md
4849
- Migrations: migrations.md
4950
- Postgres Extensions: extensions.md
5051
- Authentication: authentication.md
5152
- RabbitMQ: rabbitmq.md
52-
- Psql: psql.md
53-
- Deploying to Remote Environments: deploying.md
54-
- Upgrading SuperStack: upgrading.md
53+
- Operations:
54+
- Deploying SuperStack: deploying.md
55+
- Upgrading SuperStack: upgrading.md

0 commit comments

Comments
 (0)