{"id":21660194,"url":"https://github.com/AugurProject/augur-node","last_synced_at":"2025-07-17T23:30:59.578Z","repository":{"id":9199229,"uuid":"59862419","full_name":"AugurProject/augur-node","owner":"AugurProject","description":"Blockchain --\u003e Database (augur-node) --\u003e Client (UI)","archived":false,"fork":false,"pushed_at":"2023-01-11T00:55:36.000Z","size":11561,"stargazers_count":101,"open_issues_count":20,"forks_count":38,"subscribers_count":32,"default_branch":"master","last_synced_at":"2025-07-03T22:19:51.451Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://stats.augur.net","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AugurProject.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-27T20:46:50.000Z","updated_at":"2025-05-12T15:50:04.000Z","dependencies_parsed_at":"2023-01-13T16:23:56.781Z","dependency_job_id":null,"html_url":"https://github.com/AugurProject/augur-node","commit_stats":null,"previous_names":[],"tags_count":102,"template":false,"template_full_name":null,"purl":"pkg:github/AugurProject/augur-node","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AugurProject%2Faugur-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AugurProject%2Faugur-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AugurProject%2Faugur-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AugurProject%2Faugur-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AugurProject","download_url":"https://codeload.github.com/AugurProject/augur-node/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AugurProject%2Faugur-node/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265678462,"owners_count":23810114,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-25T09:32:29.020Z","updated_at":"2025-07-17T23:30:59.132Z","avatar_url":"https://github.com/AugurProject.png","language":"TypeScript","readme":"# Augur Node\n\n[![Build Status](https://dev.azure.com/augurproject/augur/_apis/build/status/AugurProject.augur-node?branchName=master)](https://dev.azure.com/augurproject/augur/_build/latest?definitionId=5\u0026branchName=master)\n[![Coverage Status](https://coveralls.io/repos/AugurProject/augur-node/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/AugurProject/augur-node?branch=master)\n[![npm version](https://badge.fury.io/js/augur-node.svg)](http://badge.fury.io/js/augur-node)\u003cbr/\u003e\n[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)\n\nAugur Node is designed to be a standalone application, including a local\ndatabase setup that supports sqlite as well as postgresql. We use knex to\nmanage the local migrations and schema changes.\n\n## Building\nThis project uses typescript and can be safely built via: `npm run build` or directly with `tsc`. Augur Node requires Node 10.\n\n## Running\n\n### Configuration\n\nBy default, Augur Node is configured to connect to a locally-running Ethereum node at http://localhost:8545 and ws://localhost:8546. To connect to a hosted Ethereum node, set the ETHEREUM_HTTP and ETHEREUM_WS environment variables, as follows:\n\n    $ export ETHEREUM_HTTP=https://rinkeby.ethereum.nodes.augur.net \n    $ export ETHEREUM_WS=wss://websocket-rinkeby.ethereum.nodes.augur.net\n    \nAlso, by default Augur Node will use a local sqlite database to store its processed data. For some use-cases you may want to use a shared database instance -- for this purpose we currently support PostgreSQL in addition to SQLite. To start Augur Node connected to a sqlite database export the `DATABASE_URL` environment variable, with a full connection string for your PostgreSQL instance.\n\nFor a quick-start with PostgreSQL, a development docker image is provided and can be controlled with:\n- `npm run docker:pg:start`\n- `npm run docker:pg:stop`\n- `npm run docker:pg:restart`\n\nThese commands will manipulate a docker container named `augur-postgres` which defaults to having a main database named `augur` and a single user `augur` accessible with the password `augur`.\n\nThe connection string for the instance of PostgreSQL started with the above scripts can be placed in your environment with:\n\n```\nexport DATABASE_URL='postgresql://augur:augur@localhost:5432/augur'\n```\n\n### Starting\n\nFor a quick start, use the `clean-start` script included with our package.json:\n\n```\n$ npm install # If you haven't yet done so\n$ npm run clean-start\n```\nThis will ensure the code has been built, and database migrations run for a fresh start. This will blow away any data that is currently stored in your node.\n\nIf you'd like to simply start a node and begin syncing where you left off, use the `start` script:\n\n```\n$ npm run start\n```\n    \n### Docker\nAugur Node has a Dockerfile and publish docker image which is capable of running augur-node connected to an ethereum node. This will only work out-of-the-box for networks which have been deployed as part of our development deployment process (right now, only Rinkeby).\n\n```\n$ export ETHEREUM_HTTP=https://rinkeby.ethereum.nodes.augur.net \n$ export ETHEREUM_WS=wss://websocket-rinkeby.ethereum.nodes.augur.net\n$ scripts/docker/run.sh augurproject/augur-node\n```\n    \n### Hosted Ethereum nodes\n\nCurrently, augur node has configurations built in for connecting to our hosted rinkeby node. More will be added as we bring up these nodes. For each possible network, pass the network name to the start command for augur-node. E.g. to use clean-start to run with a fresh database:\n\n```\n$ npm run clean-start -- rinkeby\n```\n\nor to run without clearing out previous state:\n```\nnpm run start -- rinkeby\n```\n\n## Schema Migrations\nMigrations are managed via knex and behave similarly to ActiveRecord\nmigrations. As you add migrations, knex tracks the currect applied state in the\ndatabase, and allows you to apply new migrations as they come in.\n\nSee: [http://knexjs.org/#Migrations-CLI]\n\n### Creating Migrations\nNew migrations are in typescript and are store in: ```src/migrations/```\n\nTo use the knex tool to generate a migration in this directly, use the *development* enironment:\n\n```\nknex migrate:make -x ts --env development name\n```\n\n### Running Migrations\n*Make sure your typescript is built before running migrations*\n\n```\nknex migrate:latest --env build\n```\n\n## Data Seeds\nSeed files are used to seed the *test* database. Unlike migrations, seeds are\nmeant only for boostrapping, and so each time seeds are run all the source\nfiles are executed (not just newly added ones). Currently the seeds files drop\nand re-create the tables with each application. \n\nSeeds are stored in src/seeds/`\u003cenvironment\u003e`/*.ts.\n\nSee: [http://knexjs.org/#Seeds-CLI]\n\n### Creating seeds\nThis is similar to creating new migrations, but only one should exist per table for clarity.\n\n```\nknex seed:make seed_name --env development\n```\n\n### Running seeds (For Build Env)\n\n```\nknex seed:run --env build\n```\n\n## Tests\nTests run with in-memory SQLite DBs for each test execution so they won't\noverlap each other. The framework will automatically initialize and seed the\ntests with the data in seed/test for each test.\n\n### Complete Pre-Test Setup\n```\nnpm install\nnpm run build\n```\n\n# Running Tests\n```\nnpm test\n```\n","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAugurProject%2Faugur-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAugurProject%2Faugur-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAugurProject%2Faugur-node/lists"}