├── .gitignore ├── LICENSE ├── README.md ├── app ├── .env.example ├── .gitignore ├── LICENSE ├── README.md ├── components.json ├── next.config.ts ├── package-lock.json ├── package.json ├── playwright.config.ts ├── pnpm-lock.yaml ├── postcss.config.mjs ├── public │ ├── assets │ │ ├── icons │ │ │ ├── NEAR.svg │ │ │ ├── money.svg │ │ │ ├── near.png │ │ │ └── telegram.svg │ │ ├── images │ │ │ ├── agent-example.svg │ │ │ └── avatar │ │ │ │ ├── avatar-1.png │ │ │ │ └── avatar.png │ │ ├── logos │ │ │ └── money.svg │ │ └── tokens │ │ │ ├── black-dragon.png │ │ │ ├── dragon.png │ │ │ └── near.png │ └── favicon.ico ├── src │ ├── app │ │ ├── agents │ │ │ ├── [agentId] │ │ │ │ └── page.tsx │ │ │ └── create │ │ │ │ └── page.tsx │ │ ├── claim │ │ │ └── page.tsx │ │ ├── favicon.ico │ │ ├── globals.css │ │ ├── layout.tsx │ │ ├── not-found.tsx │ │ └── page.tsx │ ├── components │ │ ├── chart │ │ │ ├── EngagementAVGChart.tsx │ │ │ ├── EngagementChart.tsx │ │ │ ├── Impressions.tsx │ │ │ ├── MarketCapChart.tsx │ │ │ ├── MindShareChart.tsx │ │ │ ├── ReachChart.tsx │ │ │ └── UniqueHolderChart.tsx │ │ ├── custom │ │ │ ├── AboutGovernance.tsx │ │ │ ├── AgentLogs.tsx │ │ │ ├── AgentPriview.tsx │ │ │ ├── Analytics.tsx │ │ │ ├── AvatarProfile.tsx │ │ │ ├── BasicAnalytics.tsx │ │ │ ├── CreateProposalModal.tsx │ │ │ ├── GranteePost.tsx │ │ │ ├── Grantees.tsx │ │ │ ├── LayoutCustom.tsx │ │ │ ├── LoginButton.tsx │ │ │ ├── Overview.tsx │ │ │ ├── ProgressSteps.tsx │ │ │ ├── ProposalDetail.tsx │ │ │ ├── ProposalGovernance.tsx │ │ │ ├── Reviewers.tsx │ │ │ ├── SocialIntegrations.tsx │ │ │ ├── SwapInterface.tsx │ │ │ ├── TokenDropdown.tsx │ │ │ ├── TradingViewChart.tsx │ │ │ └── TwitterActivity.tsx │ │ ├── icons │ │ │ ├── DiscordIcon.tsx │ │ │ ├── TelegramIcon.tsx │ │ │ └── TwitterIcon.tsx │ │ ├── layout │ │ │ └── Header.tsx │ │ ├── sections │ │ │ ├── BasicInformation.tsx │ │ │ ├── FeaturedGrantAgents.tsx │ │ │ ├── FeaturedGrantOperatorAgents.tsx │ │ │ ├── GrantCanvas.tsx │ │ │ ├── Hero.tsx │ │ │ ├── PlatformIntegration.tsx │ │ │ ├── TokenConfiguration.tsx │ │ │ └── WalletConfiguration.tsx │ │ └── ui │ │ │ ├── avatar.tsx │ │ │ ├── badge.tsx │ │ │ ├── breadcrumb.tsx │ │ │ ├── button.tsx │ │ │ ├── card.tsx │ │ │ ├── checkbox.tsx │ │ │ ├── dialog.tsx │ │ │ ├── dropdown-menu.tsx │ │ │ ├── hover-card.tsx │ │ │ ├── input.tsx │ │ │ ├── label.tsx │ │ │ ├── pagination.tsx │ │ │ ├── radio-group.tsx │ │ │ ├── scroll-area.tsx │ │ │ ├── select.tsx │ │ │ ├── slider.tsx │ │ │ ├── switch.tsx │ │ │ ├── table.tsx │ │ │ ├── tabs.tsx │ │ │ └── textarea.tsx │ ├── context │ │ └── WalletSelectorContext.tsx │ ├── hooks │ │ └── near-method.ts │ ├── lib │ │ └── utils.ts │ └── types │ │ ├── agent.ts │ │ └── types.ts ├── tailwind.config.ts ├── tests │ ├── create-agent.spec.ts │ └── home.spec.ts └── tsconfig.json ├── docs ├── .gitignore ├── README.md ├── babel.config.js ├── blog │ ├── 2021-08-01-mdx-blog-post.mdx │ ├── 2024-08-26-welcome │ │ ├── docusaurus-plushie-banner.jpeg │ │ └── index.md │ ├── authors.yml │ └── tags.yml ├── docs │ ├── developers │ │ ├── _category_.json │ │ ├── contracts.md │ │ ├── indexer.mdx │ │ └── js.mdx │ ├── intro.md │ └── user-guides │ │ ├── _category_.json │ │ ├── create_agent.md │ │ ├── governance.md │ │ └── social_integration.md ├── docusaurus.config.ts ├── favicon.ico ├── package-lock.json ├── package.json ├── sidebars.ts ├── src │ ├── components │ │ └── HomepageFeatures │ │ │ ├── index.tsx │ │ │ └── styles.module.css │ ├── css │ │ └── custom.css │ └── pages │ │ ├── index.module.css │ │ ├── index.tsx │ │ └── markdown-page.md ├── static │ ├── .nojekyll │ ├── favicon.ico │ ├── img │ │ ├── apple-touch-icon.png │ │ ├── docs-api.png │ │ ├── docs-boilerplate.png │ │ ├── docs-graphql.png │ │ ├── docs-mlm.png │ │ ├── docs-puzzle.png │ │ ├── docs-security.png │ │ ├── docs-stakeslash.png │ │ ├── docs-toolbox.png │ │ ├── docs-tracking.png │ │ ├── docusaurus-social-card.jpg │ │ ├── docusaurus.png │ │ ├── favicon-48x48.png │ │ ├── favicon-96x96.png │ │ ├── favicon.ico │ │ ├── favicon.svg │ │ ├── grantsdotfun_icon.png │ │ ├── logo.svg │ │ ├── meta.png │ │ ├── refer-logo.png │ │ ├── site.webmanifest │ │ ├── undraw_docusaurus_mountain.svg │ │ ├── undraw_docusaurus_react.svg │ │ ├── undraw_docusaurus_tree.svg │ │ ├── web-app-manifest-192x192.png │ │ └── web-app-manifest-512x512.png │ └── site.webmanifest ├── tsconfig.json └── yarn.lock ├── landing-page ├── .gitignore ├── README.md ├── package.json ├── pages │ ├── _app.tsx │ └── index.tsx ├── postcss.config.js ├── public │ └── favicon.ico ├── styles │ └── globals.css ├── tailwind.config.js ├── tsconfig.json └── yarn.lock ├── package.json └── tailwind.config.js /.gitignore: -------------------------------------------------------------------------------- 1 | # dependencies 2 | /node_modules 3 | /.pnp 4 | .pnp.js 5 | 6 | # testing 7 | /coverage 8 | 9 | # next.js 10 | /.next/ 11 | /out/ 12 | 13 | # production 14 | /build 15 | 16 | # misc 17 | .DS_Store 18 | *.pem 19 | 20 | # debug 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | 25 | # local env files 26 | .env*.local 27 | 28 | # typescript 29 | *.tsbuildinfo 30 | next-env.d.ts 31 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 POTLOCK 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 🎮 GRANTS.FUN 2 | 3 | GRANTS.FUN is an autonomous grant operator platform built on NEAR Protocol, designed to create and manage AI-powered grant distribution systems. It provides mechanisms for deploying AI agents that can autonomously evaluate and distribute grants based on social signals, particularly from Twitter/X. 4 | 5 | ## 🏗️ Repository Structure 6 | 7 | This is a monorepo containing three main components: 8 | 9 | - `landing-page/`: The main website at [grants.fun](https://grants.fun) 10 | - `docs/`: Documentation site at [docs.grants.fun](https://docs.grants.fun) 11 | - `app/`: The main application (coming soon) 12 | 13 | ## ✨ Key Features 14 | 15 | - 🤖 AI Grant Operators: Deploy autonomous agents that evaluate and distribute grants 16 | - 🐦 Social Integration: Direct integration with Twitter/X for applications 17 | - 👥 Multi-reviewer System: Set up multiple reviewers for grant evaluation 18 | - 🏛️ Token-based Governance: Use GRant OPERATOR tokens for criteria setting 19 | - 💸 On-chain Payments: Automated grant distribution across chains 20 | - 🧠 Built on Eliza Framework: Robust AI agent capabilities 21 | 22 | ## 🚀 Getting Started 23 | 24 | ### Landing Page 25 | 26 | ```bash 27 | cd landing-page 28 | npm install 29 | npm run dev 30 | ``` 31 | 32 | 33 | ### Documentation 34 | ```bash 35 | cd docs 36 | yarn install 37 | yarn start 38 | ``` 39 | 40 | ## 🔗 Important Links 41 | 42 | - 🌐 [Website](https://grants.fun) 43 | - 📚 [Documentation](https://docs.grants.fun) 44 | - 🐦 [Twitter](https://twitter.com/grantsdotfun) 45 | - 💬 [Telegram](https://t.me/grantsdotfun) 46 | - 📝 [GitHub](https://github.com/potlock/grantsdotfun) 47 | 48 | ## 💻 Tech Stack 49 | 50 | - ⚡ [Next.js](https://nextjs.org/) 51 | - ⚛️ [React](https://reactjs.org/) 52 | - 📝 [TypeScript](https://www.typescriptlang.org/) 53 | - 🎨 [Tailwind CSS](https://tailwindcss.com/) 54 | - 📚 [Docusaurus](https://docusaurus.io/) 55 | - ⛓️ [NEAR Protocol](https://near.org/) 56 | - [Eliza Framework](https://github.com/ai16z/eliza) 57 | 58 | ## 🤝 Contributing 59 | 60 | Contributions are welcome! Please feel free to submit a Pull Request. 61 | 62 | ## 📄 License 63 | 64 | This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. 65 | 66 | ## 🏗 Built by Potlock Protocol 67 | 68 | GRANTS.FUN is built and maintained by [Potlock Protocol](https://potlock.org). 69 | 70 | -------------------------------------------------------------------------------- /app/.env.example: -------------------------------------------------------------------------------- 1 | NEXT_PUBLIC_NETWORK=testnet 2 | NEXT_PUBLIC_WALLET_URL=https://wallet.near.org 3 | NEXT_PUBLIC_WALLET_URL_TESTNET=https://testnet.mynearwallet.com 4 | NEXT_PUBLIC_CALLBACK_URL=http://localhost:3000 -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.* 7 | .yarn/* 8 | !.yarn/patches 9 | !.yarn/plugins 10 | !.yarn/releases 11 | !.yarn/versions 12 | 13 | # testing 14 | /coverage 15 | 16 | # next.js 17 | /.next/ 18 | /out/ 19 | 20 | # production 21 | /build 22 | 23 | # misc 24 | .DS_Store 25 | *.pem 26 | 27 | # debug 28 | npm-debug.log* 29 | yarn-debug.log* 30 | yarn-error.log* 31 | .pnpm-debug.log* 32 | 33 | # env files (can opt-in for committing if needed) 34 | .env 35 | .env.local 36 | .env.development 37 | .env.production 38 | 39 | # vercel 40 | .vercel 41 | 42 | # typescript 43 | *.tsbuildinfo 44 | next-env.d.ts 45 | node_modules/ 46 | /test-results/ 47 | /playwright-report/ 48 | /blob-report/ 49 | /playwright/.cache/ 50 | -------------------------------------------------------------------------------- /app/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 POTLOCK 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /app/README.md: -------------------------------------------------------------------------------- 1 | # 🎮 GRANTS.FUN 2 | 3 | GRANTS.FUN is an autonomous grant operator platform built on NEAR Protocol, designed to create and manage AI-powered grant distribution systems. It provides mechanisms for deploying AI agents that can autonomously evaluate and distribute grants based on social signals, particularly from Twitter/X. 4 | 5 | ## ✨ Key Features 6 | - 🤖 AI Grant Operators: Deploy autonomous agents that evaluate and distribute grants 7 | - 🐦 Social Integration: Direct integration with Twitter/X for applications 8 | - 👥 Multi-reviewer System: Set up multiple reviewers for grant evaluation 9 | - 🏛️ Token-based Governance: Use GRant OPERATOR tokens for criteria setting 10 | - 💸 On-chain Payments: Automated grant distribution across chains 11 | - 🧠 Built on Eliza Framework: Robust AI agent capabilities 12 | 13 | ## Tech Stack 14 | 15 | - **Framework**: Next.js 15.1.5 16 | - **Language**: TypeScript 17 | - **Styling**: Tailwind CSS 18 | - **UI Components**: shadcn/ui 19 | - **Icons**: Lucide Icons 20 | - **Fonts**: Geist Sans & Geist Mono 21 | - **Development Tools**: ESLint, Turbopack 22 | 23 | ## Getting Started 24 | 25 | 1. Clone the repository: 26 | ```bash 27 | git clone https://github.com/louisdevzz/grants-fun.git 28 | cd grants-fun 29 | ``` 30 | 31 | 2. Install dependencies: 32 | ```bash 33 | pnpm install 34 | ``` 35 | 3. Create a `.env` file in the root directory with the following variables: 36 | ```bash 37 | cp .env.example .env.local 38 | ``` 39 | 40 | 4. Run the development server: 41 | ```bash 42 | pnpm dev 43 | ``` 44 | 45 | 5. Open [http://localhost:3000](http://localhost:3000) in your browser to see the application. 46 | 47 | ## Add components from shadcn/ui 48 | 49 | ```bash 50 | pnpm dlx shadcn@latest add component-name 51 | ``` 52 | 53 | ## Run tests (coming soon) 54 | ```bash 55 | pnpm test # run tests all 56 | # or 57 | pnpm test:ui # run tests with ui 58 | ``` 59 | 60 | ## Development 61 | 62 | - `pnpm dev` - Start the development server with Turbopack 63 | - `pnpm build` - Build the application for production 64 | - `pnpm start` - Start the production server 65 | - `pnpm lint` - Run ESLint for code quality 66 | 67 | ## Project Structure 68 | 69 | ``` 70 | grants-fun/ 71 | ├── src/ 72 | │ ├── app/ # Next.js app directory 73 | │ ├── components/ # Reusable UI components 74 | │ │ └── ui/ # shadcn/ui components 75 | │ └── lib/ # Utility functions 76 | ├── public/ # Static assets 77 | └── ...config files 78 | ``` 79 | 80 | ## Contributing 81 | 82 | Contributions are welcome! Please feel free to submit a Pull Request. 83 | 84 | ## License 85 | 86 | This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. 87 | -------------------------------------------------------------------------------- /app/components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "new-york", 4 | "rsc": true, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.ts", 8 | "css": "src/app/globals.css", 9 | "baseColor": "neutral", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils", 16 | "ui": "@/components/ui", 17 | "lib": "@/lib", 18 | "hooks": "@/hooks" 19 | }, 20 | "iconLibrary": "lucide" 21 | } -------------------------------------------------------------------------------- /app/next.config.ts: -------------------------------------------------------------------------------- 1 | import type { NextConfig } from "next"; 2 | 3 | const nextConfig: NextConfig = { 4 | images: { 5 | remotePatterns: [ 6 | { 7 | protocol: 'https', 8 | hostname: 'unavatar.io', 9 | }, 10 | ], 11 | }, 12 | }; 13 | 14 | export default nextConfig; 15 | -------------------------------------------------------------------------------- /app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "grants-fun", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "next dev --turbopack", 7 | "build": "next build", 8 | "start": "next start", 9 | "test": "playwright test", 10 | "test:ui": "playwright test --ui" 11 | }, 12 | "dependencies": { 13 | "@builddao/near-social-js": "^1.1.0", 14 | "@near-wallet-selector/bitte-wallet": "^8.9.15", 15 | "@near-wallet-selector/core": "^8.9.15", 16 | "@near-wallet-selector/here-wallet": "^8.9.15", 17 | "@near-wallet-selector/meteor-wallet": "^8.9.15", 18 | "@near-wallet-selector/modal-ui": "^8.9.15", 19 | "@near-wallet-selector/my-near-wallet": "^8.9.15", 20 | "@near-wallet-selector/nightly": "^8.9.15", 21 | "@radix-ui/react-avatar": "^1.1.2", 22 | "@radix-ui/react-checkbox": "^1.1.3", 23 | "@radix-ui/react-dialog": "^1.1.4", 24 | "@radix-ui/react-dropdown-menu": "^2.1.4", 25 | "@radix-ui/react-hover-card": "^1.1.4", 26 | "@radix-ui/react-label": "^2.1.1", 27 | "@radix-ui/react-radio-group": "^1.2.2", 28 | "@radix-ui/react-scroll-area": "^1.2.2", 29 | "@radix-ui/react-select": "^2.1.4", 30 | "@radix-ui/react-slider": "^1.2.2", 31 | "@radix-ui/react-slot": "^1.1.1", 32 | "@radix-ui/react-switch": "^1.1.2", 33 | "@radix-ui/react-tabs": "^1.1.2", 34 | "@vercel/analytics": "^1.4.1", 35 | "class-variance-authority": "^0.7.1", 36 | "clsx": "^2.1.1", 37 | "highcharts": "^12.1.2", 38 | "highcharts-react-official": "^3.2.1", 39 | "lucide-react": "^0.472.0", 40 | "near-rpc-providers": "^0.1.0", 41 | "next": "15.1.5", 42 | "react": "^19.0.0", 43 | "react-dom": "^19.0.0", 44 | "react-hot-toast": "^2.5.1", 45 | "recharts": "^2.15.0", 46 | "rxjs": "^7.8.1", 47 | "tailwind-merge": "^2.6.0", 48 | "tailwindcss-animate": "^1.0.7" 49 | }, 50 | "devDependencies": { 51 | "@eslint/eslintrc": "^3", 52 | "@playwright/test": "^1.49.1", 53 | "@types/node": "^20", 54 | "@types/react": "^19", 55 | "@types/react-dom": "^19", 56 | "eslint": "^9", 57 | "eslint-config-next": "15.1.5", 58 | "postcss": "^8", 59 | "tailwindcss": "^3.4.1", 60 | "typescript": "^5" 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /app/playwright.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig, devices } from '@playwright/test'; 2 | 3 | /** 4 | * Read environment variables from file. 5 | * https://github.com/motdotla/dotenv 6 | */ 7 | // import dotenv from 'dotenv'; 8 | // import path from 'path'; 9 | // dotenv.config({ path: path.resolve(__dirname, '.env') }); 10 | 11 | /** 12 | * See https://playwright.dev/docs/test-configuration. 13 | */ 14 | export default defineConfig({ 15 | testDir: './tests', 16 | /* Run tests in files in parallel */ 17 | fullyParallel: true, 18 | /* Fail the build on CI if you accidentally left test.only in the source code. */ 19 | forbidOnly: !!process.env.CI, 20 | /* Retry on CI only */ 21 | retries: process.env.CI ? 2 : 0, 22 | /* Opt out of parallel tests on CI. */ 23 | workers: process.env.CI ? 1 : undefined, 24 | /* Reporter to use. See https://playwright.dev/docs/test-reporters */ 25 | reporter: 'html', 26 | /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ 27 | use: { 28 | /* Base URL to use in actions like `await page.goto('/')`. */ 29 | baseURL: 'http://localhost:3000', 30 | 31 | /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ 32 | trace: 'on-first-retry', 33 | screenshot: 'only-on-failure', 34 | }, 35 | 36 | /* Configure projects for major browsers */ 37 | projects: [ 38 | { 39 | name: 'chromium', 40 | use: { ...devices['Desktop Chrome'] }, 41 | }, 42 | 43 | { 44 | name: 'firefox', 45 | use: { ...devices['Desktop Firefox'] }, 46 | }, 47 | 48 | { 49 | name: 'webkit', 50 | use: { ...devices['Desktop Safari'] }, 51 | }, 52 | 53 | /* Test against mobile viewports. */ 54 | { 55 | name: 'Mobile Chrome', 56 | use: { ...devices['Pixel 5'] }, 57 | }, 58 | { 59 | name: 'Mobile Safari', 60 | use: { ...devices['iPhone 12'] }, 61 | }, 62 | 63 | /* Test against branded browsers. */ 64 | // { 65 | // name: 'Microsoft Edge', 66 | // use: { ...devices['Desktop Edge'], channel: 'msedge' }, 67 | // }, 68 | // { 69 | // name: 'Google Chrome', 70 | // use: { ...devices['Desktop Chrome'], channel: 'chrome' }, 71 | // }, 72 | ], 73 | 74 | /* Run your local dev server before starting the tests */ 75 | webServer: { 76 | command: 'npm run dev', 77 | url: 'http://localhost:3000', 78 | reuseExistingServer: !process.env.CI, 79 | }, 80 | }); 81 | -------------------------------------------------------------------------------- /app/postcss.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('postcss-load-config').Config} */ 2 | const config = { 3 | plugins: { 4 | tailwindcss: {}, 5 | }, 6 | }; 7 | 8 | export default config; 9 | -------------------------------------------------------------------------------- /app/public/assets/icons/NEAR.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/public/assets/icons/near.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PotLock/grantsdotfun/973bd1b4d35bae406c0fa8c94128dd7e7d32420d/app/public/assets/icons/near.png -------------------------------------------------------------------------------- /app/public/assets/icons/telegram.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /app/public/assets/images/avatar/avatar-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PotLock/grantsdotfun/973bd1b4d35bae406c0fa8c94128dd7e7d32420d/app/public/assets/images/avatar/avatar-1.png -------------------------------------------------------------------------------- /app/public/assets/images/avatar/avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PotLock/grantsdotfun/973bd1b4d35bae406c0fa8c94128dd7e7d32420d/app/public/assets/images/avatar/avatar.png -------------------------------------------------------------------------------- /app/public/assets/tokens/black-dragon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PotLock/grantsdotfun/973bd1b4d35bae406c0fa8c94128dd7e7d32420d/app/public/assets/tokens/black-dragon.png -------------------------------------------------------------------------------- /app/public/assets/tokens/dragon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PotLock/grantsdotfun/973bd1b4d35bae406c0fa8c94128dd7e7d32420d/app/public/assets/tokens/dragon.png -------------------------------------------------------------------------------- /app/public/assets/tokens/near.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PotLock/grantsdotfun/973bd1b4d35bae406c0fa8c94128dd7e7d32420d/app/public/assets/tokens/near.png -------------------------------------------------------------------------------- /app/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PotLock/grantsdotfun/973bd1b4d35bae406c0fa8c94128dd7e7d32420d/app/public/favicon.ico -------------------------------------------------------------------------------- /app/src/app/agents/create/page.tsx: -------------------------------------------------------------------------------- 1 | 'use client' 2 | 3 | import { useState } from 'react' 4 | import BasicInformation from '@/components/sections/BasicInformation' 5 | import AgentPreview from '@/components/custom/AgentPriview' 6 | import TokenConfiguration from '@/components/sections/TokenConfiguration' 7 | import PlatformIntegration from '@/components/sections/PlatformIntegration' 8 | import GrantCanvas from '@/components/sections/GrantCanvas' 9 | import WalletConfiguration from '@/components/sections/WalletConfiguration' 10 | import ProgressSteps from '@/components/custom/ProgressSteps' 11 | import toast from 'react-hot-toast' 12 | import { AgentPreviewTypes } from '@/types/agent' 13 | 14 | const emojis = ["😀", "😄", "🤪", "❤️", "🐻", "🐉", "🐶", "😋", "🐺", "🏃", "🍷"] 15 | 16 | const CreateAgent = () => { 17 | const [step, setStep] = useState(1) 18 | const [preview, setPreview] = useState({ 19 | name: '', 20 | description: '', 21 | image: '/assets/images/agent-example.svg', 22 | governanceType: '', 23 | fundingFrequency: '', 24 | evaluationType: '' 25 | }) 26 | const [payoutBuffer, setPayoutBuffer] = useState(null) 27 | 28 | const handleDeploy = () => { 29 | toast.success('Agent deployed successfully!') 30 | } 31 | 32 | return ( 33 |
34 |
35 |
36 |

