Credentials. DATABASE_URL and the RPC URL go into .env.local, so keep that file out of version control and do not share the database connection string.
Who it is forA developer who needs a local read API that shows Nuvex network state from data the indexer wrote, not from live chain calls.
The problemThe API reads requests, nodes, and network counts from the indexer store. Without an indexed database, those endpoints have nothing to return.
The outcomeA running API where GET /health reports authority: none and the other read endpoints return rows the indexer decoded from program accounts.
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
- Run
pnpm installin the repository root. - Run
cp env/.env.local.example .env.localand set NUVEX_RPC_URL, one program id, and DATABASE_URL in it. - Apply the SQL files in
indexer/prisma/migrations/to the database before starting the API. - Start the indexer with the start command described in the indexer section of the README (the exact command is not shown there, so check the indexer/ folder), then start the API.
- Open GET /health on the API and confirm the response includes authority: none.
Prompt for your agent
Work in the NuvexNetwork/nuvex-services repo. Using the .env.local values for <rpc-url> and <database-url>, apply the migrations in indexer/prisma/migrations/, start the indexer and API, then call GET /health. Report the response body and confirm it says authority: none, and state whether the program account counts returned by the API are non-empty.
Caveat. The indexer exits with code 2 unless an RPC URL, a program id, and either DATABASE_URL or NUVEX_READ_MODEL_PATH are all set, and the README does not give the start command.
Get 5 new use cases every morning. Free, one short email, unsubscribe anytime.
Get them freeShare: 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