Skip to content
This repository was archived by the owner on Sep 2, 2024. It is now read-only.

Commit c8ce469

Browse files
committed
README and CHANGELOG update, preparing v1.2.0 close #3, close #4
1 parent 7f6d24c commit c8ce469

File tree

7 files changed

+77
-28
lines changed

7 files changed

+77
-28
lines changed

.demo.env

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
APP_ENV=dev
2-
DATABASE_URL=mongodb://mongo:27017
3-
DATA_STORE=mongo
2+
3+
# For PostgreSQL
4+
DATABASE_URL=host=db user=postgres password=postgres dbname=postgres sslmode=disable
5+
DATA_STORE=pg
6+
7+
# For MongoDB
8+
# DATABASE_URL=mongodb://mongo:27017
9+
# DATA_STORE=mongo
10+
411
JWT_SECRET=changeMe
512
MAIL_PROVIDER=dev
613
STORAGE_PROVIDER=local

.github/workflows/go.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ jobs:
3030
- name: Test (Mongo data store)
3131
run: make alltest
3232

33-
- name: Change DATA_STORAGE to PostgreSQL
34-
run: sed -i 's/DATA_STORAGE=mongo/DATA_STORAGE=pg/g' .env
33+
- name: Change DATA_STORE to PostgreSQL
34+
run: sed -i 's/DATA_STORE=mongo/DATA_STORE=pg/g' .env
3535

3636
- name: Change DATABASE_URL to PG connection string
3737
run: sed -i 's/DATABASE_URL=mongodb:\/\/localhost:27017/DATABASE_URL=user=postgres password=postgres dbname=postgres sslmode=disable/g' .env

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# Changelog for StaticBackend
22

3+
### Feb 19, 2022 v1.2.0
4+
5+
* Created a data persistance interface to support different data store.
6+
* Added support for PostgreSQL.
7+
* Database tests for PostgreSQL and MongoDB.
8+
* Default Docker Compose for demo use PostgreSQL.
9+
10+
### Jan 1, 2022
11+
12+
* Added atomic worker queue
13+
14+
### Nov 17, 2021
15+
16+
* Added graceful shutdown
17+
318
### Oct 31, 2021 v1.1.0
419

520
* Added reset password flow and made the reset code generation avail from backend.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ test-mdb:
2323
test-intl:
2424
@JWT_SECRET=okdevmode go test --race --cover ./internal
2525

26-
docker:
26+
docker: build
2727
docker build . -t staticbackend:latest
2828

2929
pkg: build

README.md

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
**JAMstack Boston talk**: I'm gonna give a talk on Nov 23rd @ 6pm EST on
2-
StaticBackend. If you're interested: https://www.meetup.com/JAMstack-Boston/events/281827534/
3-
4-
51
<p align="center">
62
<img src="https://staticbackend.com/img/logo-sb-no-text.png" alt="StaticBackend logo">
73
<br />
@@ -17,8 +13,9 @@ StaticBackend. If you're interested: https://www.meetup.com/JAMstack-Boston/even
1713
# StaticBackend - simple backend for your apps
1814

