Skip to content
Merged
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
6 changes: 0 additions & 6 deletions .gitignore

This file was deleted.

4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "lib/forge-std"]
path = lib/forge-std
[submodule "vlayer/lib/forge-std"]
path = vlayer/lib/forge-std
url = https://github.com/foundry-rs/forge-std
71 changes: 12 additions & 59 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,66 +1,19 @@
## Foundry
# Compass 🧭

**Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.**
![🧭 Compass](https://github.com/user-attachments/assets/4edaeabb-2a20-4ad7-a8dc-2ee4b97b286e)

Foundry consists of:
_Compass connects verified (g)local issues with builders and bounties at global hackathons._

- **Forge**: Ethereum testing framework (like Truffle, Hardhat and DappTools).
- **Cast**: Swiss army knife for interacting with EVM smart contracts, sending transactions and getting chain data.
- **Anvil**: Local Ethereum node, akin to Ganache, Hardhat Network.
- **Chisel**: Fast, utilitarian, and verbose solidity REPL.
Compass is a platform designed to reorient global hackathons toward grounded, collective impact by connecting local community stakeholders and their needs with builders, funders, and organizers. Through a system of verified issue-sourcing, Compass enables communities —especially those historically excluded from innovation spaces— to articulate concrete problems they face. These needs are translated into actionable prompts and integrated into the hackathon's unique workflow as complements to bounties, featured challenges, or curated tracks, compatible with existing parameters on the organizer's side, and as hackathon ideas on the builder's side.

## Documentation
Rather than relying on the benevolence of sponsors or organizers to champion local relevance, Compass embeds mechanisms of accountability, visibility, and reciprocity at the protocol and UI/UX levels. It makes the “localhost” visible at the global scale.

https://book.getfoundry.sh/
The platform includes:
- Issue Verification Layer: A lightweight, trust-based system (potentially leveraging proof-of-humanity or social attestations) for validating that submitted problems are grounded in lived experiences of specific communities.
- Navigator Dashboard: A UI for organizers and curators to browse, cluster, and remix community-sourced issues into complements to hackathon bounties, specific challenges, or even curated tracks, and ensure issue diversity and locality.
- Builder Interface: Participants can filter challenges by locality, theme, or affected group; form teams based on shared affinities; and explore historical issue–solution–adoption arcs.
- Reciprocity Layer: A system that tracks whether projects born from local issues return value to the communities of origin —whether through royalties, integrations, or future collaborations.

## Usage
Compass operates on the principle of cosmolocalism: making the local visible, meaningful, and influential in the global digital commons. It draws inspiration from concepts like “Sympoiesis”, derived from Greek words meaning "making-with", pointing at interdependence and co-creation. Ultimately, Compass acts as a kind of digital grandmother —grounded, wise, and quietly routing energy toward the heart of things.

### Build

```shell
$ forge build
```

### Test

```shell
$ forge test
```

### Format

```shell
$ forge fmt
```

### Gas Snapshots

```shell
$ forge snapshot
```

### Anvil

```shell
$ anvil
```

### Deploy

```shell
$ forge script script/Counter.s.sol:CounterScript --rpc-url <your_rpc_url> --private-key <your_private_key>
```

### Cast

```shell
$ cast <subcommand>
```

### Help

```shell
$ forge --help
$ anvil --help
$ cast --help
```
The system is designed to be integrated into existing hackathon platforms (e.g., ETHGlobal, DoraHacks, Devfolio) as an opt-in module, and ultimately aims to become the protocol standard for fair issue-sourcing and community-aligned innovation at scale.
41 changes: 41 additions & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/versions

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# env files (can opt-in for committing if needed)
.env*

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
36 changes: 36 additions & 0 deletions app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).

## Getting Started

First, run the development server:

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.

This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
47 changes: 47 additions & 0 deletions app/api/suggest/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import { OpenAI } from 'openai'
import { NextResponse } from 'next/server'
import sponsors from '@/lib/sponsors_tracks.json'

const openai = new OpenAI({
apiKey: process.env.OPENAI_API_KEY,
})

export async function POST(req: Request) {
const body = await req.json()

const problems = body.problems || []
const sponsorContext = JSON.stringify(sponsors, null, 2)

const prompt = `
You are an expert hackathon assistant. Based on these sponsor tracks and themes:

${sponsorContext}

And the following local community problems:

${problems.map((p: any, i: number) => `${i + 1}. "${p.title}" - ${p.description}`).join('\n')}

Suggest 1 creative, feasible hackathon project idea that aligns with 1-3 sponsors to help solve one of these problems.

Format your response in markdown like this:

# 🚀 [Project Title]

## 🔍 Sponsor Track
[Sponsor names and tracks]

## 💡 Project Idea
[2-3 sentence description of the project, its technical components, and how it helps solve the problem]
`

const response = await openai.chat.completions.create({
model: 'gpt-4',
messages: [{ role: 'user', content: prompt }],
temperature: 0.7,
})

const content = response.choices[0].message.content || ''
const suggestions = [content.trim()]

return NextResponse.json({ suggestions })
}
92 changes: 92 additions & 0 deletions app/app/api/suggestions/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
import { NextResponse } from 'next/server';
import OpenAI from 'openai';
import { ProblemBrief } from '@/lib/types';

// Initialize OpenAI client
const openai = new OpenAI({
apiKey: process.env.OPENAI_API_KEY,
});

export async function POST(request: Request) {
let problemData: Partial<ProblemBrief> = {};

try {
const problem: ProblemBrief = await request.json();
problemData = problem;

const prompt = `Generate 2 innovative hackathon project ideas to solve this community problem:

PROBLEM CONTEXT
Title: ${problem.title}
Description: ${problem.description}

For each solution, provide a response in exactly this format (including emojis):

🚀 Project Title: [Concise, catchy title]

💡 Description: [2-3 sentences explaining the core solution]

🛠️ Tech Stack:
• [Key technology/framework 1]
• [Key technology/framework 2]
• [Key technology/framework 3]

🎯 Impact:
• [Primary impact point]
• [Secondary impact point]

---

Make each suggestion:
1. Technically feasible for a hackathon (2-3 days of coding)
2. Focused on real community impact
3. Leveraging modern technologies

Generate exactly 2 suggestions with a clear separation between them.`;

const completion = await openai.chat.completions.create({
messages: [
{
role: "system",
content: "You are a hackathon project ideation expert who specializes in generating innovative technical solutions for community problems. Your suggestions should be specific, technically detailed, and focused on real impact. Always maintain the exact format specified, including all emojis and bullet points."
},
{
role: "user",
content: prompt
}
],
model: "gpt-4-turbo-preview",
temperature: 0.7,
max_tokens: 1500,
});

const response = completion.choices[0]?.message?.content || '';
// Split by '---' to separate suggestions, then filter out any empty strings
const suggestions = response.split('---')
.map(s => s.trim())
.filter(s => s.length > 0);

return NextResponse.json({ suggestions });
} catch (error) {
console.error('Error generating suggestions:', error);
// Fallback suggestion in the same format as the prompt
return NextResponse.json(
{
error: 'Failed to generate suggestions',
suggestions: [`🚀 Project Title: "${problemData.title || 'Community'} Solution Platform"

💡 Description: A community-driven platform that addresses ${problemData.description || 'local needs'} through innovative technology and local collaboration.

🛠️ Tech Stack:
• Next.js for the frontend
• Node.js backend
• MongoDB for data storage

🎯 Impact:
• Direct community engagement
• Measurable local improvement`]
},
{ status: 500 }
);
}
}
Binary file added app/app/favicon.ico
Binary file not shown.
Loading