Code Monkey home page Code Monkey logo

guild.xyz's Introduction

Guild.xyz interface

Code check

Open source interface for Guild.xyz -- a tool for platformless membership management.

Key dependencies overview

  • Framework
    • React with Next.js
  • Styling:
    • Chakra UI (migration to Tailwind CSS and Radix UI in progress)
    • Phosphor icons
    • Framer motion
  • State management:
    • SWR for fetching and caching
    • React Hook Form for form state
    • jotai for custom, simple global state
  • Testing:
  • Web3 related:
    • viem
    • wagmi for connection management
  • Data visualization, graphics:
    • visx
    • threejs
  • Deployment:
    • Vercel
  • Product analytics:
    • PostHog
  • Error monitoring:
    • BugSnag

Development

Running the interface locally

  1. npm i
  2. npm run dev
  3. If you don't have the secret environment variables, copy the .env.examples as .env.local. After that you need to run node mockWaas.js after npm i. The Google login functionality won't be available in this case

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

Warning

We've recently turned on strict and strictNullChecks tsconfig options, and decided to gradually fix the related TypeScript issues. The pre-commit hook will ignore these, but it is expected that you'll see different issues during local development. Feel free to open a PR if you fix some of them. 😉

For Windows users

If you encounter the error ERR_OSSL_EVP_UNSUPPORTED you can do :

export NODE_OPTIONS=--openssl-legacy-provider
npm i --force
npm run dev

Getting secret environment variables (for core team members):

  1. Get added to the team on Vercel
  2. npm i vercel@latest -g
  3. vercel link
  4. vercel env pull .env.local

Code guidelines

  • Always use design system values for styling when possible
  • Follow the file naming and folder structure pattern of the repository

Committing

  • Use Conventional Commits when applicable (recommended but not required)
  • Always use present tense in commit messages
  • Always review your changes before committing
  • A pre-commit hook type checks the code base. If it fails but you want to commit a WIP anyway use --no-verify

PR flow

  • Always create a draft PR right away when starting to work on a new branch
  • Vercel creates a unique link for each commit and each branch (showing the latest version of the branch), which you can get from the deployment page. Share the branch link with the team if needed
  • Always self-review changes in your PR before asking others. Refactor, clean up and add comments if needed. Repeat until there's no room for improvement that you see, or you've left a comment where there is
  • If you consider it ready, mark it as ready for review and ask for a review, or merge it by yourself if you have the permission

guild.xyz's People

Contributors

balintligeti avatar bigint avatar brickheadjohnny avatar brunya avatar cs-balazs avatar d3vl0per avatar devidxyz avatar dominik-stumpf avatar dovalid avatar ejayxyz avatar fbalint avatar gdn992 avatar grp06 avatar kef1rke avatar kovjonas avatar liszper avatar marclllaks avatar omahs avatar pasthelod avatar pumpkinseed avatar rex4539 avatar snyk-bot avatar tchataigner avatar tomiohl avatar zgen-marci avatar

Stargazers

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

Watchers

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

guild.xyz's Issues

SnapshotFormCard fixes

  • Store strategy parameters in a unique field, e.g. strategyParams instead of the value field
  • Map the strategyParams object to the value key (if needed) after submitting the form
  • Remove the Next.js /api/strategies endpoint, it's unnecessary

Groups

  • Display groups on the home page - using a Switch or even a Tabs component maybe?
  • Search groups (home page)
  • Group page - list guilds just like on the home page & display members like on the [guild] page
  • Create guild page - with selectable and searchable guild (with dummy data for now!)
  • Error animation on Create Group page
  • Fix searchbar & order select spacing / layout
  • Finalize submit button placement

Refactor: composition instead of ugly abstractions and duplication