1915
[StaticBackend](https://staticbackend.com) is a simple backend that handles
20-
user management, database, file storage, forms, and real-time experiences via
21-
channel/topic-based communication for web and mobile applications.
16+
user management, database, file storage, forms, real-time experiences via
17+
channel/topic-based communication, and server-side functions for web and mobile
18+
applications.
2219

2320
You can think of it as a lightweight Firebase replacement you may self-host. No
2421
vendor lock-in, and your data stays in your control.
@@ -46,12 +43,15 @@ a good fit.
4643

4744
I'm personally using it to build SaaS:
4845

46+
* [Vivid - Automatic video clips for podcasts](https://vivid.fm)
4947
* [Tangara - one page checkout for creators](https://tangara.io)
5048

49+
It can be used from client-side and/or server-side.
50+
5151
## How it works / dev workflow
5252

5353
The main idea is that StaticBackend is your backend API for your frontend apps.
54-
A performant free and open-source Firebase alternative.
54+
A performant free and open-source self-hosted Firebase alternative.
5555

5656
_Note that it can also be used from your backend code as well._
5757

@@ -78,7 +78,7 @@ login = async () => {
7878
console.error(res.content);
7979
return;
8080
}
81-
token = res.content();
81+
token = res.content;
8282

8383
createTask();
8484
}
@@ -114,7 +114,9 @@ From there you build your application using the
114114
the [real-time component](https://staticbackend.com/docs/websocket/),
115115
the [storage API](https://staticbackend.com/docs/storage/), etc.
116116

117-
You may use server-side libraries for Node and Go or use an HTTP client
117+
StaticBackend provides commonly used building blocks for web applications.
118+
119+
You may use server-side libraries for Node, Python and Go or use an HTTP client
118120
and use your preferred language.
119121

120122
## Get started with the self-hosted version
@@ -128,7 +130,7 @@ Please refer to this [guide here](https://staticbackend.com/getting-started/self
128130

129131
We also have this
130132
[blog post](https://staticbackend.com/blog/get-started-self-hosted-version/)
131-
that also includes the above video.
133+
that includes the above video.
132134

133135
If you have Docker & Docker Compose ready, here's how you can have your server
134136
up and running in dev mode in 30 seconds:
@@ -167,7 +169,8 @@ This is normal, as you're trying to request protected API, but you're all set.
167169
The next step is to visit [http://localhost:8099](http://localhost:8099) and
168170
create your first app. Please note that in dev mode you'll have to look at your
169171
docker compose output terminal to see the content of the email after creating
170-
your app.
172+
your app. This email contains all the keys and your super user account
173+
information.
171174

172175
## Documentation
173176

@@ -182,17 +185,22 @@ Please help us improve if you have any feedback.
182185
* [Database](https://staticbackend.com/docs/database/)
183186
* [Real-time communication](https://staticbackend.com/docs/websocket/)
184187
* [File storage](https://staticbackend.com/docs/storage/)
188+
* [Server-side functions](https://staticbackend.com/docs/functions/)
189+
* [Send emails](https://staticbackend.com/docs/sendmail/)
190+
* [Caching](https://staticbackend.com/docs/cache/)
191+
*
185192
* [Forms](https://staticbackend.com/docs/forms/)
193+
* [Root token](https://staticbackend.com/docs/root-token/)
186194

187195
## Librairies & CLI
188196

189197
We [provide a CLI](https://staticbackend.com/getting-started/) for local
190198
development if you want to get things started without any infrastructure and
191-
for prototyping.
199+
for prototyping / testing. Please note the dev server has a very limited
200+
functionalities compares to the full self-hosted version.
192201

193-
You can use the CLI to manage your database and form submission. This is the
194-
only interface we currently have to interact with your database, other than via
195-
code. There will be a web UI available before v1.0 is released.
202+
You can use the CLI to manage your database, form submissions, and deploy
203+
server-side-functions. We have an alpha Web UI as well to manage your resources.
196204

197205
We have a page listing our
198206
[client-side and server-side libraries](https://staticbackend.com/docs/libraries/).
@@ -207,12 +215,13 @@ Here's the examples we have created so far:
207215
* [To-do list example](https://staticbackend.com/getting-started/)
208216
* [Realtime collaboration](https://staticbackend.com/blog/realtime-collaboration-example/)
209217
* [Live chat using server-side function & real-time component](https://staticbackend.com/blog/server-side-functions-task-scheduler-example/)
218+
* [Jamstack Bostom talk](https://www.youtube.com/watch?v=Uf-K6io9p7w)
210219

211220
## Deploying in production
212221

213222
We've not written anything yet regarding deploying, but once you have the
214-
core` built into a binary and have access to MongoDB and Redis in production you
215-
should be able to deploy it like any other Go server.
223+
core` built into a binary and have access to either PostgreSQL or MongoDB, and
224+
Redis in production you should be able to deploy it like any other Go server.
216225

217226
We'll have documentation and an example soon for deploying to DigitalOcean.
218227

docker-compose-demo.yml

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,31 @@ services:
55
ports:
66
- "8099:8099"
77
env_file:
8-
- ./.demo.env
8+
- .env
9+
depends_on:
10+
- "db"
11+
# - "redis"
912

10-
mongo:
11-
image: mongo:3-stretch
12-
volumes:
13-
- ./mongodata:/data/db/mongo
13+
# For PostgreSQL
14+
db:
15+
image: postgres
16+
restart: always
1417
ports:
15-
- "27017:27017"
18+
- 5432:5432
19+
environment:
20+
- POSTGRES_USER=postgres
21+
- POSTGRES_PASSWORD=postgres
22+
volumes:
23+
- ../postgres-data:/var/lib/postgresql/data
24+
- ./sql/0001_bootstrap_db.sql:/docker-entrypoint-initdb.d/create_tables.sql
25+
26+
# For MongoDB
27+
#mongo:
28+
# image: mongo:3-stretch
29+
# volumes:
30+
# - ./mongodata:/data/db/mongo
31+
# ports:
32+
# - "27017:27017"
1633

1734
redis:
1835
image: "redis:alpine"

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
version: "3"
22

33
services:
4+
45
db:
56
image: postgres
67
restart: always

0 commit comments

Comments
 (0)