ethereum / esp-website

Website for the Ethereum Foundation's Ecosystem Support Program (ESP):
https://esp.ethereum.foundation/
MIT License
48 stars 36 forks source link
blockchain ethereum gatsby react

Netlify Status

Ethereum Ecosystem Support Program

Ethereum Ecosystem Support Program

The Ethereum Ecosystem Support Program exists to provide both financial and non-financial support to projects and entities within the greater Ethereum community, in order to accelerate the growth of the ecosystem. The Ecosystem Support Program is an expansion of the original Ethereum Grants Program which mainly focused on financial support. Our focus is on deploying our resources where they will have the biggest impact.

This repository holds the codebase to our website, esp.ethereum.foundation

Stack

The main stack used in the project includes:

Local development

The project is bootstrapped with create-next-app, with a custom scaffolding.

Getting Started

First, run the development server:

npm run dev
# or
yarn dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying pages/index.tsx. The page auto-updates as you edit the file.

API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.ts.

The pages/api directory is mapped to /api/*. Files in this directory are treated as API routes instead of React pages.

testing w/hCaptcha locally

We can use hCaptcha testing keys (already defined on .env.local.example) to be able to test forms locally.

Project Structure

The following list describes the main elements of the project structure:

Salesforce Integration

For the custom integration with the Salesforce API, we rely on the JSforce library. Some operations are not documented and were the result of lots of googling, SO and Github issues scanning.

The Salesforce API field names (listed on types.ts) are defined in Salesforce for each corresponding object (Lead, Contract, etc).

Connected App

To enable a custom API integration with Salesforce, you need to create a Connected App. You'll need an account with admin permissions. Go to Setup > App Manager > New connected app to create a new one.

Configuration

Check that your Connected App is configured with the following parameters

Common issues

Some common issues regarding Salesforce data types

Error 'bad value for restricted picklist field' appears when a record is created

when creating a new record, try disabling the 'Restrict picklist to the values defined in the value set' option for the corresponding field.

When adding new Grants

Check that the hardwired string value of Proactive_Community_Grants_Round__c is defined on Salesforce, otherwise submission will fail.

Grantees List data source

The data published in the Latest Grantees list is being pulled from a Google Spreadsheet maintained by the ESP Team. This document uses Markdown syntax as it's also being used as source for other pages.

To accomplish that, we publish the content of the document as CSV and then render it in the LatestGranteesList component. This includes some parsing work, from CSV to JSON and then rendering the Markdown. This process happens server-side only, on build time, so the resulting page is completely static.

Tutorials

Learning NextJS

To learn more about Next.js, take a look at the following resources:

Adding ChakraUI to a NextJS project

This is a very clear and step-by-step guide on it.

Learning ChakraUI

We recommend checking the official docs.