Securepub is
- a Zola ↗︎ static site which
- uses JS modules compiled from Elm ↗︎ and Typescript ↗︎ to
- run Effect-ts ↗︎ workflows that
- read and write data in Userbase ↗︎
- to meet its requirements
See the decisions section for more details on these and other architectural choices.
Securepub pages
Securepub serves two kinds of pages:
- collaboration pages served from securepub.org and
- review pages served from engagement content
Collaboration pages
On collaboration pages Elm and Effect-ts modules act as a browser-based client for Userbase. Members use them to perform CRUD ↗︎ operations on engagement data such as viewing and editing topics and comments.
Collaboration pages have the following prefixes on securepub.org:
/_v1.2401_/ /XX/_v1.2401_/
For more details on the collaboration pages see sections.
╭─────────────────────────────────╮ │ collaboration page (Zola) │ 👤 │ ╭─────╮ │ Member ───▶ │ Elm │ │ │ ╰─┬───╯ │ │ ▼ ▲ │ │ ╭───┴────╮ ╭──────────╮ │ │ │ Effect │◀────▶│ Userbase │◀────▶ ☁️ │ ╰──┬─────╯ ╰───┬──────╯ │ userbase ├──────│────────────┬───│─────────┤ .com │ │ browser │ │ session │ │ │ ▼ cache │ ▼ storage │ │ │ ╭────────────╮ │ ╭─────╮ │ ▼ │ │ engagement │ │ │ key │ │ AWS │ │ content │ │ ╰─────╯ │ DynamoDB │ ╰────────────╯ │ │ + S3 ╰───────────────────┴─────────────╯
Review pages
On review pages Securepub uses a Service Worker to serve members topic content shared with them from the browser cache. Review pages use a separate origin from the one used for collaboration pages.
Although the Service Worker makes these pages appear as if hosted on securepub.org, their content comes from the engagement database on userbase.com and other sites the content may reference.
╭─────────────────────────────────╮ │ review page │ │ ╭─────────╮ │ 👤 │ │ service │ ╭──────────╮ │ Member ◀─── │ worker │────▶│ Userbase │◀────▶ ☁️ │ ╰─────────╯ ╰─┬────────╯ │ userbase │ ▲ │ │ .com ├──────│─────────┬────│───────────┤ │ │ │ browser │ │ session │ │ │ │ cache │ ▼ storage │ ▼ │ ╭────────────╮ │ ╭─────╮ │ AWS │ │ engagement │ │ │ key │ │ DynamoDB │ │ content │ │ ╰─────╯ │ + S3 │ ╰────────────╯ │ │ ╰────────────────┴────────────────╯