Skip to content

Conversation

@caidanw
Copy link
Contributor

@caidanw caidanw commented Nov 25, 2025

Summary

  • Setup drizzle and db schema.
  • Added docker compose for easier development.
  • Updated the ingestion endpoint to handle events from the sync tool and store valid lexicons in the database.

With settings optimized for JSON usage
… in ingest route

Add type guards and event interfaces to distinguish between 'user' and 'record' events from Nexus. Only 'record' events are processed; 'user' events are ignored as per current requirements. Improves type safety and prevents unwanted processing of irrelevant events.
…t route

- Expand the RecordEvent type with detailed record fields for better type safety
- Add ackEvent and retryEvent helpers for consistent Nexus event responses
- Refactor POST handler to use new helpers and always acknowledge events
- Improve error handling to prevent retry loops
…nsid

- Add db and lexicons schema imports
- Expand RecordEvent type to type record with id/nsid
- Upsert lexicon records into db on record events
- Log ingested events with id, nsid, cid, and action
@caidanw caidanw requested a review from elijaharita November 25, 2025 23:45
Copy link

@BinaryFiddler BinaryFiddler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just one question about postgres as I just ran into this in a separate project when upgrading from postgres 17 to 18

- NEXUS_LOG_LEVEL=info

postgres:
image: postgres:17-alpine

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Do we want to use 18 which is the current version and has some performance improvement?

In subsequent versions of postgres the mount directory is changed to: /var/lib/postgresql, https://github.com/docker-library/docs/blob/master/postgres/README.md#pgdata, potentially save some debugging down the line should people upgrade the db version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants