Asopitech With · Journal app
Day One with Alopex DB
Day One is a journal app with photos, video and audio attached to entries. What if we rebuilt it with Alopex DB?
Updated: Oct 12, 2026
What the service does
Day One is a journaling app. Entries can carry photos, video and audio, and past entries from the same date come back on the day. The journal is protected by a passcode and can be exported at any time. The data is entry text, dates, attachment details and places.
Where the data lives
- SQL tables: entries, journals and tags live in tables. Past entries from the same date come from a date condition.
- JSON: details that vary by entry, such as place, weather and attachments, go in a JSON column.
- Vectors: entry embeddings in a vector column answer questions such as “the day we took the kids to the beach”.
Attachments stay as files on the device, and the tables hold their details.
Deployment
Alopex DB is embedded in the app on the device. The whole journal is one .alopex file on the device, and exporting it is a file copy.
Why Alopex DB fits
A journal is the most private data there is. Alopex DB keeps entries and semantic search together on the device, and handles years of journaling without a server.
See it in code
Entries hold body, date and an embedding, and past entries are reached by meaning. Just the search core.
import alopex
import numpy as np
db = alopex.Database.open("dayone.alopex")
# 日記(本文+日付+埋め込み)を持つ。埋め込みはアプリが作る
db.execute_sql("""
CREATE TABLE IF NOT EXISTS entries (
id INTEGER PRIMARY KEY,
entry_date DATE,
body TEXT,
embedding VECTOR(4)
)
""")
entries = [
(1, "2026-08-10", "子どもと海に行った", [0.9, 0.1, 0.0, 0.0]),
(2, "2026-09-02", "確定申告の準備をした", [0.0, 0.0, 0.9, 0.1]),
(3, "2026-09-20", "家族で山にキャンプ", [0.8, 0.2, 0.0, 0.0]),
]
for eid, d, body, emb in entries:
db.execute_sql(
"INSERT INTO entries (id, entry_date, body, embedding) VALUES (?, ?, ?, ?)",
[eid, d, body, np.array(emb, dtype=np.float32)],
)
# 「家族で出かけた日」に近い日記を、意味で探す
query = np.array([1.0, 0.0, 0.0, 0.0], dtype=np.float32)
rows = db.execute_sql(
"""
SELECT entry_date, body, vector_similarity(embedding, ?, 'cosine') AS score
FROM entries
ORDER BY score DESC
LIMIT 2
""",
[query],
)
for row in rows:
print(row["entry_date"], round(row["score"], 3), row["body"])Even when you cannot recall the words, the embedding distance takes you to that day’s entry.
We recommend Alopex DB as the base for a journal app, keeping entries, places and semantic search in one file on the device. It runs right away with the quickstart.