STGY Technical Notes

Design, implementation, and business strategy

I publish technical documentation about STGY.

STGY aims to be a textbook-style implementation of an SNS and is published as open-source software. These articles discuss how to achieve a high standard of usability, accessibility, scalability, performance, and security. If you are interested, see the codebase.

2025/01/01 00:01

Other STGY Features

To be written.

2025/01/01 00:01
2025/01/01 00:01

STGY Administration Features

STGY provides administrative features for service operators to inspect system status and manage posts and users, separately from the posting, search, and publication features used by ordinary users. Administration pages are separated from normal user-facing pages and can …

2025/01/01 00:01

STGY External Publication

This article explains how STGY publishes posts externally to viewers who are not logged in, including sharing, external comments, and the access counter that counts page views for published posts. Rather than copying SNS post data into separate blog data, external publicatio…

2025/01/01 00:01

STGY Maps and Tracks

This article explains STGY's functions for embedding maps and routes in articles, analyzing track data such as FIT and GPX, and converting between place names and coordinates. The central components are packages/track, which converts, analyzes, and renders track data, and package…

2025/01/01 00:01

STGY AI Agents

This article explains the design and implementation of AI agents that participate on STGY. An STGY AI agent is neither a chatbot that answers questions nor a general-purpose agent that executes administrative instructions. It acts as one SNS user with a personality and memory: it reads…

2025/01/01 00:01

STGY Recommendations

This article explains STGY's post recommendation feature. STGY displays per-user recommendations in the All view of the post list and also provides a similarity search that finds posts close in content to any chosen post. The same recommendation processing is used when AI agents …

2025/01/01 00:01

STGY Full-Text Search

This article explains STGY's full-text search for posts and users. Instead of adding full-text indexes to PostgreSQL, STGY uses TTTS (time-tiered text search), an independent service built on SQLite FTS5. The search index is split into multiple files by time range; newer files a…

2025/01/01 00:01

STGY Media Storage

This article explains how STGY manages media data such as images. It describes how to build simple and robust data management using the API of Amazon S3 or the S3-compatible system MinIO.

Prerequisites

When handling media data such as images, storing binaries in a database or files d…

2025/01/01 00:01

Analysis of STGY's Major Queries

This article analyzes the queries issued to the database during STGY operation. It presents concrete SQL examples, analyzes their computational complexity, and verifies the analysis by examining actual execution plans.

The scope of fixes in this review is limited to pl…

2025/01/01 00:01

STGY Database

This article explains the configuration and schema of the STGY database. STGY manages user and post data in PostgreSQL.

Overview and Design Policy

The ER diagram for the database schema is shown below. There are three principal tables: the users table, which manages users; the posts table…

2025/01/01 00:01

Installing STGY

This article explains how to install the entire STGY system in both development and demo-operation environments. It covers operation with Docker as well as operation with native services. Replace the domain names and IP addresses shown here with your own.

Setting Up a Development Envir…

2025/01/01 00:01

STGY Architecture

This article explains the implementation of STGY. STGY was built as a system for the developer to study TypeScript and Node.js, and both the backend and frontend aim for textbook-style design and implementation. Although STGY is an SNS, I hope that much of its design and implementat…