Create AI Agent

37 |

38 | Launch your own grant program on social with an agent governed by token holders 39 |

40 |
41 | 42 | 43 | 44 | {/* */} 45 |
46 | {step === 1 && setStep(2)} />} 47 | {step === 2 && setStep(1)} onNext={() => setStep(3)} />} 48 | {step === 3 && setStep(2)} onNext={() => setStep(4)} />} 49 | {step === 4 && setStep(3)} onNext={() => setStep(5)} />} 50 | {step === 5 && setStep(4)} onDeploy={handleDeploy} payoutBuffer={payoutBuffer} setPayoutBuffer={setPayoutBuffer} />} 51 | 52 | {/* Preview */} 53 | 56 |
57 |
58 |
59 | ) 60 | } 61 | 62 | export default CreateAgent; -------------------------------------------------------------------------------- /app/src/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PotLock/grantsdotfun/973bd1b4d35bae406c0fa8c94128dd7e7d32420d/app/src/app/favicon.ico -------------------------------------------------------------------------------- /app/src/app/globals.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | @layer base { 6 | :root { 7 | --background: 0 0% 100%; 8 | --foreground: 0 0% 3.9%; 9 | --card: 0 0% 100%; 10 | --card-foreground: 0 0% 3.9%; 11 | --popover: 0 0% 100%; 12 | --popover-foreground: 0 0% 3.9%; 13 | --primary: 0 0% 9%; 14 | --primary-foreground: 0 0% 98%; 15 | --secondary: 0 0% 96.1%; 16 | --secondary-foreground: 0 0% 9%; 17 | --muted: 0 0% 96.1%; 18 | --muted-foreground: 0 0% 45.1%; 19 | --accent: 0 0% 96.1%; 20 | --accent-foreground: 0 0% 9%; 21 | --destructive: 0 84.2% 60.2%; 22 | --destructive-foreground: 0 0% 98%; 23 | --border: 0 0% 89.8%; 24 | --input: 0 0% 89.8%; 25 | --ring: 0 0% 3.9%; 26 | --chart-1: 12 76% 61%; 27 | --chart-2: 173 58% 39%; 28 | --chart-3: 197 37% 24%; 29 | --chart-4: 43 74% 66%; 30 | --chart-5: 27 87% 67%; 31 | --radius: 0.5rem; 32 | } 33 | .dark { 34 | --background: 0 0% 3.9%; 35 | --foreground: 0 0% 98%; 36 | --card: 0 0% 3.9%; 37 | --card-foreground: 0 0% 98%; 38 | --popover: 0 0% 3.9%; 39 | --popover-foreground: 0 0% 98%; 40 | --primary: 0 0% 98%; 41 | --primary-foreground: 0 0% 9%; 42 | --secondary: 0 0% 14.9%; 43 | --secondary-foreground: 0 0% 98%; 44 | --muted: 0 0% 14.9%; 45 | --muted-foreground: 0 0% 63.9%; 46 | --accent: 0 0% 14.9%; 47 | --accent-foreground: 0 0% 98%; 48 | --destructive: 0 62.8% 30.6%; 49 | --destructive-foreground: 0 0% 98%; 50 | --border: 0 0% 14.9%; 51 | --input: 0 0% 14.9%; 52 | --ring: 0 0% 83.1%; 53 | --chart-1: 220 70% 50%; 54 | --chart-2: 160 60% 45%; 55 | --chart-3: 30 80% 55%; 56 | --chart-4: 280 65% 60%; 57 | --chart-5: 340 75% 55%; 58 | } 59 | } 60 | 61 | @layer base { 62 | * { 63 | @apply border-border; 64 | } 65 | body { 66 | @apply bg-background text-foreground; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /app/src/app/layout.tsx: -------------------------------------------------------------------------------- 1 | import type { Metadata } from "next"; 2 | import { Geist } from "next/font/google"; 3 | import { WalletSelectorContextProvider } from "@/context/WalletSelectorContext" 4 | import { Toaster } from 'react-hot-toast'; 5 | import { Analytics } from "@vercel/analytics/react" 6 | 7 | import "@near-wallet-selector/modal-ui/styles.css" 8 | import "./globals.css"; 9 | import LayoutCustom from "@/components/custom/LayoutCustom"; 10 | 11 | const geistSans = Geist({ 12 | variable: "--font-geist-sans", 13 | subsets: ["latin"], 14 | }); 15 | 16 | 17 | export const metadata: Metadata = { 18 | title: "grants.fun", 19 | description: "grants.fun is an autonomous grant operator platform built on NEAR Protocol, designed to create and manage AI-powered grant distribution systems.", 20 | keywords: [ 21 | "grants", 22 | "NEAR Protocol", 23 | "AI", 24 | "blockchain", 25 | "grant distribution", 26 | "autonomous agents", 27 | "web3", 28 | "cryptocurrency", 29 | ], 30 | authors: [{ name: "Potlock team" }], 31 | openGraph: { 32 | title: "grants.fun - AI-Powered Grant Distribution Platform", 33 | description: "grants.fun is an autonomous grant operator platform built on NEAR Protocol, designed to create and manage AI-powered grant distribution systems.", 34 | type: "website", 35 | locale: "en_US", 36 | siteName: "grants.fun", 37 | }, 38 | twitter: { 39 | card: "summary_large_image", 40 | title: "grants.fun - AI-Powered Grant Distribution Platform", 41 | description: "grants.fun is an autonomous grant operator platform built on NEAR Protocol, designed to create and manage AI-powered grant distribution systems.", 42 | }, 43 | robots: { 44 | index: true, 45 | follow: true, 46 | }, 47 | viewport: { 48 | width: "device-width", 49 | initialScale: 1, 50 | }, 51 | themeColor: "#000000", 52 | }; 53 | 54 | export default function RootLayout({ 55 | children, 56 | }: Readonly<{ 57 | children: React.ReactNode; 58 | }>) { 59 | return ( 60 | 61 | 64 | 65 | 66 | 67 | {children} 68 | 69 | 70 | 71 | 72 | 73 | ); 74 | } 75 | -------------------------------------------------------------------------------- /app/src/app/not-found.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import Link from 'next/link'; 4 | import { Button } from '@/components/ui/button'; 5 | import { ArrowLeft } from 'lucide-react'; 6 | 7 | export default function NotFound() { 8 | return ( 9 |
10 |
11 |

404

12 |

Page Not Found

13 |

14 | Sorry, we couldn't find the page you're looking for. Please check the URL or return to the homepage. 15 |

16 | 17 | 21 | 22 |
23 |
24 | ); 25 | } -------------------------------------------------------------------------------- /app/src/app/page.tsx: -------------------------------------------------------------------------------- 1 | import Header from "@/components/layout/Header" 2 | import Hero from "@/components/sections/Hero" 3 | import FeaturedGrantAgents from "@/components/sections/FeaturedGrantAgents" 4 | import FeaturedGrantOperatorAgents from "@/components/sections/FeaturedGrantOperatorAgents" 5 | 6 | export default function Home() { 7 | return ( 8 |
9 |
10 | 11 | 12 | 13 |
14 |
15 | ) 16 | } 17 | 18 | -------------------------------------------------------------------------------- /app/src/components/chart/EngagementAVGChart.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import React from 'react'; 4 | import Highcharts from 'highcharts'; 5 | import HighchartsReact from 'highcharts-react-official'; 6 | import { Card, CardContent } from "../ui/card"; 7 | 8 | interface EngagementChartProps { 9 | data?: number[]; 10 | title?: string; 11 | percentageChange?: number; 12 | timeFrame?: string; 13 | comparisonPercen?: string; 14 | currentValue?: string; 15 | } 16 | 17 | const EngagementChart: React.FC = ({ 18 | data = [100, 105, 105, 105, 120, 130, 135, 135], 19 | title = "Engagement (Avg.)", 20 | percentageChange = -34.7, 21 | timeFrame = "7D", 22 | comparisonPercen = "-44.57%", 23 | currentValue = "297.27" 24 | }) => { 25 | const options: Highcharts.Options = { 26 | chart: { 27 | type: 'line', 28 | height: 200, 29 | backgroundColor: 'transparent', 30 | }, 31 | title: { 32 | text: undefined 33 | }, 34 | credits: { 35 | enabled: false 36 | }, 37 | xAxis: { 38 | visible: false 39 | }, 40 | yAxis: { 41 | visible: false 42 | }, 43 | plotOptions: { 44 | line: { 45 | marker: { 46 | enabled: false 47 | }, 48 | lineWidth: 2 49 | } 50 | }, 51 | series: [{ 52 | type: 'line', 53 | name: 'Engagement', 54 | data: data, 55 | color: '#FF4444' 56 | }], 57 | tooltip: { 58 | enabled: false 59 | }, 60 | legend: { 61 | enabled: false 62 | } 63 | }; 64 | 65 | return ( 66 | 67 | 68 |
69 |
70 |
71 | {title} 72 |
73 | {currentValue} 74 | {percentageChange}% {timeFrame} 75 |
76 |
77 |
78 | 79 |
80 | 84 |
85 | 86 |
87 | {comparisonPercen} engagements vs agents with a similar MC 88 |
89 |
90 |
91 |
92 | ); 93 | }; 94 | 95 | export default EngagementChart; -------------------------------------------------------------------------------- /app/src/components/chart/EngagementChart.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import React from 'react'; 4 | import Highcharts from 'highcharts'; 5 | import HighchartsReact from 'highcharts-react-official'; 6 | import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; 7 | import { Badge } from '../ui/badge'; 8 | 9 | interface EngagementChartProps { 10 | postEngagement: number; 11 | smartEngagement: number; 12 | postEngagementGrowth: number; 13 | smartEngagementGrowth: number; 14 | comparisonPercentage: number; 15 | series: { 16 | postEngagement: [number, number][]; 17 | smartEngagement: [number, number][]; 18 | }; 19 | } 20 | 21 | const EngagementChart: React.FC = ({ 22 | postEngagement, 23 | smartEngagement, 24 | postEngagementGrowth, 25 | smartEngagementGrowth, 26 | comparisonPercentage, 27 | series 28 | }) => { 29 | const options: Highcharts.Options = { 30 | chart: { 31 | type: 'area', 32 | height: 200, 33 | backgroundColor: 'transparent', 34 | spacing: [0, 0, 0, 0], 35 | }, 36 | title: { 37 | text: undefined 38 | }, 39 | xAxis: { 40 | type: 'datetime', 41 | labels: { 42 | format: '{value:%b %d}', 43 | style: { 44 | color: '#6B7280', 45 | fontSize: '12px', 46 | } 47 | }, 48 | lineWidth: 0, 49 | tickWidth: 0, 50 | }, 51 | yAxis: [{ 52 | title: { 53 | text: undefined 54 | }, 55 | labels: { 56 | enabled: false 57 | }, 58 | gridLineWidth: 0, 59 | min: 0 60 | }, { 61 | title: { 62 | text: undefined 63 | }, 64 | labels: { 65 | enabled: false 66 | }, 67 | gridLineWidth: 0, 68 | opposite: true, 69 | min: 0 70 | }], 71 | tooltip: { 72 | shared: true, 73 | backgroundColor: 'rgba(255, 255, 255, 0.9)', 74 | borderWidth: 0, 75 | shadow: true, 76 | padding: 8, 77 | }, 78 | series: [{ 79 | name: 'Post engagement (7-day)', 80 | type: 'area', 81 | data: series.postEngagement, 82 | color: '#86efac', 83 | fillColor: { 84 | linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 }, 85 | stops: [ 86 | [0, 'rgba(134, 239, 172, 0.6)'] 87 | ] 88 | }, 89 | lineWidth: 2, 90 | yAxis: 0 91 | }, { 92 | name: 'Smart engagement (7-day)', 93 | type: 'area', 94 | data: series.smartEngagement, 95 | color: '#60a5fa', 96 | fillColor: { 97 | linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 }, 98 | stops: [] 99 | }, 100 | lineWidth: 2, 101 | yAxis: 1 102 | }], 103 | credits: { 104 | enabled: false 105 | }, 106 | legend: { 107 | enabled: true, 108 | align: 'left', 109 | verticalAlign: 'top', 110 | symbolRadius: 0, 111 | symbolWidth: 10, 112 | symbolHeight: 10, 113 | itemStyle: { 114 | color: '#6B7280', 115 | fontWeight: 'normal', 116 | fontSize: '12px' 117 | }, 118 | x: 0, 119 | y: 0 120 | }, 121 | plotOptions: { 122 | area: { 123 | marker: { 124 | enabled: false 125 | } 126 | } 127 | } 128 | }; 129 | 130 | return ( 131 | 132 | 133 | Engagement 134 |
135 |
136 |
Post engagement (7-day)
137 |
138 | {postEngagement}K 139 | 140 | {postEngagementGrowth}% 141 | 142 |
143 |
144 |
145 |
Smart engagement (7-day)
146 |
147 | {smartEngagement} 148 | 149 | {smartEngagementGrowth}% 150 | 151 |
152 |
153 |
154 |
155 | 156 | 157 | 158 |
159 | {comparisonPercentage}% 160 | smart engagements vs agents with similar market cap 161 |
162 |
163 |
164 | ); 165 | }; 166 | 167 | export default EngagementChart; -------------------------------------------------------------------------------- /app/src/components/chart/Impressions.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import React from 'react'; 4 | import Highcharts from 'highcharts'; 5 | import HighchartsReact from 'highcharts-react-official'; 6 | import { Card, CardContent } from "../ui/card"; 7 | 8 | interface ImpressionsChartProps { 9 | data?: number[]; 10 | title?: string; 11 | percentageChange?: number; 12 | timeFrame?: string; 13 | comparisonPercen?: string; 14 | currentValue?: string; 15 | } 16 | 17 | const ImpressionsChart: React.FC = ({ 18 | data = [100, 105, 105, 105, 120, 130, 135, 135], 19 | title = "Impressions (Avg.)", 20 | percentageChange = -34.7, 21 | timeFrame = "7D", 22 | comparisonPercen = "-44.57%", 23 | currentValue = "297.27" 24 | }) => { 25 | const options: Highcharts.Options = { 26 | chart: { 27 | type: 'line', 28 | height: 200, 29 | backgroundColor: 'transparent', 30 | }, 31 | title: { 32 | text: undefined 33 | }, 34 | credits: { 35 | enabled: false 36 | }, 37 | xAxis: { 38 | visible: false 39 | }, 40 | yAxis: { 41 | visible: false 42 | }, 43 | plotOptions: { 44 | line: { 45 | marker: { 46 | enabled: false 47 | }, 48 | lineWidth: 2 49 | } 50 | }, 51 | series: [{ 52 | type: 'line', 53 | name: 'Engagement', 54 | data: data, 55 | color: '#FF4444' 56 | }], 57 | tooltip: { 58 | enabled: false 59 | }, 60 | legend: { 61 | enabled: false 62 | } 63 | }; 64 | 65 | return ( 66 | 67 | 68 |
69 |
70 |
71 | {title} 72 |
73 | {currentValue} 74 | {percentageChange}% {timeFrame} 75 |
76 |
77 |
78 | 79 |
80 | 84 |
85 | 86 |
87 | {comparisonPercen} engagements vs agents with a similar MC 88 |
89 |
90 |
91 |
92 | ); 93 | }; 94 | 95 | export default ImpressionsChart; -------------------------------------------------------------------------------- /app/src/components/chart/MarketCapChart.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import React from 'react'; 4 | import Highcharts from 'highcharts'; 5 | import HighchartsReact from 'highcharts-react-official'; 6 | import { Card, CardContent } from '../ui/card'; 7 | 8 | interface MarketCapChartProps { 9 | data?: number[]; 10 | marketCap?: number; 11 | percentageChange?: number; 12 | timeFrame?: string; 13 | comparisonPercentage?: number; 14 | } 15 | 16 | const MarketCapChart: React.FC = ({ 17 | data = [], 18 | marketCap = 916.63, 19 | percentageChange = 89.3, 20 | timeFrame = '7D', 21 | comparisonPercentage = 19.61 22 | }) => { 23 | const options: Highcharts.Options = { 24 | chart: { 25 | type: 'line', 26 | height: 200, 27 | style: { 28 | fontFamily: 'Inter, sans-serif' 29 | }, 30 | backgroundColor: 'transparent' 31 | }, 32 | title: { 33 | text: undefined 34 | }, 35 | credits: { 36 | enabled: false 37 | }, 38 | xAxis: { 39 | visible: false 40 | }, 41 | yAxis: { 42 | visible: false 43 | }, 44 | plotOptions: { 45 | line: { 46 | marker: { 47 | enabled: false 48 | } 49 | }, 50 | series: { 51 | states: { 52 | hover: { 53 | enabled: true, 54 | lineWidth: 2 55 | } 56 | } 57 | } 58 | }, 59 | series: [{ 60 | type: 'line', 61 | name: 'Market Cap', 62 | data: data.length ? data : [ 63 | 100, 101, 102, 101.5, 102, 102.5, 103, 102.8, 103.2, 103.5, 64 | 103.8, 104, 103.7, 103.9, 104.2, 104.5, 104.3, 104.8, 105, 65 | 105.2, 105.5, 105.3, 105.8, 106, 106.2, 106.5, 106.8, 107, 66 | 107.2, 107.5, 107.3, 107.8, 108, 108.2, 108.5, 108.3, 108.8, 67 | 109, 109.2, 109.5, 109.8, 110, 110.2, 110.5, 110.8, 111, 68 | 111.2, 111.5, 111.8, 112, 112.3, 112.5, 112.8, 113, 113.2, 69 | 113.5, 113.8, 114, 114.2, 114.5, 114.8, 115 70 | ], 71 | color: '#4285f4', 72 | lineWidth: 2 73 | }], 74 | tooltip: { 75 | enabled: false 76 | }, 77 | legend: { 78 | enabled: false 79 | } 80 | }; 81 | 82 | return ( 83 | 84 | 85 |
86 |
87 | Market cap 88 |
89 | {`${marketCap}M`} 90 | = 0 ? '#34A853' : '#EA4335' }} 93 | > 94 | {`${percentageChange >= 0 ? '+' : ''}${percentageChange}% ${timeFrame}`} 95 | 96 |
97 |
98 |
99 | 100 |
101 | 102 | {`+${comparisonPercentage}% market cap vs agents with a similar mindshare`} 103 | 104 |
105 |
106 |
107 | ); 108 | }; 109 | 110 | export default MarketCapChart; -------------------------------------------------------------------------------- /app/src/components/chart/ReachChart.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import React from 'react'; 4 | import Highcharts from 'highcharts'; 5 | import HighchartsReact from 'highcharts-react-official'; 6 | import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card" 7 | import { Badge } from "../ui/badge" 8 | 9 | const generateMockData = () => { 10 | const endDate = Date.UTC(2023, 11, 18); 11 | const startDate = endDate - (7 * 24 * 3600 * 1000); 12 | const data = []; 13 | let value = 20000000; 14 | 15 | for (let i = 0; i < 100; i++) { 16 | const timeInterval = (endDate - startDate) / 99; 17 | const currentTime = startDate + (i * timeInterval); 18 | 19 | const randomChange = (Math.random() - 0.3) * 300000; 20 | value = Math.max(value + randomChange, 15000000); 21 | value = Math.min(value, 40000000); 22 | 23 | data.push([ 24 | Math.round(currentTime), 25 | Math.round(value) 26 | ]); 27 | } 28 | 29 | return data; 30 | }; 31 | 32 | const ReachChart = () => { 33 | const options: Highcharts.Options = { 34 | chart: { 35 | type: 'area', 36 | backgroundColor: 'transparent', 37 | height: 200, 38 | spacing: [10, 0, 10, 0], 39 | style: { 40 | fontFamily: 'inherit' 41 | } 42 | }, 43 | title: { 44 | text: undefined 45 | }, 46 | credits: { 47 | enabled: false 48 | }, 49 | xAxis: { 50 | type: 'datetime', 51 | labels: { 52 | style: { 53 | color: '#666', 54 | fontSize: '12px' 55 | }, 56 | formatter: function() { 57 | return Highcharts.dateFormat('%b %d', this.value as number); 58 | } 59 | }, 60 | lineColor: '#e5e7eb', 61 | tickColor: '#e5e7eb', 62 | tickLength: 0, 63 | gridLineWidth: 0, 64 | minPadding: 0, 65 | maxPadding: 0, 66 | tickPositions: [ 67 | Date.UTC(2023, 11, 14), // Dec 14 68 | Date.UTC(2023, 11, 16), // Dec 16 69 | Date.UTC(2023, 11, 18) // Dec 18 70 | ] 71 | }, 72 | yAxis: { 73 | title: { 74 | text: undefined 75 | }, 76 | labels: { 77 | style: { 78 | color: '#666', 79 | fontSize: '12px' 80 | }, 81 | formatter: function(this: Highcharts.AxisLabelsFormatterContextObject) { 82 | const value = this.value as number; 83 | if (value === 0) return '0'; 84 | if (value === 25000000) return '25M'; 85 | if (value === 50000000) return '50M'; 86 | return ''; 87 | } 88 | }, 89 | gridLineWidth: 0, 90 | min: 0, 91 | max: 50000000, 92 | tickPositions: [0, 25000000, 50000000] 93 | }, 94 | plotOptions: { 95 | area: { 96 | fillColor: { 97 | linearGradient: { 98 | x1: 0, 99 | y1: 0, 100 | x2: 0, 101 | y2: 1 102 | }, 103 | stops: [ 104 | [0, 'rgba(59, 130, 246)'] 105 | ] 106 | }, 107 | lineColor: '#3b82f6', 108 | lineWidth: 2, 109 | marker: { 110 | enabled: false 111 | }, 112 | states: { 113 | hover: { 114 | lineWidth: 2 115 | } 116 | } 117 | } 118 | }, 119 | series: [{ 120 | type: 'area', 121 | name: 'Total reach (7-day)', 122 | data: generateMockData(), 123 | color: '#3b82f6' 124 | }], 125 | tooltip: { 126 | enabled: false 127 | }, 128 | legend: { 129 | enabled: true, 130 | align: 'right', 131 | verticalAlign: 'bottom', 132 | floating: true, 133 | x: -10, 134 | y: -35, 135 | itemStyle: { 136 | color: '#ffffff', 137 | fontWeight: 'normal', 138 | fontSize: '12px' 139 | }, 140 | backgroundColor: 'transparent', 141 | symbolRadius: 0, 142 | symbolWidth: 10, 143 | symbolHeight: 10, 144 | itemDistance: 5, 145 | padding: 0, 146 | margin: 0, 147 | shadow: false, 148 | borderWidth: 0 149 | } 150 | }; 151 | 152 | return ( 153 | 154 | 155 | Reach 156 |
157 |
158 |

