{"id":18484396,"url":"https://github.com/giveth/giveth-gatsby","last_synced_at":"2025-04-08T18:33:23.801Z","repository":{"id":38963644,"uuid":"262985955","full_name":"Giveth/giveth-gatsby","owner":"Giveth","description":"Giveth 2.0 implementation in GatsbyJS","archived":true,"fork":false,"pushed_at":"2023-02-15T15:06:25.000Z","size":32140,"stargazers_count":24,"open_issues_count":77,"forks_count":14,"subscribers_count":22,"default_branch":"develop","last_synced_at":"2025-02-22T22:23:53.106Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","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}},"created_at":"2020-05-11T08:38:35.000Z","updated_at":"2024-12-11T10:01:31.000Z","dependencies_parsed_at":"2024-11-06T12:46:37.983Z","dependency_job_id":null,"html_url":"https://github.com/Giveth/giveth-gatsby","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Giveth%2Fgiveth-gatsby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Giveth%2Fgiveth-gatsby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Giveth%2Fgiveth-gatsby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Giveth%2Fgiveth-gatsby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Giveth","download_url":"https://codeload.github.com/Giveth/giveth-gatsby/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247902854,"owners_count":21015535,"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-06T12:39:39.084Z","updated_at":"2025-04-08T18:33:18.792Z","avatar_url":"https://github.com/Giveth.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n`master`\n[![Netlify Status](https://api.netlify.com/api/v1/badges/f914ac7e-ce27-4909-bd3e-14d749731a52/deploy-status)](https://app.netlify.com/sites/giveth2/deploys)\n`staging`\n[![Netlify Status](https://api.netlify.com/api/v1/badges/2f325b5b-e159-443e-bac7-c5e15f3578c0/deploy-status)](https://app.netlify.com/sites/giveth-website-staging/deploys)\n\u003cbr /\u003e\n\u003cp align=\"center\"\u003e\u003ca href=\"https://giveth.io\"\u003e\u003cimg alt=\"Giveth.io\" src=\"https://raw.githubusercontent.com/Giveth/giveth-design-assets/master/02-logos/Giveth%20logo/giveth-symbol-logo-purple.png\" width=\"80\"/\u003e\u003c/a\u003e\u003c/p\u003e\u003ch1 align=\"center\"\u003e\n  Giveth v2\n\u003c/h1\u003e\n\n## 🚀 Quick start\nGiveth-2 is a reimagined version of the [\"Giveth donation application\"](https://github.com/Giveth/giveth-dapp). Users can create projects with a focus on 'for-good' philanthropic causes and receive donations via the Ethereum Blockchain. Donations can be made via ETH or ERC-20 tokens on both Mainnet and xDai Network.\n\nThe projects aims to simplify the application's options to enable new users without blockchain experience a frictionless experience.\n\nIf you want to contribute, pls say hello to us in chat -  [https://giveth.io/join](https://giveth.io/join)\n\n This guide will document the steps to set up and run Giveth.io locally for the purposes of development. The setup process was documented using Ubuntu 20.04 LTS.\n\n**You'll need a couple prerequisites to get started.**\n\n - [Redis](https://redis.io/topics/quickstart)\n - [Postgres](https://www.postgresql.org/download)\n - Bash CLI\n - [Gatsby CLI](https://www.gatsbyjs.com/docs/reference/gatsby-cli/)\n - Configure NodeJS\n      * [For Linux](https://www.gatsbyjs.com/docs/how-to/local-development/gatsby-on-linux/)\n     * [For Windows](https://www.gatsbyjs.com/docs/how-to/local-development/gatsby-on-windows/)\n - Your Favourite Code Editor (VScode for linting presets)\n\n### Install impact-graph from GitHub\nIn order to develop locally you need to clone the backend server as well. We are using https://github.com/topiahq/impact-graph for this.\n\n- via the CLI:\n    ```bash\n    git clone git@github.com:topiahq/impact-graph.git\n    cd impact-graph\n    npm i\n    cp .env.example .env\n    ```\n\n\n### Create a Database and User in Postgres using psql\nFollow this tutorial on PSQL to setup your username and create the database.\nhttps://medium.com/coding-blocks/creating-user-database-and-adding-access-on-postgresql-8bfcd2f4a91e)\n\n**TL;DR**\n```bash\nsudo -u postgres psql\npostgres=# create database \u003cdatabaseName\u003e;\npostgres=# create user \u003cuserName\u003e with encrypted password '\u003cpasswordHere\u003e';\npostgres=# grant all privileges on database \u003cdatabaseName\u003e to \u003cuserName\u003e;\n```\n### Clone and Install the Frontend\n  Head on over to https://github.com/Giveth/giveth-2 and clone the repo.\n  - via the CLI:\n  ```bash\n  git clone git@github.com:Giveth/giveth-2.git\n  cd giveth-2\n  npm i\n  ```\n\n### Get the Environment Variables\n In order to run the local build for Giveth.io you'll need to ask for the environment variables. Head on over to our [Contributors Discord](https://discord.gg/EndTUw9955) say Hi and get in touch with one of the developers.\n\n### Launch the Development Server and Environment\n Make sure the backend server is running; the `impact-graph` from step 1.\n\n To take advantage of linting presets, please use **VSCODE**:\n * Select *File -\u003e Open Workspace*\n * Navigate into the giveth-2 directory\n * Open the workspace file `giveth2-full-stack.code-workspace`\n * Install recommended extensions (Prettier and StandardJS plugins)\n\n Then fire up the local development server.\n\n ```bash\n gatsby develop\n ```\n\n### Start Editing!\n\nOpen up the giveth2 repo on your code editor.\n\nGiveth.io is now running locally at `http://localhost:8000`!\n\n\u003cimg alt='Giveth Running Locally' src={useBaseUrl('img/content/givethlocalresized.png')} /\u003e\n\nYou can also expiremnt with querying your data via GraphQL - you'll find it at this link here - `http://localhost:8000/___graphql`\nLearn more about using this tool in the [Gatsby tutorial](https://www.gatsbyjs.org/tutorial/part-five/#introducing-graphiql).\n\n  Save your changes and the browser will update in real time!\n\n## Contributor Guide\n\n1. Like, star and fork the repo if you want to help with visibility\n1. Have a look at the issue board and choose something to work on\n1. Before starting any work, please at least say \"Hi\" on the **giveth2-dev**/**Giveth2 construction office** channel (see chat links here: https://giveth.io/join)\n3. Even better, after introducing yourself pls join the next **DEV Call** (usually Sunday 17:30 CEST, but watch announcements in the discord channel)\n4. Please ask somebody\n5. If you found the project via a Gitcoin bounty, please make sure to check the issue every few days until completion (Gitcoin requires some proof of life checks)\n6. Please start a new branch on your fork named with the feature/fix you want to attempt and make a **pull request** when you are confident everything is ready to publish\n\n### Gitflow\n\n**master** only for PR's and noncritical hotfixes like typo's after merging - deploys to https://v2.giveth.io\n\n**New features** should be pushed to a new branch named **$featurename** (No **develop** or **release** branches currently, but at least **develop** will be added in the future to have a proper staging environment)\n\n### Styling\n\nStyling should be done in cooperation with senior contributors so a minimum of new styles is introduced locally. As a rule of thumb: all styles that are used more than once or are not very specific to one component should be added in the **Theme UI definition**`src/gatsby-plugin-theme-ui/index.js` whenever possible and additionally to a gatsby page we use to collect all defined styles `src/pages/viewstyles.js` to quickly check consistency.\nPlease refer to some examples in the code to see how we deal with styles. Local overrides and extensions should be done via `sx prop` or `emotionJS`.\n\n### Code conventions\n- as mentioned above contributor code should be linted with StandardJS\n- React components for into the folder `/src/components` and component filenames should be written in Camel case.\n\n### Testing\n\nWe use Cypress to handle end-to-end testing.\nBasic testing can be handled in Netlify but not the tests that required a wallet connected to the DApp. For the latter, you'll need a local setup.\n\nCommands to run tests:\n- All tests: `npx cy:open`\n- Basic end-to-end tests: `npx cy:e2e`\n- Web3 tests: `npx cy:web3`\n\nThe setup for web3 testing is the following:\n- Create a `cypress.env.json` as the `cypress.env.example.json`\n- Paste your local Giveth Token that you can find in your `localStorage` by going to your Giveth's DApp (inspect -\u003e console -\u003e Type `localStorage` in the console). Take the following variable: `giveth_user_local_token`\n- Run the following command to instanciate a HTTP Web3 Provider: `ganache-cli -p 8545`\n\nNow you can run tests that require a wallet!\n\nIf you face some issues verify the Giveth token step and the ganache cli is launched. Then re-run the `npx cy:open` command.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiveth%2Fgiveth-gatsby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgiveth%2Fgiveth-gatsby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiveth%2Fgiveth-gatsby/lists"}