Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 93 additions & 0 deletions .github/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Sample workflow for building and deploying a Next.js site to GitHub Pages
#
# To get started with Next.js see: https://nextjs.org/docs/getting-started
#
name: Deploy Next.js site to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Detect package manager
id: detect-package-manager
run: |
if [ -f "${{ github.workspace }}/yarn.lock" ]; then
echo "manager=yarn" >> $GITHUB_OUTPUT
echo "command=install" >> $GITHUB_OUTPUT
echo "runner=yarn" >> $GITHUB_OUTPUT
exit 0
elif [ -f "${{ github.workspace }}/package.json" ]; then
echo "manager=npm" >> $GITHUB_OUTPUT
echo "command=ci" >> $GITHUB_OUTPUT
echo "runner=npx --no-install" >> $GITHUB_OUTPUT
exit 0
else
echo "Unable to determine package manager"
exit 1
fi
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: ${{ steps.detect-package-manager.outputs.manager }}
- name: Setup Pages
uses: actions/configure-pages@v5
with:
# Automatically inject basePath in your Next.js configuration file and disable
# server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized).
#
# You may remove this line if you want to manage the configuration yourself.
static_site_generator: next
- name: Restore cache
uses: actions/cache@v4
with:
path: |
.next/cache
# Generate a new cache whenever packages or source files change.
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
# If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
- name: Install dependencies
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
- name: Build with Next.js
run: ${{ steps.detect-package-manager.outputs.runner }} next build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./out

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
50 changes: 44 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Community Values Experiment
# Organization Values Platform Framework

A Next.js-based application for the Ethereum Values Initiative, allowing community members to collaboratively curate and vote on values that are at the heart of Ethereum.
A generic Next.js-based framework allowing any organization to create their own platform to define, discuss, and vote on values that matter to them.

## Overview

This application is part of Consensys' Web3 for All campaign, developed in collaboration with Intuition Systems. It enables the Ethereum community to submit, discuss, and refine the values that define the ecosystem through a stake-based voting mechanism.
This project is a fork of Consensys' "Community Values Experiment," redesigned as a configurable framework that any organization can easily adapt. It enables communities to submit, discuss, and refine the values that define their ecosystem through a stake-based voting mechanism.

## Prerequisites

- Node.js 20.x or later
- npm
- Web3 wallet (e.g., MetaMask) with Linea network configured
- Web3 wallet (e.g., MetaMask) with your chosen network configured

## Environment Setup

Expand All @@ -23,8 +23,32 @@ NEXT_PUBLIC_GRAPHQL_URL=
NEXT_PUBLIC_CONTRACT_ADDRESS=
NEXT_PUBLIC_PREDICATE_ID=
NEXT_PUBLIC_SUBJECT_ID=
NEXT_PUBLIC_PRIVY_APP_ID=
```

## Customization for your organization

### 1. Basic Configuration

Modify the `src/config/organization-config.tsx` file to customize:
- Organization name, tagline, and description
- Homepage content
- FAQ and informational sections
- External links and resources

### 2. Visual Resources

Place your visual assets in the `public/images/` folder:
- Main logo: `public/images/logo.svg`
- Alternative logo: `public/images/logo-alt.svg`
- Favicon: `public/images/favicon.ico`
- Hero image: `public/images/hero.png`
- Step icons: `public/images/steps/*.svg`

### 3. Contracts and Blockchain Integration

Configure your smart contracts through environment variables and the `contracts` section of the configuration file.

## Getting Started

1. Install dependencies:
Expand All @@ -44,9 +68,10 @@ npm run dev
## Features

- View community-proposed values ranked by votes
- Propose new values for the Ethereum community
- Propose new values for your organization
- Stake ETH to vote for or against values
- Share values on social media platforms
- Fully customizable and configurable interface

## Technical Architecture

Expand All @@ -55,7 +80,20 @@ npm run dev
- Built with Next.js 15+
- Single Page Application (SPA) design
- Web3 integration using wagmi hooks
- Centralized configuration system for easy customization

### Backend

- Intuition GraphQL API integration
- GraphQL API integration
- Configurable smart contracts

## How to adapt this framework

1. Fork this repository
2. Customize the configuration file `src/config/organization-config.tsx`
3. Replace the visual resources in the `public/images/` folder
4. Deploy your customized instance

## Contribution

Contributions to improve this framework are welcome. Feel free to open issues or pull requests.
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "ethereum-values",
"name": "organization-values",
"version": "0.1.0",
"private": true,
"scripts": {
Expand All @@ -11,6 +11,7 @@
"dependencies": {
"@apollo/client": "^3.12.11",
"@metamask/sdk": "^0.32.0",
"@privy-io/react-auth": "^2.9.1",
"@tanstack/react-query": "^5.66.0",
"@wagmi/chains": "^1.8.0",
"next": "15.2.3",
Expand All @@ -23,8 +24,11 @@
},
"devDependencies": {
"@eslint/eslintrc": "^3",
"@types/node": "^22.14.1",
"@types/react": "^19.1.1",
"eslint": "^9",
"eslint-config-next": "15.1.6",
"sass": "^1.83.4"
"sass": "^1.83.4",
"typescript": "^5.8.3"
}
}
Loading