Kenneth 61c1ade631 feat(backend): add DB persistence layer (#79)
* feat(backend): add DB persistence layer

Replace raw pg Pool with Drizzle ORM backed by Bun.sql.
Add per-user source configuration table (user_sources).
Migrate Better Auth to drizzle-adapter.
Add AES-256-GCM credential encryption.

Co-authored-by: Ona <no-reply@ona.com>

* fix(backend): set updatedAt explicitly in all mutations

onConflictDoUpdate bypasses Drizzle's $onUpdate hook.
Set updatedAt explicitly in all mutation methods.

Co-authored-by: Ona <no-reply@ona.com>

* fix(backend): add composite index on user_sources

Add (user_id, enabled) index for the enabled() query path.

Co-authored-by: Ona <no-reply@ona.com>

---------

Co-authored-by: Ona <no-reply@ona.com>
2026-03-16 01:30:02 +00:00
2026-03-10 19:19:23 +00:00
2026-01-16 00:56:55 +00:00
2026-01-16 00:56:55 +00:00
2026-03-10 19:19:23 +00:00
2026-03-10 19:19:23 +00:00
2026-01-16 00:56:55 +00:00

aelis

To install dependencies:

bun install

Packages

@aelis/source-tfl

TfL (Transport for London) feed source for tube, overground, and Elizabeth line alerts.

Testing

cd packages/aelis-source-tfl
bun run test

Fixtures

Tests use fixture data from real TfL API responses stored in fixtures/tfl-responses.json.

To refresh fixtures:

bun run fetch-fixtures
Description
No description provided
Readme 14 MiB
Languages
TypeScript 97.4%
Shell 1.3%
JavaScript 0.8%
Dockerfile 0.3%
CSS 0.2%