Skip to content

Commit 2e81012

Browse files
hyperpolymathclaude
andcommitted
feat: migrate persistence from PostgreSQL/Ecto to VeriSimDB
Rewrite DbStore to use VeriSimDB octad API instead of Ecto/Repo. Extend VeriSimDB.Client with generic CRUD operations (create_octad, get_octad, update_octad, delete_octad, list_octads). Remove ecto_sql and postgrex dependencies. Clean Ecto config from config.exs and dev.exs. Disable Repo supervisor in application.ex. Public DbStore API unchanged — callers (NativeBridge, Auth, SettingsStore) need no changes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 5d46597 commit 2e81012

6 files changed

Lines changed: 383 additions & 221 deletions

File tree

backend/config/config.exs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,10 @@
77
# General application configuration
88
import Config
99

10-
config :stapeln,
11-
ecto_repos: [Stapeln.Repo],
12-
generators: [timestamp_type: :utc_datetime]
13-
14-
config :stapeln, Stapeln.Repo,
15-
database: "stapeln_dev",
16-
username: "postgres",
17-
password: "postgres",
18-
hostname: "localhost",
19-
port: 5432
10+
config :stapeln, []
11+
12+
# VeriSimDB instance for stapeln data (port 8093)
13+
# Set VERISIMDB_URL=http://localhost:8093 in your environment
2014

2115
config :stapeln, :api_auth,
2216
enabled: true,

backend/config/dev.exs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
11
import Config
22

3-
# Configure the Repo for development
4-
config :stapeln, Stapeln.Repo,
5-
database: "stapeln_dev",
6-
username: "postgres",
7-
password: "postgres",
8-
hostname: "localhost",
9-
port: 5432,
10-
stacktrace: true,
11-
show_sensitive_data_on_connection_error: true,
12-
pool_size: 10
13-
143
# For development, we disable any cache and enable
154
# debugging and code reloading.
165
#

backend/lib/stapeln/application.ex

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,11 @@ defmodule Stapeln.Application do
77

88
@impl true
99
def start(_type, _args) do
10-
# Optionally start the Ecto Repo when ecto_sql is available and
11-
# PostgreSQL is configured. Falls back to GenServer stores otherwise.
12-
repo_children =
13-
if Code.ensure_loaded?(Stapeln.Repo) do
14-
[Stapeln.Repo]
15-
else
16-
[]
17-
end
18-
1910
children =
2011
[
2112
StapelnWeb.Telemetry,
2213
{DNSCluster, query: Application.get_env(:stapeln, :dns_cluster_query) || :ignore},
23-
{Phoenix.PubSub, name: Stapeln.PubSub}
24-
] ++
25-
repo_children ++
26-
[
14+
{Phoenix.PubSub, name: Stapeln.PubSub},
2715
Stapeln.StackStore,
2816
Stapeln.PipelineStore,
2917
Stapeln.Auth.UserStore,

0 commit comments

Comments
 (0)