Skip to content

Commit

Permalink
Op season 5 (#67)
Browse files Browse the repository at this point in the history
* Develop (#62)

* added images and icons

* added prorile pages and layout
added projects pages

* updated fonts adding sora

* removed react admin code

* updated navbar

* removed constants
updated action name to deprecate
removed admin page

* Feat/project components (#45)

* added icons and images
removed unused assets
updated favicon and logo icon

* removed supabase not needed

* added hooks for projects and auth

* added components for views

* added next auth for handling user sessions

* updated name and import for pages
added not found for project

* added mock data util
removed uneeded styles function

* added xstate machines for project

* added manifest

* added next auth
removed uneeded library

* updated daisy ui theme with light theme only

* added toaster and footer to root layout

* started mock static pages for projects

* work for components ready for PR

* upated compare ready for PR

* removed screen height

* project build fix

* fixed sanitization error

* Feat/project actions (#44)

* feat(projects): fetch project data

* fixed build issue ready to build

---------

Co-authored-by: Afo <obaone01@gmail.com>

* removed storybook components

* replaced farcaster auth with wallet connect

* EAS schema schemas and metrics schemas (#59)

* feat(uploader): attestation uploader

* feat(uploader): upload metric schemas

* feat(attest): uploaded metrics schema

* feat(schema): project metrics attestation schema

* feat(endorsement): uploaded endorsement schema

* feat(eval): evaluation attestation schema

---------

Co-authored-by: Afolabi <obaone01@gmail.com>

* added compents for profile view
added connect kit t replace farcater

* Building

* late night work added machines for projects
added pnpm workspce
removed uneeded components and views

* latest work

* app building

* late night work

* some more work really coming aling

* more work coming together

* updates

* some more work
state machines complete
app contants created
fixed use client typo

* Pages building fixed param issues

* added neynar for fid lookup by address
updated user object

* more work coming along

* remove uneeded pakages

* some more work done

* sunday work

* extracted components from project details
removed uneeded libs like storybook

* created ProjectEndorsement card

* Added some TODOs for actions
Did some work

Co-authored-by: bitbeckers <code@bitbeckers.com>

* app building

* fix(parse): parse attestation data from EAS

* moved provider to wrap app

* updated packages and names in package.json

* removed transnactin and attest count from project type

* moved eas sepolia client to URQL

* fully migrated to sepolia for testnet attestations

* updated parsing functions

* feat(web3): replace connectkit with appkit (#60)

* feat(web3): replace connectkit with appkit

* fix(copy): use constants for wagmi metadata

* fix(types): WIP updating fetched types

* fixed type error now building

* update made type global

---------

Co-authored-by: Afo <obaone01@gmail.com>

* updated actions for fetching project metrics/endorsments

* wip get attestations working clientside

* fixed type errors app building

* feat(api): autogenerate OP Agora API client

* feat(endorsements): load endorsement profile page

* fix(endorsement): refactor eas flows to hooks and submit endorsement

* feat(claim): claim metrics and fix build

* fix(project): fixed project-row width

* polished project detail page

* fix(table): project overview page table positioning

* aded open source observer key to template

* removed connectkit no longer used

* removed workflow file

* updated lockfile

---------

Co-authored-by: bitbeckers <code@bitbeckers.com>

* added readme

* started updates for polish to ready for for OP season 5
removed uneeded code
moved config files to modules

* fix(api): get project and map op data

* feat(oso): get oso metrics per declared repo

* added tailwind plugin for sorting classes
added assets for home page
updated APP ICON path
remove uneeded code fromtaildwind config
made home page responsive
created home page view

* polished profile views
added global styles for button

* polish work for OP season 5
added clsx, use debounce for list pagination/search
added down level interation for sets
added svgs for toast notifications
updated session state with badgeholder data
removed zinc and gray colors only using slate
removed console logs

* added api key for OSO requests
removed date from project list
moved fetching endorsments to useEndorsements
remove uneeded utils

* fixed type errors

* polish based on task list: https://terms-guess-9fo.craft.me/iApHT2nf7HOjuP

Logout updates
Toast positioning updates
endorsment on Optimism
fix profile pages returning null
exported sharper logos
restructured projects page
optimized fetching of product ignoring metrics

* completed more polish based on tasks list
Updated copy for homepage
Finalize colors for consistencies
fixed default values for project info and attestations

* updated to op chain fixing bug

* fixed endorsment susing sepolia cleint
remove uneeded imports

* fixed bugs with UI

* moved fetching endorsments to client components

* moved from local state to react query for endorsments

* polish endorsements showing

* fixed type errors

---------

Co-authored-by: bitbeckers <code@bitbeckers.com>
  • Loading branch information
Oba-One and bitbeckers authored Sep 21, 2024
1 parent da3f463 commit cfa6939
Show file tree
Hide file tree
Showing 81 changed files with 6,394 additions and 4,378 deletions.
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true
}
57 changes: 57 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Impact Reef

## Overview

Impact Reef is a Web3-based project designed to improve the impact evaluation framework within the Optimism ecosystem. The platform focuses on capturing qualitative input via endorsements and attestations using EAS (Ethereum Attestation Service) for public good projects. This approach provides evaluators with strong qualitative input, enhancing the robustness of impact assessments. This project is part of a broader mission by the Greenpill Dev Guild to elevate the visibility and effectiveness of impact metrics and their corresponding evaluations.

## Getting Started

This repository is structured as a monorepo using **pnpm**. All code is located under the `packages` directory, which includes subdirectories for `client` and `eas` (containing scripts for deploying schemas and attestations to EAS). These can be run simultaneously in a local environment to facilitate end-to-end development and testing.

### Prerequisites

Ensure you have the following dependencies installed:

- [Node.js](https://nodejs.org/en/download/current) version 18+ for running scripts and PNPM.
- [PNPM](https://pnpm.io/installation) version 6+ for package management.

### Installation

1. Clone the repository:
```bash
git clone https://github.com/greenpill-dev-guild/impact-reef.git
```
2. Navigate to the project directory:
```bash
cd impact-reef
```
3. Install dependencies using pnpm:
```bash
pnpm install
```
4. Start the development environment:
```bash
pnpm dev
```

### Tests

Tests can be run at both the package level and root level for the client using `pnpm run test`.

#### Testing Structure

- **Clients**: Tests are written using Vitest and Testing Library.

## Architecture

The repository is organized into packages, each containing code for different aspects of the application, from clients to EAS scripts. The `client` package focuses on the user-facing interface, while the `eas` package handles Ethereum attestation schemas and related scripts.

### Technologies Used

- **Language**:

- [Typescript](https://www.typescriptlang.org/download): Used across both client and EAS scripts.

- **Core Libraries**:
- [Next.js](https://nextjs.org): Framework used for building the client-side application.
- [EAS (Ethereum Attestation Service)](https://attest.org): Used for creating and managing attestations on-chain.
5 changes: 3 additions & 2 deletions packages/client/.env.template
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
AUTH_SECRET
NEYNAR_API_KEY
AGORA_API_URL
AGORA_API_KEY
OPEN_SOURCE_OBSERVER_API_KEY

NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID
NEXT_PUBLIC_ALCHEMY_ID
OPEN_SOURCE_OBSERVER_API_KEY

3 changes: 3 additions & 0 deletions packages/client/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"plugins": ["prettier-plugin-tailwindcss"]
}
41 changes: 29 additions & 12 deletions packages/client/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,22 +1,39 @@
import withBundleAnalyzer from "@next/bundle-analyzer";

const AGORA_API_URL = process.env.AGORA_API_URL;
const AGORA_API_KEY = process.env.AGORA_API_KEY;

const hostnames = [
"euc.li",
"ens.xyz",
"content.optimism.io",
"cdn.charmverse.io",
"storage.googleapis.com",
"i.imgur.com",
"imagedelivery.net",
"i.seadn.io",
"lh3.googleusercontent.com",
"picsum.photos",
];

/** @type {import('next').NextConfig} */
const nextConfig = {
async redirects() {
return [
{
source: "/",
destination: "/projects",
permanent: true,
},
];
env: {
AGORA_API_URL: AGORA_API_URL,
AGORA_API_KEY: AGORA_API_KEY,
},
webpack: config => {
config.externals.push('pino-pretty', 'lokijs', 'encoding')
return config
reactStrictMode: true,
webpack: (config) => {
config.externals.push("pino-pretty", "lokijs", "encoding");
return config;
},
images: {
domains: ["picsum.photos"],
remotePatterns: hostnames.map((hostname) => ({
protocol: "https",
hostname,
port: "",
pathname: "/**",
})),
},
};

Expand Down
26 changes: 19 additions & 7 deletions packages/client/orval.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
import {defineConfig} from 'orval';
import { defineConfig } from "orval";

export default defineConfig({
agora: {
input: 'https://vote.optimism.io/api/v1/spec',
output: {target: './src/__generated__/api/agora.ts', baseUrl: "https://vote.optimism.io/api/v1/"},
hooks: {
afterAllFilesWrite: 'prettier --write',
"op-agora": {
input: "https://vote.optimism.io/api/v1/spec",
output: {
mode: "split",
target: "./src/__generated__/api/agora.ts",
client: "fetch",
baseUrl: "https://vote.optimism.io/api/v1",
mock: false,
override: {
mutator: {
path: "./src/utils/custom-fetch.ts",
name: "customFetch",
},
},
},
});
hooks: {
afterAllFilesWrite: "prettier --write",
},
},
});
Loading

0 comments on commit cfa6939

Please sign in to comment.