StabilityNexus / FairFund

5 stars 8 forks source link

"My Activity" page, Sign-In with Ethereum functionality and join a space functionality. #42

Closed adityabhattad2021 closed 2 months ago

adityabhattad2021 commented 2 months ago

Closes #41

Overview:

This PR implements the "My Activity" page to enhance user personalization and tracking of platform activities. Additionally, it introduces Ethereum sign-in functionality using @web3modal/siwe, siwe, and nextauth.

Changes Made:

  1. Sign-In with Ethereum:
    • Integrated Sign-In with Ethereum functionality.
    • Implemented authentication using @web3modal/siwe, siwe, and nextauth.
    • Users receive a signed JWT cookie as a session token upon successful sign-in.

Here is the sign in flow: FairFund Sign In With Ethereum

  1. Database Updates:
    • Added a User table to store user information.
    • Linked existing tables (Spaces, FundingVaults, Proposals) to the new User table to track user activities.

ER Diagram for the database schema: FairFund ER Diagram

  1. Implement the functionality to join space.

    • Create a new component with a join space button.
    • Link it with a server action to link user account to a space as a member.
    • Add join space button to the space details page.
  2. "My Activity" Page:

    • Created a profile page to display user interactions.
    • Users can view joined/created spaces, created vaults, and proposals in one place.