GithubHelp home page GithubHelp logo

scaffold-eth / buidlguidl-v3 Goto Github PK

View Code? Open in Web Editor NEW
13.0 6.0 18.0 9.16 MB

Home Page: https://app.buidlguidl.com/

License: MIT License

JavaScript 98.50% CSS 0.42% Less 0.21% Solidity 0.87%

buidlguidl-v3's Introduction

BuidlGuidl v3

The ๐Ÿฐ BuidlGuidl is a curated group of Ethereum builders creating products, prototypes, and tutorials with ๐Ÿ— scaffold-eth

BuidlGuidl v3 homepage

Prerequisites

Node (v16 LTS) plus Yarn.

Every package in this monorepo (backend, hardhat, react-app) comes with a .sample.env file. The one inside packages/backend is the only one required to set up (copy it to packages/backend/.env). All the others work out of the box.

If you want to connect to a local firebase instance:

  • Install the firebase CLI
  • Set FIRESTORE_EMULATOR_HOST=localhost:8080 in packages/backend/.env
  • Seed the local firebase: Copy packages/backend/local_database/seed.sample.json to packages/backend/local_database/seed.json and tweak it as you need. You can always clean up the data in the Firestore UI and re-import by stopping & running yarn backend again.

If you want to connect to your live firebase instance:

  • Donwload the serviceAccountKey.json file from the Firebase UI
  • Comment out the FIRESTORE_EMULATOR_HOST env var.
  • Set GOOGLE_APPLICATION_CREDENTIALS to the correct path to your serviceAccountKey.json

Project setup

Install dependencies:

yarn install

(Optional) Start the firebase emulators (vs set up a live Firebase instance)

# You might need to add a real "--project <projectName>" (run firebase projects:list)
firebase emulators:start

Start the backend service:

yarn backend

In a new terminal, start the frontend:

yarn start

At this point, the APP should be available at http://localhost:3000.

buidlguidl-v3's People

Contributors

carletex avatar dependabot[bot] avatar dgrcode avatar hexedout avatar mikery avatar technophile-04 avatar viraj124 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

buidlguidl-v3's Issues

Add country flag on builder profiles

Allow builders to optionally set their country. Let's see if there is a nice react component select component for it.

We can add it as part of "update socials":

image

image


For display: Visible to all users. Not sure the best place to put it:

image

Maybe below the address / above the cohort?


Implementation details:

  • We'd need to update the signature + validation to include it in the "socials" signature
  • We can save the field on the builder document root (instead of inside the social object)

Access to Admin Route when Admin url is pasted on Address bar

Anyone can access the admin route by typing the URL into their browser's address bar, even if they are not authorized as admins. Although Interaction to Page is restricted, I think it's best if this page doesn't show at all to non admin.

Screenshot 2024-04-11 at 11 22 56

Steps to Reproduce

  1. Pasting "https://app.buidlguidl.com/admin/add-builder" on address bar shows the admin page

Expected Behavior

Non-admin users should be redirected to the homepage when attempting to access the admin route through address bar

Stream Indexer

@mikery is working on the stream indexer here.

Writing down a few notes so we can get closer to the final version.

Indexer Code

Event payload

Inside the event payload, can we also get the timestamp of the event?

Mainnet Provider

  • Connect to the provider outside the getStreamEvent function, since we'll be calling it for each user.
  • Use dotenv to get the infura ID.
  • Since you are using infura, maybe the variable name should be "mainnetProvider" :D

Prettier

We use prettier to (automatically) follow the same coding standards (spacing, semicolons, etc) in the project.

If you are familiar with it, check the config file and apply it to this file.

If not, don't worry, I'll prettify it once we integrate it in the project.

Infrastructure

I think it'd be best if we run this within this project.

We are using Firebase + Google App Engine (GAE) to run the BuidlGuidl v3 backend (check packages/backend)