159 | Impressions (7-day) 160 |

161 |
162 | 214.68K 163 | 164 | +81.72% 165 | 166 |
167 |
168 |
169 |

170 | Smart reach (7-day) 171 |

172 |
173 | 34.24M 174 | 175 | +156.91% 176 | 177 |
178 |
179 |
180 |
181 | 182 |
183 | 187 | 188 |
189 | -89.07% 190 | total impressions vs agents with similar market cap 191 |
192 |
193 |
194 |
195 | ); 196 | }; 197 | 198 | export default ReachChart; -------------------------------------------------------------------------------- /app/src/components/chart/UniqueHolderChart.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import { Card, CardContent } from "../ui/card" 4 | import Highcharts from 'highcharts' 5 | import HighchartsReact from 'highcharts-react-official' 6 | import { useEffect, useState } from "react" 7 | 8 | const UniqueHolderChart = () => { 9 | const [chartOptions, setChartOptions] = useState({ 10 | chart: { 11 | type: 'column', 12 | height: 200, 13 | backgroundColor: 'transparent', 14 | }, 15 | title: { 16 | text: undefined 17 | }, 18 | credits: { 19 | enabled: false 20 | }, 21 | xAxis: { 22 | visible: false, 23 | }, 24 | yAxis: { 25 | visible: false, 26 | }, 27 | legend: { 28 | enabled: false 29 | }, 30 | tooltip: { 31 | enabled: false 32 | }, 33 | plotOptions: { 34 | column: { 35 | borderRadius: 2, 36 | pointPadding: 0, 37 | groupPadding: 0.1, 38 | color: '#3B82F6' // blue-500 39 | } 40 | }, 41 | series: [{ 42 | type: 'column', 43 | data: Array(40).fill(1).map(() => Math.random() * 100), 44 | }] 45 | }); 46 | 47 | return ( 48 | 49 | 50 |
51 |
52 |
53 | Unique Holder 54 |
55 | 51.73K 56 | +35% 7D 57 |
58 |
59 |
60 | 61 | 65 | 66 |
67 | -22.87% holders vs agents with a similar MC 68 |
69 |
70 |
71 |
72 | ) 73 | } 74 | 75 | export default UniqueHolderChart; -------------------------------------------------------------------------------- /app/src/components/custom/AboutGovernance.tsx: -------------------------------------------------------------------------------- 1 | import { InfoIcon } from "lucide-react"; 2 | import { Button } from "../ui/button"; 3 | import { Card, CardContent, CardHeader, CardTitle } from "../ui/card"; 4 | import { 5 | HoverCard, 6 | HoverCardContent, 7 | HoverCardTrigger, 8 | } from "../ui/hover-card"; 9 | 10 | const AboutGovernance = () => { 11 | return ( 12 | 13 | 14 |
15 | 16 | About Governance 17 | 18 |

19 | This grant program is governed by $BLACKDRAGON token holders through a DAO structure. Token holders can vote on key parameters, reviewer appointments, and treasury allocations. 20 |

21 |
22 | 23 |
24 | 25 | 26 |
35
27 |
Proposals
28 |
29 |
30 | 31 | 32 |
$2,876,000
33 |
Capital Deployed
34 |
35 |
36 | 37 | 38 |
39 | 1.2B $GRANTS 40 | 41 | 42 | 43 | 44 | 45 |

Total voting power represents the sum of all $GRANTS tokens that can be used for governance decisions.

46 |
47 |
48 |
49 |
Total Voting Power
50 |
51 |
52 |
53 | 54 |
55 | 56 | 57 |
58 | 59 |

How It Works

60 |
61 |
    62 |
  • 1 $GRANTS token = 1 vote
  • 63 |
  • Proposals need 50% approval
  • 64 |
  • Minimum 1000 tokens required for grants proposals
  • 65 |
  • Voting period: 7 days
  • 66 |
  • Execution delay: 2 days after passing
  • 67 |
  • Approved changes update the AI agent Settings
  • 68 |
69 |
70 |
71 | 72 | 73 | 74 |
75 |

Voting Preferences

76 |

77 | Personal settings that determine how your votes are cast. Only visible to you as a token holder. Choose between manual voting, AI-powered voting rules, or delegating your voting power to a trusted community member. 78 |

79 |
80 | 83 |
84 |
85 |
86 |
87 |
88 | ) 89 | } 90 | 91 | export default AboutGovernance; -------------------------------------------------------------------------------- /app/src/components/custom/AgentPriview.tsx: -------------------------------------------------------------------------------- 1 | import { Button } from "../ui/button" 2 | import { Card } from "../ui/card" 3 | import { AgentPreviewTypes } from "@/types/agent" 4 | import Image from "next/image" 5 | 6 | const AgentPreview: React.FC = 7 | ({ name, image, description, governanceType, fundingFrequency, evaluationType }) => { 8 | 9 | return( 10 |
11 | 12 |
13 |
14 | Agent Preview 15 |
16 |
17 |

{name || 'AI Research DAO'}

18 |
$Token
19 |
20 | 21 |
22 |
23 | 24 |
25 | 26 |

27 | {description || 'Lorem ipsum dolor sit amet consectetur. Magnis tincidunt platea adipiscing diam in. Ut urna sed quis at eu nibh sapien neque quis.'} 28 |

29 | 30 |
31 |
32 | Governance Type 33 | {governanceType || 'Admin-based'} 34 |
35 |
36 | Funding Frequency 37 | {fundingFrequency || 'Weekly'} 38 |
39 |
40 | Evaluation Type 41 | AI + Human Review 42 |
43 |
44 |
45 |
46 | ) 47 | } 48 | 49 | export default AgentPreview -------------------------------------------------------------------------------- /app/src/components/custom/Analytics.tsx: -------------------------------------------------------------------------------- 1 | import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; 2 | import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; 3 | import MindShareChart from "../chart/MindShareChart"; 4 | import BasicAnalytics from "./BasicAnalytics"; 5 | import MarketCapChart from "../chart/MarketCapChart"; 6 | import UniqueHolderChart from "../chart/UniqueHolderChart"; 7 | import EngagementAVGChart from "../chart/EngagementAVGChart"; 8 | import ImpressionsChart from "../chart/Impressions"; 9 | import ReachChart from "../chart/ReachChart"; 10 | import EngagementChart from "../chart/EngagementChart"; 11 | 12 | const mockData = { 13 | postEngagement: 3.27, 14 | smartEngagement: 27, 15 | postEngagementGrowth: 262.13, 16 | smartEngagementGrowth: 285.71, 17 | comparisonPercentage: -83.96, 18 | series: { 19 | postEngagement: [ 20 | [Date.UTC(2023, 11, 14), 800], // Starting around 800 21 | [Date.UTC(2023, 11, 15), 1000], // Gradual increase 22 | [Date.UTC(2023, 11, 16), 1500], // Steeper increase 23 | [Date.UTC(2023, 11, 17), 2500], // Continuing up 24 | [Date.UTC(2023, 11, 18), 3000], // Peak 25 | [Date.UTC(2023, 11, 19), 3200], // Slight increase 26 | [Date.UTC(2023, 11, 20), 3270], // Final value 27 | ] as [number, number][], 28 | smartEngagement: [ 29 | [Date.UTC(2023, 11, 14), 10], // Starting around 10 30 | [Date.UTC(2023, 11, 15), 12], // Slight increase 31 | [Date.UTC(2023, 11, 16), 18], // Jump up 32 | [Date.UTC(2023, 11, 17), 22], // Continuing up 33 | [Date.UTC(2023, 11, 18), 25], // Near peak 34 | [Date.UTC(2023, 11, 19), 26], // Almost there 35 | [Date.UTC(2023, 11, 20), 27], // Final value 36 | ] as [number, number][] 37 | } 38 | }; 39 | 40 | const Analytics = () => { 41 | return ( 42 |
43 | 44 |
45 | 46 | Basic View 47 | Detailed Analytics 48 | 49 | 50 | 60 |
61 | 62 | 63 |
64 | 65 |
66 |
67 | 68 | 69 |
70 | 71 |
72 | 73 | 74 |
75 |
76 | 77 | 78 |
79 |
80 | Analytics 81 |
82 | 83 | 84 |
85 | 86 |
87 |
88 |
89 |
90 |
91 | ); 92 | }; 93 | 94 | export default Analytics; -------------------------------------------------------------------------------- /app/src/components/custom/BasicAnalytics.tsx: -------------------------------------------------------------------------------- 1 | import { Card, CardContent } from "@/components/ui/card"; 2 | 3 | interface AnalyticCardProps { 4 | title: string; 5 | value: string; 6 | change: number; 7 | timeframe?: string; 8 | } 9 | 10 | const AnalyticCard = ({ title, value, change, timeframe = "This Month" }: AnalyticCardProps) => { 11 | const isPositive = change >= 0; 12 | 13 | return ( 14 | 15 | 16 |
17 |

{title}

18 | {value} 19 |
20 |
21 |
22 | {isPositive ? '+' : "-"} 23 | {Math.abs(change)}% 24 |
25 |

{timeframe}

26 |
27 |
28 | 29 | 30 | ); 31 | }; 32 | 33 | const BasicAnalytics = () => { 34 | const analyticsData = [ 35 | { title: "Mindshare", value: "18.24%", change: 4.75 }, 36 | { title: "Price", value: "$24.09", change: -2.34 }, 37 | { title: "Marketcap", value: "$0.075", change: 17.52 }, 38 | { title: "Current Unique Holders", value: "51.73K", change: 0.34 } 39 | ]; 40 | 41 | const twitterAnalyticsData = [ 42 | { title: "Engagement", value: "237.27", change: -34.76 }, 43 | { title: "Impression", value: "19.52K", change: -22.24 }, 44 | { title: "Smart Reach", value: "89.3K", change: 140.81 } 45 | ]; 46 | 47 | return ( 48 |
49 |
50 | {analyticsData.map((item, index) => ( 51 | 57 | ))} 58 |
59 | Twitter Analytics 60 |
61 | {twitterAnalyticsData.map((item, index) => ( 62 | 68 | ))} 69 |
70 |
71 | ); 72 | }; 73 | 74 | export default BasicAnalytics; -------------------------------------------------------------------------------- /app/src/components/custom/CreateProposalModal.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import { Dialog, DialogContent, DialogHeader, DialogTitle } from "@/components/ui/dialog" 4 | import { Button } from "@/components/ui/button" 5 | import { Input } from "@/components/ui/input" 6 | import { Textarea } from "@/components/ui/textarea" 7 | import { 8 | Select, 9 | SelectContent, 10 | SelectItem, 11 | SelectTrigger, 12 | SelectValue, 13 | } from "@/components/ui/select" 14 | import { useState } from "react" 15 | import { Label } from "../ui/label" 16 | 17 | interface CreateProposalModalProps { 18 | isOpen: boolean 19 | onClose: () => void 20 | } 21 | 22 | const CreateProposalModal = ({ isOpen, onClose }: CreateProposalModalProps) => { 23 | const [title, setTitle] = useState("") 24 | const [description, setDescription] = useState("") 25 | const [selectedReviewer, setSelectedReviewer] = useState("") 26 | 27 | const handleCreateProposal = () => { 28 | // Handle proposal creation logic here 29 | console.log({ title, description, selectedReviewer }) 30 | onClose() 31 | } 32 | 33 | return ( 34 | 35 | 36 | 37 | New Proposal 38 | 39 |
40 |
41 | 42 | setTitle(e.target.value)} 47 | /> 48 |
49 | 50 |
51 | 52 |