Composition to remove ugly inner logic:
CustomizationButton
DeleteButton
(there's more but things will likely change in a way that we'll be able to just remove the affected logic from them so that's all for now)

And to remove duplication:
Layout, GroupLayout
GuildCard, GroupCard, SelectableGuildCard

New API endpoints

Some API endpoints got removed / renamed, so we should rename them on the frontend too.

Min/max NFT attribute types

In some cases, NFT attributes aren't just plain strings / numbers. If the attribute format is "attribute_name": [0, 1], then it's a min-max attribute, and we should display it in the proper format.

Insert fun easter eggs in our UI in guild.xyz

Insert fun easter eggs in our UI in guild.xyz

Prize Bounty

0.25 ETH (∼ 1000 USD)

Challenge Description

Hide easter eggs in our UI, be creative and drop little animations, reactions, art in alpha.guild.xyz. Create creative Pixel Art that is only seen when a user is interacting with the page.

Submission Requirements

Fulfills the description, fits in the software stack and fits the theme of guild which is pixel art/medieval/crypto.

Judging Criteria

Fulfills the requirements, most creative and relevant to the given themes.

Winner Announcement Date

27 of November

Resources

Alpha: https://alpha.guild.xyz
Github repository: https://github.com/AgoraSpaceDAO/guild.xyz
Discord: https://discord.gg/bUEGDmy76H

Different page/route for editing

Exporting guild and group editing to [guild]/edit and [group]/edit, so browser navigation and tree-shaking will work correctly and the code is nicer

Search NFTs on Opensea

When a user provides an address in the NftFormCard component, we should check if it's available on Opensea, and if possible, list its attributes.

Different page/route for groups

Exporting groups logic to groups.tsx, so it's shareable with a link, browser navigation will work correctly and the code is nicer

Fix issues with the create/edit forms

  • Edit page: initialize form values in useForm instead of resetting the form
  • NftFormCard: maybe it would be more convenient to register requirements.${index}.value0 and requirements.${index}.value1, so we don't need to conditionally register value, value.0, and value.1
  • We could also add proper types to our form. E.g.: FormData type here: https://react-hook-form.com/get-started (TS section)
  • Maybe we shouldn't use local state variables (like tokenDataFetched in the TokenFormCard component) for form validation, we could instead set & clear errors in useEffect with setError: https://react-hook-form.com/api/useform/seterror#main
  • I think we should still wrap our custom select component in a Controller, and pass the provided props (ref, onChange, onBlur) to the select component. We'll just need to slowly rewrite the formcards to find out why could we see some "stuck" input fields in our fieldArray...
  • For numeric inputs, we should use onChange properly instead of converting the input's value inside the value prop. E.g.: onChange={(newValue) => field.onChange(parseInt(newValue)), so the new value will be inserted as number in the form

FieldArray note (from the docs): inline defaultValue is required when working with useFieldArray by integrating with the value from fields object.

Optional:

  • We could use the official devTools for easier debugging: @hookform/devtools
  • WhitelistFormCard: https://react-hook-form.com/faqs => "How to work with modal or tab forms?"

Discord bot setup guidance

After adding the bot to a custom server, check if it's above every role, and if not display a modal that explains what to do that only closes once it has been moved to the top

DC/TG access info

Display access info on guild page (e.g.: Discord - {guild dc} - {channel name}

Create whitelist modal

We should show a modal when the user clicks on the "+ Whitelist" button, so they can paste and see whitelisted addresses in a more convenient way.

ThemeColor & ThemeMode improvements

  • Guilds in a specific group should use the group's theme mode
  • Group page: title color should be determined dynamically (based on cover background color)
  • Group page: cover color should be the picked theme color, and not the generated 500 swatch

Integrate token-gated access to Jitsi for Guilds

Integrate token-gated access to Jitsi for Guilds

Prize Bounty

1.2 ETH (∼5000 USD)

Challenge Description

Use a custom logic of NFTs, NFT traits, Snapshot strategies, POAPs or any ERC 20 tokens to gate video calls. Integrate alpha.guild.xyz’s API into Jitsi to its “create a meeting” page. On this page there should be a MetaMask integration where a message has to be signed, after signing the user should be able to choose a guild they are a part of from the API, and start a private call for that guild. The user can then send invitation links, but the recipients can only enter the call if they qualify for that guild’s requirements after signing a Metamask message.

Submission Requirements

Create a code repository for this Jitsi fork with the guild.xyz implementation that fulfills the description. It is possible to create a gated Jitsi call with guild requirements and the ones who don’t qualify can’t enter.

Judging Criteria

Fulfills the requirements in the safest way with the best UI/UX

Winner Announcement Date

27 of November

Resources

API doc: https://gist.github.com/Brunya/a49247445790baa2e8164c2771f034a7
Discord: https://discord.gg/bUEGDmy76H

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.