Not sure if you are familiar with the Google Cloud, but I think we should go for it (Avoid different providers overhead and easier integration with Firebase). It seems the GAE allows having multiple web services (https://cloud.google.com/appengine/docs/standard/nodejs/configuration-files), so maybe we could have a folder inside packages/backend with the code and the needed .yml to deploy.

If we don't like this option, or we encounter some limitations, we could also use Google Cloud functions.

Add element to BuildCard component to signify scaffold-eth hackathon winners

Reason: Nifty way to celebrate and show off SE / BuidlGuidl hackathon winners. Database data will need to be implemented by database admin. A script to add "hackathon_winner" property to all build database items will ensure database entries have consistent structure.

Will need the following:

  1. A script to add new boolean property "BG_hackathon" to db items to maintain consistency for all db "build" items.
  2. Add prop to component.
  3. Add icon emoji element to BuidlCard if BG_hackathon is true.

New property could also be of type string, for example "Buidl Guidl Hackathon Spring 2023 Winner". String value can be used as tool tip.

Graduate builders

At some point, some builders with a stream might graduate (work for a company, start their own thing, etc). This builders keep showing on the all the list where we show streamed builders (homepage, admin fund page, etc).

One solution (already available) could be to edit these builders and remove their stream info. But we want a way to marked them as graduated (maybe we'll show this info at some point) + it's easier to bring their back (graduate / ungraduate).

So the spec would be something like this:

A good example, similar to this, could be packages/react-app/components/BuilderStatus.jsx and all that derives from there (backend routes, signatures, etc)

Front-end

  • Create a GraduateBuilder component that shows the graduate/ungraduate button and handles all the logic, talks to the server, etc.
    • We want to be able to provide a reason for the graduation (non-mandatory). So maybe a modal (when clicking the "graduate" button) with a textarea could be nice.
  • Display logic
    • We can show this button on their profile & admin funding page
    • We won't show graduated builders on:
      • The homepage
      • The admin fund page
    • In their profile, where the stream is showing rn, we could have a "Graduated" text in there.

Backend

  • Handle new routes
  • New signatures
  • Database operations

Add cohorts

Get cohort data into Firebase + index events from contracts + expose API endpoint

ToDo

  • Create OG cohorts from script (#74)
  • Simple API to get DB cohort data (#74 )
  • Indexer script to get all contract events (mainnet & op) (#76)
  • Save events into database (#76)
  • Add cron to google cloud to call the indexer script (#76)
  • New event for withdraws (cohort.withdraw) to show in the /activity page (similar to stream.withdraw) (#76)
  • Create a BG account for cohorts members that are not in BG already
  • New admin page (as /admin/fund-builders) to show current balance of every cohort contract + latest withdraw / etc (extra: button to send ETH for each contract) (#79)
  • Stats for BG landing (totalWithdrawn global + totalWithdrawn per cohort) /cohorts/stats (#80)

Display ENS Avatar if user has ENS

Display ENS Avatar if builder has an ENS. Continue using QRPunkBlockie if builder doesn't have ENS or if their ENS avatar isn't set.

Will affect the following components:

  • Account component used to show logged in user in the Header
  • Address component that is used in Activity page, Builders page and Vote Builds page
  • BuilderProfileCard that is used in the dynamic route for builders / builders' portfolio dashboard

I pretty much have this working already.

Cohorts total streamed calculation

Comparing total withdrawn data from buidlguidl website with streamogator I found some Cohorts with different data.

Here are the details of the difference:

Cohort Bg hackers BG streamed streamo hackers streamo streamed ETH difference Builders difference
Main Hacker House 14 60.82 15 38.44 22.38 1
Play Full 13 13.58 13 8.21 5.37 0
Infrastructure 4 7.74 4 5.74 2 0
BG Outreach 3 14 3 10.63 3.37 0
Not Just Notfellows 7 6.98 7 5.95 1.03 0
Security & Optimizooors 2 2.5 2 1.5 1 0
Autonomous Worlds 7 9.49 7 5.99 3.5 0
ZK & Cryptography 15 23.65 14 18.75 4.9 1

Digging a bit into the withdrawal data, found the correct value was streamogator's.

I think the reason of the difference is there are duplicated builders (builders added a couple of times onchain) in these cohorts, and we are counting the withdrawn ETH twice for those builders.

Example:

There is a couple of Cohorts with 1 builder difference, but haven't figured out yet the reason, but in that case the correct data is in BG website.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.