DEDUPED Hot AI repos, turned into use cases Get 5 a day

How to write indexer output to a JSON snapshot instead of Postgres with Nuvex Services

Point the indexer at a JSON read model path to capture decoded account data without running a database.

Who it is forA developer or analyst who wants a file of decoded Nuvex program accounts for offline review and has no Postgres instance.

The problemRunning PostgreSQL just to look at decoded accounts adds setup time. The indexer can write a JSON snapshot instead.

The outcomeA JSON file at the path you set in NUVEX_READ_MODEL_PATH that contains rows decoded from known account layouts.

What you need first

  • Git and a clone of NuvexNetwork/nuvex-services
  • pnpm and make, for `pnpm install` and `make check`
  • A Solana-compatible RPC URL (NUVEX_RPC_URL or NUVEX_SOLANA_RPC_URL)
  • At least one Nuvex program id (NUVEX_ORACLE_CORE_PROGRAM_ID, NUVEX_ORACLE_REGISTRY_PROGRAM_ID, or NUVEX_VERIFICATION_PROGRAM_ID)
  • A PostgreSQL DATABASE_URL, or a NUVEX_READ_MODEL_PATH for a JSON snapshot

Steps

  1. Run pnpm install in the repository root.
  2. Run cp env/.env.local.example .env.local, then set NUVEX_RPC_URL, one program id, and NUVEX_READ_MODEL_PATH.
  3. Start the indexer with the start command in the indexer section (not shown in the README, so check indexer/ first).
  4. Open the file at NUVEX_READ_MODEL_PATH and confirm it contains decoded rows, not placeholder data.

Prompt for your agent

In the NuvexNetwork/nuvex-services repo, set NUVEX_RPC_URL, one program id, and NUVEX_READ_MODEL_PATH=<snapshot-path> in .env.local, run the indexer, then open the snapshot file. Report the number of top-level records and list the first record's keys. Verify that the indexer did not invent rows by comparing record count to the program accounts the RPC returned.

Caveat. The README says the indexer does not invent rows but gives no snapshot schema, so the record structure must be read from the code.

Share: X LinkedIn Hacker News Email Copy link

Disclaimer

Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page