{"id":18484395,"url":"https://github.com/giveth/impact-graph","last_synced_at":"2025-08-30T06:43:57.318Z","repository":{"id":36983010,"uuid":"325557482","full_name":"Giveth/impact-graph","owner":"Giveth","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-25T09:40:02.000Z","size":24233,"stargazers_count":51,"open_issues_count":75,"forks_count":21,"subscribers_count":19,"default_branch":"staging","last_synced_at":"2025-08-25T09:53:47.514Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Giveth.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-12-30T13:26:53.000Z","updated_at":"2025-08-19T14:01:53.000Z","dependencies_parsed_at":"2024-02-03T21:31:30.903Z","dependency_job_id":"94acab2c-8a4f-4276-ba76-668d5f293fd0","html_url":"https://github.com/Giveth/impact-graph","commit_stats":null,"previous_names":[],"tags_count":69,"template":false,"template_full_name":null,"purl":"pkg:github/Giveth/impact-graph","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Giveth%2Fimpact-graph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Giveth%2Fimpact-graph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Giveth%2Fimpact-graph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Giveth%2Fimpact-graph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Giveth","download_url":"https://codeload.github.com/Giveth/impact-graph/tar.gz/refs/heads/staging","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Giveth%2Fimpact-graph/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272815815,"owners_count":24997661,"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","status":"online","status_checked_at":"2025-08-30T02:00:09.474Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-06T12:39:38.522Z","updated_at":"2025-08-30T06:43:57.263Z","avatar_url":"https://github.com/Giveth.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Impact Graph\n\n[![CI/CD](https://github.com/Giveth/impact-graph/actions/workflows/staging-pipeline.yml/badge.svg)](https://github.com/Giveth/impact-graph/actions/workflows/staging-pipeline.yml)\n[![CI/CD](https://github.com/Giveth/impact-graph/actions/workflows/master-pipeline.yml/badge.svg)](https://github.com/Giveth/impact-graph/actions/workflows/master-pipeline.yml)\n\n## 1. Project Overview\n\nImpact Graph is a GraphQL server designed to enable rapid development of serverless impact project applications by managing the persistence and access of impact project data.\n\n### Purpose\nImpact Graph serves as the backend for Giveth's donation platform, providing a robust API for managing projects, donations, user accounts, and various features related to the Giveth ecosystem.\n\n### Key Features\n- **Project Management**: Create, update, and manage charitable projects\n- **User Authentication**: Multiple authentication strategies including JWT and OAuth\n- **Donation Processing**: Handle and verify donations on multiple blockchain networks\n- **Power Boosting**: GIVpower allocation system for project ranking\n- **Quadratic Funding (QF)**: Support for QF rounds and matching calculations\n- **Admin Dashboard**: AdminJS-based interface for platform management\n- **Social Verification**: Integration with various social networks for verification\n- **Multi-Blockchain Support**: Integration with Ethereum, Gnosis Chain, Polygon, Celo, Optimism, and more\n\n### Live Links\n- Production API: https://serve.giveth.io/graphql\n- Staging API: https://staging.serve.giveth.io/graphql\n- Frontend application: https://giveth.io\n\n## 2. Architecture Overview\n\n### System Diagram\nImpact Graph acts as a central API gateway that connects the frontend application with various backend services and data sources:\n\n```\nFrontend Application\n       ↓ ↑\nImpact Graph (GraphQL API)\n       ↓ ↑\n┌──────┴───────┬─────────────┬─────────────┬────────────┐\n│              │             │             │            │\nDatabase    Blockchain    External      Pinata       Redis\n(Postgres)   Networks       APIs       (File Store)   Cache\n```\n\n### Tech Stack\n- **Server**: Node.js with TypeScript\n- **API**: GraphQL (Apollo Server)\n- **Database**: PostgreSQL with TypeORM\n- **Authentication**: JWT, OAuth, Web3 wallet authentication\n- **Caching**: Redis\n- **Task Processing**: Bull for job queues\n- **Admin Interface**: AdminJS\n- **CI/CD**: GitHub Actions\n- **Containerization**: Docker\n- **Blockchain Integration**: Web3.js, Ethers.js\n- **File Storage**: Pinata IPFS\n\n### Data Flow\n1. Frontend applications consume the GraphQL API endpoints\n2. GraphQL resolvers process requests, applying business logic\n3. Data is persisted in PostgreSQL via TypeORM\n4. Blockchain transactions are verified using on-chain data\n5. Scheduled tasks run via cron jobs to sync data, process snapshots, etc.\n6. Redis is used for caching and task queues\n7. Notifications are sent to users through integrated notification services\n\n### Process Diagrams\n\n#### Donation Flow\nThis diagram illustrates how donations are processed in the system:\n\n[![Donation Flow](https://mermaid.ink/img/eyJjb2RlIjoic2VxdWVuY2VEaWFncmFtXG4gICAgYXV0b251bWJlclxuICAgIGFjdG9yIFVzZXJcbiAgICBwYXJ0aWNpcGFudCBGcm9udGVuZFxuICAgIHBhcnRpY2lwYW50IE1ldGFtYXNrXG4gICAgcGFydGljaXBhbnQgQmFja2VuZFxuICAgIHBhcnRpY2lwYW50IERCXG4gICAgcGFydGljaXBhbnQgTW9ub3N3YXBc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ZvIHdpdGggcHJvamVjdCB3YWxsZXQgYWRkcmVzcywgdXNlciwgLi5cbiAgICBCYWNrZW5kIC0-PiBEQjogU2F2ZSBkb25hdGlvbiB0byBEQlxuICAgIERCIC0tPj4gQmFja2VuZCA6IE9rXG4gICAgQmFja2VuZCAtPj4gTW9ub3N3YXAgOiBHZXQgcHJpY2Ugb2YgZG9uYXRlZCB0b2tlblxuICAgIGFsdCBNb25vc3dhcCBjYW4gZmV0Y2ggcHJpY2U6XG4gICAgICAgIE1vbm9zd2FwIC0tPj4gQmFja2VuZCA6IHJldHVybiBwcmljZVxuICAgICAgICBCYWNrZW5kIC0-PiBEQjogVXBkYXRlIHByaWNlVXNkIGFuZCB2YWx1ZVVzZCBvZiBkb25hdGlvblxuICAgICAgICBEQiAtLT4-IEJhY2tlbmQ6IE9rXG4gICAgICAgIEJhY2tlbmQgLT4-IERCOiBVcGRhdGUgcHJvamVjdCB0b3RhbERvbmF0aW9ucyB2YWx1ZVVzZFxuICAgICAgICBEQiAtLT4-IEJhY2tlbmQ6IE9rXG4gICAgZWxzZSBSZXR1cm4gZXJyb3I6XG4gICAgICAgIE1vbm9zd2FwIC0tPj4gQmFja2VuZCA6IFJldHVybiBFcnJvclxuICAgICAgICBub3RlIG92ZXIgQmFja2VuZDogRG8gbm90aGluZ1xuICAgIGVuZFxuICAgIEJhY2tlbmQgLS0-PiBGcm9udGVuZDogT2tcbiIsIm1lcm1haWQiOiJ7XG4gIFwidGhlbWVcIjogXCJkZWZhdWx0XCJcbn0iLCJ1cGRhdGVFZGl0b3IiOnRydWUsImF1dG9TeW5jIjp0cnVlLCJ1cGRhdGVEaWFncmFtIjpmYWxzZX0)\n\n#### Social Network Verification Flow\nThis diagram shows how project verification works through social network accounts:\n\n[![Social Network Verification](https://mermaid.ink/img/pako:eNrFVcFu2zAM_RXCl7VAmgA9-hCga9euQJcNS7tTgEGVaEeNLXkSnSwo-u-jJDtJ03TYgA7zyYbI98j3aOoxk1Zhlmcef7RoJF5oU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VYFQaoKrlPvF2UJXCHVLgrQ1cOQ5UJsSfDzvoQUjNc4-oKRv6HShZQy_tK6-VseJ0lhCsEt0W74pEmjTtARKkOBXcKi0j3AlGnSCUwSQ4wQmPWcBX8X6JEIItK6C-zXISqOhazWIiI7ruuODAQyHw4TQ5cFJEKBXI4evDql1JsAcEGo64YgOD1o2C8h2SoDppVDKofcpm32IBMHYHM78YpPlUCiQ1rCeFPutbKk7c0I0bAhvwsFLom5uKoIL7aV13RT0rLu2vih55Hfd9SPJvt9z9EglKFhpmvNMSm7kO1lGCd7w2Lo1eHKs85ZsI-R4HKq9Yktj_doUNjiRUG4DyPMK90pMsveZKXQz26HNK2vLCt-iyzIiDVKX4a_8o-6iGdPwEVOYoORe_6q9neDouVZJ3W3mgcG-wFRiFwtHoOmdh4cVHXc_Smr5OgheOFsDzdHhjoJbDW-0WbBM5i1UrDqs_6bjvnb7HHGbzYkan49GotHDvuKhtPVoeTqq8TdUYdG9Oo8HbLqKu6y3IO2xKMzu9oqG0dzZFeBPiU3cqbpIjjIoLEWlX-c4560RN-IyLllU8MyciO6wCjGagrIHdjIUvJS3E_H57O7242naPuDbKOxhSbdLsuh3YtmuPfi5bSt-10tkvbi4IHNg4UZZg6Z1jfW4J-AefSG4fPWPebNBVqOrhVZ8Cz_G2zDjX4WnIMv5VWEh2opm2cw8cWjb8J2EH5TmiznLC1F5HGSiJTtdG5nl5Frsg7qbvIt6-gW6nqHe)\n\n## 3. Getting Started\n\n### Prerequisites\n- Node.js (v20.11.0 or later as specified in .nvmrc)\n- PostgreSQL database\n- Redis instance\n- Various API keys for external services (detailed in environment variables)\n\n### Installation Steps\n1. Clone the repository:\n   ```\n   git clone git@github.com:Giveth/impact-graph.git\n   cd impact-graph\n   ```\n\n2. Install dependencies:\n   ```\n   nvm use  # Uses version specified in .nvmrc\n   npm i\n   ```\n\n3. Configure environment:\n   ```\n   cp config/example.env config/development.env\n   ```\n\n4. Set up database:\n   - Either create a PostgreSQL database manually, or\n   - Use Docker Compose to spin up a local database:\n     ```\n     docker-compose -f docker-compose-local-postgres-redis.yml up -d\n     ```\n\n5. Run database migrations:\n   ```\n   npm run db:migrate:run:local\n   ```\n\n6. Start the development server:\n   ```\n   npm start\n   ```\n\n### Configuration\nThe application is configured via environment variables. Key configuration areas include:\n\n1. **Database Connection**:\n   ```\n   TYPEORM_DATABASE_TYPE=postgres\n   TYPEORM_DATABASE_NAME=givethio\n   TYPEORM_DATABASE_USER=postgres\n   TYPEORM_DATABASE_PASSWORD=postgres\n   TYPEORM_DATABASE_HOST=localhost\n   TYPEORM_DATABASE_PORT=5442\n   ```\n\n2. **Authentication**:\n   ```\n   JWT_SECRET=your_jwt_secret\n   JWT_MAX_AGE=time_in_seconds\n   BCRYPT_SALT=$2b$10$44gNUOnBXavOBMPOqzd48e\n   ```\n\n3. **Blockchain Providers**:\n   ```\n   XDAI_NODE_HTTP_URL=your_xdai_node_url\n   INFURA_API_KEY=your_infura_key\n   ETHERSCAN_API_KEY=your_etherscan_key\n   ```\n\n4. **External Services**:\n   ```\n   PINATA_API_KEY=your_pinata_key\n   PINATA_SECRET_API_KEY=your_pinata_secret\n   STRIPE_KEY=your_stripe_key\n   ```\n\nFor a complete list of configuration options, refer to the `config/example.env` file.\n\n## 4. Usage Instructions\n\n### Running the Application\n\n**Development mode**:\n```\nnpm start\n```\n\n**Production mode**:\n```\nnpm run build\nnpm run production\n```\n\n**Docker**:\n```\n# Development\ndocker-compose -f docker-compose-local.yml up -d\n\n# Production\ndocker-compose -f docker-compose-production.yml up -d\n```\n\n### Testing\nRun all tests:\n```\nnpm test\n```\n\nRun specific test suites:\n```\nnpm run test:userRepository\nnpm run test:projectResolver\nnpm run test:donationRepository\n# See package.json for all test scripts\n```\n\nFor running tests with necessary environment variables:\n```\nPINATA_API_KEY=0000000000000 PINATA_SECRET_API_KEY=00000000000000000000000000000000000000000000000000000000 ETHERSCAN_API_KEY=0000000000000000000000000000000000 XDAI_NODE_HTTP_URL=https://xxxxxx.xdai.quiknode.pro INFURA_API_KEY=0000000000000000000000000000000000 npm run test\n```\n\n### Common Tasks\n\n**Creating migrations**:\n```\nnpx typeorm-ts-node-commonjs migration:create ./migration/create_new_table\n```\n\n**Running migrations**:\n```\nnpm run db:migrate:run:local  # For development\nnpm run db:migrate:run:production  # For production\n```\n\n**Reverting migrations**:\n```\nnpm run db:migrate:revert:local\n```\n\n**Admin Dashboard**:\nAccess the admin dashboard at `/admin` with these default credentials (in development):\n- Admin user: test-admin@giveth.io / admin\n- Campaign manager: campaignManager@giveth.io / admin\n- Reviewer: reviewer@giveth.io / admin\n- Operator: operator@giveth.io / admin\n\nCreating an admin user manually:\n```sql\n-- First generate the hash with bcrypt\nconst bcrypt = require('bcrypt');\nbcrypt.hash(\n  'yourPassword',\n  Number('yourSalt'),\n).then(hash =\u003e {console.log('hash',hash)}).catch(e=\u003e{console.log(\"error\", e)});\n\n-- Then insert the user in the database\nINSERT INTO public.user (email, \"walletAddress\", role, \"loginType\", name, \"encryptedPassword\") VALUES\n('test@giveth.io', 'walletAddress', 'admin', 'wallet', 'test', 'aboveHash')\n```\n\n### Project Statuses\n\n| ID | Symbol        | Name          | Description                                                 | Who can change to       |\n|----|---------------|---------------|-------------------------------------------------------------|-------------------------|\n| 1  | rejected      | rejected      | Project rejected by Giveth or platform owner                |                         |\n| 2  | pending       | pending       | Project created, pending approval                           |                         |\n| 3  | clarification | clarification | Clarification requested by Giveth or platform owner         |                         |\n| 4  | verification  | verification  | Verification in progress (including KYC)                    |                         |\n| 5  | activated     | activated     | Active project                                              | project owner and admin |\n| 6  | deactivated   | deactivated   | Deactivated by user or Giveth Admin                         | project owner and admin |\n| 7  | cancelled     | cancelled     | Cancelled by Giveth Admin                                   | admin                   |\n| 8  | drafted       | drafted       | Project draft for a potential new project, can be discarded | project owner           |\n\n- If a project is **cancelled**, only admin can activate that\n- If project is **deactive**, both admins and project owner can activate it\n- Both admins and project owner can deactivate an **active** project\n\n## 5. Deployment Process\n\n### Environments\n- **Staging**: Used for pre-release testing\n- **Production**: Live environment for end users\n\n### Deployment Steps\n1. Changes are pushed to the appropriate branch (staging or master)\n2. GitHub Actions automatically runs tests and builds the application\n3. If all tests pass, the application is deployed to the corresponding environment\n4. Database migrations are automatically applied\n\n### CI/CD Integration\nThe project uses GitHub Actions for continuous integration and deployment:\n- `.github/workflows/staging-pipeline.yml`: Deploys to staging environment\n- `.github/workflows/master-pipeline.yml`: Deploys to production environment\n\n## 6. Troubleshooting\n\n### Common Issues\n\n**Database Connection Issues**:\n- Verify database credentials in environment variables\n- Check that the database server is running\n- Ensure network connectivity between application and database\n\n**Authentication Failures**:\n- Check JWT_SECRET configuration\n- Verify OAuth provider settings\n\n**Blockchain Integration Issues**:\n- Ensure node providers (Infura, etc.) are configured correctly\n- Check API keys for blockchain explorers\n\n### Logs and Debugging\n\n**Viewing Logs**:\n```\n# Install bunyan for formatted logs\nnpm i -g bunyan\ntail -f logs/impact-graph.log | bunyan\n```\n\n**Development Debugging**:\n1. Use GraphQL playground at `/graphql` to test queries\n2. Check server logs for detailed error information\n3. Use the AdminJS interface to inspect data\n\n## 7. Feature Details\n\n### Power Boosting System\n\nImpact Graph supports ranking projects based on power boosted by users. Users with GIVpower can boost a project by allocating a percentage of their GIVpower to that project. The system regularly takes snapshots of user GIVpower balance and boost percentages.\n\n#### Database Snapshot Architecture\n\nThe Power Boosting system uses several key tables:\n\n- **power_boosting**: Records when a user boosts a project\n- **power_round**: Specifies the current round number\n- **power_snapshot**: Records created on each snapshot interval\n- **power_boosting_snapshot**: Stores boosting percentages at snapshot times\n- **power_balance_snapshot**: Records user GIVpower balance at snapshot times\n\nSnapshots are implemented using the `pg_cron` extension on Postgres, which calls a database procedure `TAKE_POWER_BOOSTING_SNAPSHOT` at regular intervals.\n\n#### Materialized Views\n\nThe system uses materialized views to efficiently calculate project boost values:\n\n- **user_project_power_view**: Shows how much GIVpower each user has boosted to a project\n- **project_power_view**: Calculates projects' total power and ranks them\n- **project_future_power_view**: Shows what will be the rank of projects in the next round\n\nFor detailed information on the Power Boosting system, see [Power Boosting Documentation](./docs/powerBoosting.md).\n\n## Additional Resources\n\n- [Power Boosting Documentation](./docs/powerBoosting.md)\n- [QF Round Instructions](./docs/qfRoundInstruction.md)\n- [Admin Permissions](./docs/adminPermissions.md)\n- [Campaigns Instructions](./docs/campaignsInstruction.md)\n\n## Contributing\n\nPlease run `npm run prettify` before committing your changes to ensure code style consistency.\n\n## License\n\nThis project is licensed under the terms included in the [LICENSE](LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiveth%2Fimpact-graph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgiveth%2Fimpact-graph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiveth%2Fimpact-graph/lists"}