87 | >(({ className, ...props }, ref) => (
88 | [role=checkbox]]:translate-y-[2px]",
92 | className
93 | )}
94 | {...props}
95 | />
96 | ))
97 | TableCell.displayName = "TableCell"
98 |
99 | const TableCaption = React.forwardRef<
100 | HTMLTableCaptionElement,
101 | React.HTMLAttributes
102 | >(({ className, ...props }, ref) => (
103 |
108 | ))
109 | TableCaption.displayName = "TableCaption"
110 |
111 | export {
112 | Table,
113 | TableHeader,
114 | TableBody,
115 | TableFooter,
116 | TableHead,
117 | TableRow,
118 | TableCell,
119 | TableCaption,
120 | }
121 |
--------------------------------------------------------------------------------
/app/src/components/ui/tabs.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import * as React from "react"
4 | import * as TabsPrimitive from "@radix-ui/react-tabs"
5 |
6 | import { cn } from "@/lib/utils"
7 |
8 | const Tabs = TabsPrimitive.Root
9 |
10 | const TabsList = React.forwardRef<
11 | React.ElementRef,
12 | React.ComponentPropsWithoutRef
13 | >(({ className, ...props }, ref) => (
14 |
22 | ))
23 | TabsList.displayName = TabsPrimitive.List.displayName
24 |
25 | const TabsTrigger = React.forwardRef<
26 | React.ElementRef,
27 | React.ComponentPropsWithoutRef
28 | >(({ className, ...props }, ref) => (
29 |
37 | ))
38 | TabsTrigger.displayName = TabsPrimitive.Trigger.displayName
39 |
40 | const TabsContent = React.forwardRef<
41 | React.ElementRef,
42 | React.ComponentPropsWithoutRef
43 | >(({ className, ...props }, ref) => (
44 |
52 | ))
53 | TabsContent.displayName = TabsPrimitive.Content.displayName
54 |
55 | export { Tabs, TabsList, TabsTrigger, TabsContent }
56 |
--------------------------------------------------------------------------------
/app/src/components/ui/textarea.tsx:
--------------------------------------------------------------------------------
1 | import * as React from "react"
2 |
3 | import { cn } from "@/lib/utils"
4 |
5 | const Textarea = React.forwardRef<
6 | HTMLTextAreaElement,
7 | React.ComponentProps<"textarea">
8 | >(({ className, ...props }, ref) => {
9 | return (
10 |
18 | )
19 | })
20 | Textarea.displayName = "Textarea"
21 |
22 | export { Textarea }
23 |
--------------------------------------------------------------------------------
/app/src/context/WalletSelectorContext.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import type { AccountState, NetworkId, WalletSelector } from "@near-wallet-selector/core";
4 | import { setupWalletSelector } from "@near-wallet-selector/core";
5 | import type { WalletSelectorModal } from "@near-wallet-selector/modal-ui";
6 | import { setupModal } from "@near-wallet-selector/modal-ui";
7 | import { setupNightly } from "@near-wallet-selector/nightly";
8 | import { setupMyNearWallet } from "@near-wallet-selector/my-near-wallet";
9 | import { setupHereWallet } from "@near-wallet-selector/here-wallet";
10 | import { setupBitteWallet } from "@near-wallet-selector/bitte-wallet";
11 | import { setupMeteorWallet } from "@near-wallet-selector/meteor-wallet";
12 |
13 | import type { ReactNode, FC } from "react";
14 | import React, {
15 | useCallback,
16 | useContext,
17 | useEffect,
18 | useState,
19 | useMemo,
20 | } from "react";
21 | import { distinctUntilChanged, map } from "rxjs";
22 | import { NextPage } from "next";
23 |
24 |
25 | declare global {
26 | interface Window {
27 | selector: WalletSelector;
28 | modal: WalletSelectorModal;
29 | }
30 | }
31 |
32 | interface WalletSelectorContextValue {
33 | selector: WalletSelector;
34 | modal: WalletSelectorModal;
35 | accounts: Array;
36 | accountId: string | null;
37 | }
38 |
39 | const WalletSelectorContext = React.createContext(null);
40 |
41 |
42 | export const WalletSelectorContextProvider: NextPage<{
43 | children: ReactNode;
44 | }> = ({ children }) => {
45 | const [selector, setSelector] = useState(null);
46 | const [modal, setModal] = useState(null);
47 | const [accounts, setAccounts] = useState>([]);
48 | const [loading, setLoading] = useState(true);
49 |
50 | const init = useCallback(async () => {
51 | const _selector = await setupWalletSelector({
52 | network: process.env.NEXT_PUBLIC_NETWORK as NetworkId,
53 | debug: true,
54 | modules: [
55 | setupNightly() as any,
56 | setupMyNearWallet(),
57 | setupHereWallet(),
58 | setupMeteorWallet(),
59 | setupBitteWallet({
60 | walletUrl: process.env.NEXT_PUBLIC_NETWORK as NetworkId == "mainnet" ? process.env.NEXT_PUBLIC_WALLET_URL as string : process.env.NEXT_PUBLIC_WALLET_URL_TESTNET as string,
61 | callbackUrl: process.env.NEXT_PUBLIC_CALLBACK_URL,
62 | deprecated: false,
63 | }),
64 | ],
65 | });
66 | const _modal = setupModal(_selector, {
67 | contractId: process.env.NEXT_PUBLIC_NETWORK as NetworkId == "mainnet" ? process.env.NEXT_PUBLIC_AI_PGF_FORUM_CONTRACT as string : process.env.NEXT_PUBLIC_AI_PGF_FORUM_CONTRACT_TESTNET as string,
68 | });
69 | const state = _selector.store.getState();
70 | setAccounts(state.accounts);
71 |
72 | // this is added for debugging purpose only
73 | // for more information (https://github.com/near/wallet-selector/pull/764#issuecomment-1498073367)
74 | window.selector = _selector;
75 | window.modal = _modal;
76 |
77 | setSelector(_selector);
78 | setModal(_modal);
79 | setLoading(false);
80 | }, []);
81 |
82 | useEffect(() => {
83 | init().catch((err) => {
84 | console.error(err);
85 | alert("Failed to initialise wallet selector");
86 | });
87 | }, [init]);
88 |
89 | useEffect(() => {
90 | if (!selector) {
91 | return;
92 | }
93 |
94 | const subscription = selector.store.observable
95 | .pipe(
96 | map((state:any) => state.accounts),
97 | distinctUntilChanged()
98 | )
99 | .subscribe((nextAccounts:any) => {
100 | console.log("Accounts Update", nextAccounts);
101 |
102 | setAccounts(nextAccounts);
103 | });
104 |
105 | const onHideSubscription = modal!.on("onHide", ({ hideReason }) => {
106 | console.log(`The reason for hiding the modal ${hideReason}`);
107 | });
108 |
109 | return () => {
110 | subscription.unsubscribe();
111 | onHideSubscription.remove();
112 | };
113 | }, [selector, modal]);
114 |
115 | const walletSelectorContextValue = useMemo(
116 | () => ({
117 | selector: selector!,
118 | modal: modal!,
119 | accounts,
120 | accountId: accounts.find((account) => account.active)?.accountId || null,
121 | }),
122 | [selector, modal, accounts]
123 | );
124 |
125 |
126 | return (
127 |
128 | {children}
129 |
130 | );
131 | };
132 |
133 | export function useWalletSelector() {
134 | const context = useContext(WalletSelectorContext);
135 |
136 | if (!context) {
137 | throw new Error(
138 | "useWalletSelector must be used within a WalletSelectorContextProvider"
139 | );
140 | }
141 |
142 | return context;
143 | }
--------------------------------------------------------------------------------
/app/src/hooks/near-method.ts:
--------------------------------------------------------------------------------
1 | import { NearRpcProvider } from 'near-rpc-providers';
2 |
3 | const getRpcProvider = () => {
4 | const networkId = process.env.NEXT_PUBLIC_NETWORK || "";
5 | const provider = new NearRpcProvider(networkId === "mainnet" ? "near" : "neartestnet");
6 | return provider;
7 | };
8 |
9 | export const ViewMethod = async (contractId: string, method: string, args: any) => {
10 | try {
11 | const provider = getRpcProvider();
12 |
13 | const argsString = args ? JSON.stringify(args) : '{}';
14 | const argsBase64 = Buffer.from(argsString).toString('base64');
15 |
16 | const response = await provider.contractCall(
17 | contractId,
18 | 'latest',
19 | method,
20 | argsBase64
21 | );
22 |
23 | if (!response || !response.result) {
24 | return null;
25 | }
26 |
27 | try {
28 |
29 | if (response.result instanceof Array && response.result.length > 0 || response.result instanceof Uint8Array) {
30 | return JSON.parse(Buffer.from(response.result).toString());
31 | }
32 |
33 | return response.result;
34 | } catch (parseError) {
35 | console.error('Error parsing response result:', parseError);
36 | return response.result;
37 | }
38 |
39 | } catch (error) {
40 | console.error('ViewMethod error:', error);
41 | throw error;
42 | }
43 | };
44 |
45 | export const CallMethod = async (accountId:string,selector:any,contractId: string, method: string, args: any, options?: {
46 | gas?: string;
47 | deposit?: string;
48 | callbackUrl?: string;
49 | }) => {
50 | try {
51 |
52 | if (!accountId) {
53 | throw new Error("Please connect wallet first");
54 | }
55 | const wallet = await selector.wallet();
56 | const transaction = {
57 | receiverId: contractId,
58 | callbackUrl: options?.callbackUrl,
59 | actions: [{
60 | type: 'FunctionCall',
61 | params: {
62 | methodName: method,
63 | args: args,
64 | gas: options?.gas || '30000000000000',
65 | deposit: options?.deposit || '0'
66 | }
67 | }]
68 | };
69 |
70 | const result = await wallet.signAndSendTransaction(transaction as any);
71 |
72 | return result;
73 | } catch (error) {
74 | console.error('CallMethod error:', error);
75 | throw error;
76 | }
77 | };
78 |
--------------------------------------------------------------------------------
/app/src/lib/utils.ts:
--------------------------------------------------------------------------------
1 | import { type ClassValue, clsx } from "clsx"
2 | import { twMerge } from "tailwind-merge"
3 |
4 | export function cn(...inputs: ClassValue[]) {
5 | return twMerge(clsx(inputs))
6 | }
7 |
8 | export function formatDate(date: Date): string {
9 | return new Intl.DateTimeFormat('en-US', {
10 | month: 'short',
11 | day: 'numeric',
12 | year: 'numeric'
13 | }).format(date)
14 | }
15 |
16 | export function timeAgo(date: Date): string {
17 | const now = new Date()
18 | const diffInSeconds = Math.floor((now.getTime() - date.getTime()) / 1000)
19 |
20 | const intervals = {
21 | year: 31536000,
22 | month: 2592000,
23 | week: 604800,
24 | day: 86400,
25 | hour: 3600,
26 | minute: 60,
27 | second: 1
28 | }
29 |
30 | for (const [unit, secondsInUnit] of Object.entries(intervals)) {
31 | const interval = Math.floor(diffInSeconds / secondsInUnit)
32 |
33 | if (interval >= 1) {
34 | return interval === 1 ? `1 ${unit} ago` : `${interval} ${unit}s ago`
35 | }
36 | }
37 |
38 | return 'just now'
39 | }
--------------------------------------------------------------------------------
/app/src/types/agent.ts:
--------------------------------------------------------------------------------
1 | export interface AgentPreviewTypes {
2 | name: string
3 | description: string
4 | image: string
5 | governanceType: string
6 | fundingFrequency: string
7 | evaluationType: string
8 | }
--------------------------------------------------------------------------------
/app/src/types/types.ts:
--------------------------------------------------------------------------------
1 | export interface AvatarProfileProps {
2 | accountId: string;
3 | size?: number;
4 | style?: string;
5 | image?: string;
6 | }
7 |
--------------------------------------------------------------------------------
/app/tailwind.config.ts:
--------------------------------------------------------------------------------
1 | import type { Config } from "tailwindcss";
2 |
3 | export default {
4 | darkMode: ["class"],
5 | content: [
6 | "./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
7 | "./src/components/**/*.{js,ts,jsx,tsx,mdx}",
8 | "./src/app/**/*.{js,ts,jsx,tsx,mdx}",
9 | ],
10 | theme: {
11 | extend: {
12 | colors: {
13 | background: 'hsl(var(--background))',
14 | foreground: 'hsl(var(--foreground))',
15 | card: {
16 | DEFAULT: 'hsl(var(--card))',
17 | foreground: 'hsl(var(--card-foreground))'
18 | },
19 | popover: {
20 | DEFAULT: 'hsl(var(--popover))',
21 | foreground: 'hsl(var(--popover-foreground))'
22 | },
23 | primary: {
24 | DEFAULT: 'hsl(var(--primary))',
25 | foreground: 'hsl(var(--primary-foreground))'
26 | },
27 | secondary: {
28 | DEFAULT: 'hsl(var(--secondary))',
29 | foreground: 'hsl(var(--secondary-foreground))'
30 | },
31 | muted: {
32 | DEFAULT: 'hsl(var(--muted))',
33 | foreground: 'hsl(var(--muted-foreground))'
34 | },
35 | accent: {
36 | DEFAULT: 'hsl(var(--accent))',
37 | foreground: 'hsl(var(--accent-foreground))'
38 | },
39 | destructive: {
40 | DEFAULT: 'hsl(var(--destructive))',
41 | foreground: 'hsl(var(--destructive-foreground))'
42 | },
43 | border: 'hsl(var(--border))',
44 | input: 'hsl(var(--input))',
45 | ring: 'hsl(var(--ring))',
46 | chart: {
47 | '1': 'hsl(var(--chart-1))',
48 | '2': 'hsl(var(--chart-2))',
49 | '3': 'hsl(var(--chart-3))',
50 | '4': 'hsl(var(--chart-4))',
51 | '5': 'hsl(var(--chart-5))'
52 | }
53 | },
54 | borderRadius: {
55 | lg: 'var(--radius)',
56 | md: 'calc(var(--radius) - 2px)',
57 | sm: 'calc(var(--radius) - 4px)'
58 | }
59 | }
60 | },
61 | plugins: [require("tailwindcss-animate")],
62 | } satisfies Config;
63 |
--------------------------------------------------------------------------------
/app/tests/create-agent.spec.ts:
--------------------------------------------------------------------------------
1 | import { test, expect } from '@playwright/test';
2 |
3 | test.describe('Create Agent Page', () => {
4 | test.beforeEach(async ({ page }) => {
5 | await page.goto('/agents/create');
6 | });
7 |
8 | test('displays initial page layout correctly', async ({ page }) => {
9 | // Check header content
10 | await expect(page.getByRole('heading', { name: 'Create AI Agent' })).toBeVisible();
11 | await expect(page.getByText('Launch your own grant program on social with an agent governed by token holders')).toBeVisible();
12 |
13 | // Check if preview card is visible
14 | await expect(page.getByRole('button', { name: 'Preview' })).toBeVisible();
15 | await expect(page.getByText('AI Research DAO')).toBeVisible();
16 | });
17 |
18 | test('completes basic information step', async ({ page }) => {
19 | // Test form elements visibility
20 | await expect(page.getByLabel(/Name/i)).toBeVisible();
21 | await expect(page.getByLabel(/Description/i)).toBeVisible();
22 |
23 | // Fill out basic information
24 | await page.getByLabel(/Name/i).fill('Test Agent');
25 | await page.getByLabel(/Description/i).fill('Test Description');
26 |
27 | // Click next and verify transition to step 2
28 | await page.getByRole('button', { name: /Next/i }).click();
29 | await expect(page.getByText(/Token Configuration/i)).toBeVisible();
30 | });
31 |
32 | test('navigates through all form steps', async ({ page }) => {
33 | // Step 1: Basic Information
34 | await page.getByLabel(/Name/i).fill('Test Agent');
35 | await page.getByLabel(/Description/i).fill('Test Description');
36 | await page.getByRole('button', { name: /Next/i }).click();
37 |
38 | // Step 2: Token Configuration
39 | await expect(page.getByText(/Token Configuration/i)).toBeVisible();
40 | await page.getByRole('button', { name: /Next/i }).click();
41 |
42 | // Step 3: Platform Integration
43 | await expect(page.getByText(/Platform Integration/i)).toBeVisible();
44 | await page.getByRole('button', { name: /Next/i }).click();
45 |
46 | // Step 4: Grant Canvas
47 | await expect(page.getByText(/Grant Canvas/i)).toBeVisible();
48 | await page.getByRole('button', { name: /Next/i }).click();
49 |
50 | // Step 5: Wallet Configuration
51 | await expect(page.getByText(/Wallet Configuration/i)).toBeVisible();
52 | });
53 |
54 | test('preview card updates with form input', async ({ page }) => {
55 | const testName = 'Test Agent Name';
56 | const testDescription = 'Test agent description';
57 |
58 | await page.getByLabel(/Name/i).fill(testName);
59 | await page.getByLabel(/Description/i).fill(testDescription);
60 |
61 | // Verify preview card updates
62 | await expect(page.getByText(testName)).toBeVisible();
63 | await expect(page.getByText(testDescription)).toBeVisible();
64 | });
65 |
66 | test('allows navigation between steps using back button', async ({ page }) => {
67 | // Go to step 2
68 | await page.getByLabel(/Name/i).fill('Test Agent');
69 | await page.getByRole('button', { name: /Next/i }).click();
70 | await expect(page.getByText(/Token Configuration/i)).toBeVisible();
71 |
72 | // Go back to step 1
73 | await page.getByRole('button', { name: /Back/i }).click();
74 | await expect(page.getByText(/Basic Information/i)).toBeVisible();
75 | });
76 |
77 | test('shows deploy success message', async ({ page }) => {
78 | // Navigate to final step
79 | await page.getByLabel(/Name/i).fill('Test Agent');
80 | await page.getByRole('button', { name: /Next/i }).click();
81 | await page.getByRole('button', { name: /Next/i }).click();
82 | await page.getByRole('button', { name: /Next/i }).click();
83 | await page.getByRole('button', { name: /Next/i }).click();
84 |
85 | // Deploy agent
86 | await page.getByRole('button', { name: /Deploy/i }).click();
87 | await expect(page.getByText('Agent deployed successfully!')).toBeVisible();
88 | });
89 | });
--------------------------------------------------------------------------------
/app/tests/home.spec.ts:
--------------------------------------------------------------------------------
1 | import { test, expect } from '@playwright/test';
2 |
3 | test.describe('Home Page', () => {
4 | test('should display main elements', async ({ page }) => {
5 | // Navigate to the home page
6 | await page.goto('/');
7 |
8 | // Check if hero section exists
9 | await expect(page.locator('section').filter({ hasText: /Welcome to Grants Fun/i })).toBeVisible();
10 |
11 | // Check if featured sections exist
12 | await expect(page.getByText(/Featured Grant Operators/i)).toBeVisible();
13 | await expect(page.getByText(/Featured Grant Agents/i)).toBeVisible();
14 |
15 | // Check if header navigation exists
16 | await expect(page.locator('header')).toBeVisible();
17 | await expect(page.getByRole('link', { name: /Create Agent/i })).toBeVisible();
18 | });
19 |
20 | test('navigation works correctly', async ({ page }) => {
21 | await page.goto('/');
22 |
23 | // Click on Create Agent link and verify navigation
24 | await page.getByRole('link', { name: /Create Agent/i }).click();
25 | await expect(page).toHaveURL(/.*\/agents\/create/);
26 | });
27 | });
--------------------------------------------------------------------------------
/app/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "ES2017",
4 | "lib": ["dom", "dom.iterable", "esnext"],
5 | "allowJs": true,
6 | "skipLibCheck": true,
7 | "strict": true,
8 | "noEmit": true,
9 | "esModuleInterop": true,
10 | "module": "esnext",
11 | "moduleResolution": "bundler",
12 | "resolveJsonModule": true,
13 | "isolatedModules": true,
14 | "jsx": "preserve",
15 | "incremental": true,
16 | "plugins": [
17 | {
18 | "name": "next"
19 | }
20 | ],
21 | "paths": {
22 | "@/*": ["./src/*"]
23 | },
24 | "allowSyntheticDefaultImports": true
25 | },
26 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "src/components/chart/EngagementChart"],
27 | "exclude": ["node_modules"]
28 | }
29 |
--------------------------------------------------------------------------------
/docs/.gitignore:
--------------------------------------------------------------------------------
1 | # Dependencies
2 | /node_modules
3 |
4 | # Production
5 | /build
6 |
7 | # Generated files
8 | .docusaurus
9 | .cache-loader
10 |
11 | # Misc
12 | .DS_Store
13 | .env.local
14 | .env.development.local
15 | .env.test.local
16 | .env.production.local
17 |
18 | npm-debug.log*
19 | yarn-debug.log*
20 | yarn-error.log*
21 |
--------------------------------------------------------------------------------
/docs/README.md:
--------------------------------------------------------------------------------
1 | # Website
2 |
3 | This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
4 |
5 | ### Installation
6 |
7 | ```
8 | $ yarn
9 | ```
10 |
11 | ### Local Development
12 |
13 | ```
14 | $ yarn start
15 | ```
16 |
17 | This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
18 |
19 | ### Build
20 |
21 | ```
22 | $ yarn build
23 | ```
24 |
25 | This command generates static content into the `build` directory and can be served using any static contents hosting service.
26 |
27 | ### Deployment
28 |
29 | Using SSH:
30 |
31 | ```
32 | $ USE_SSH=true yarn deploy
33 | ```
34 |
35 | Not using SSH:
36 |
37 | ```
38 | $ GIT_USER= yarn deploy
39 | ```
40 |
41 | If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
42 |
--------------------------------------------------------------------------------
/docs/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
3 | };
4 |
--------------------------------------------------------------------------------
/docs/blog/2021-08-01-mdx-blog-post.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | slug: mdx-blog-post
3 | title: MDX Blog Post
4 | authors: [plugrel]
5 | tags: [docusaurus]
6 | ---
7 |
8 | Blog posts support [Docusaurus Markdown features](https://docusaurus.io/docs/markdown-features), such as [MDX](https://mdxjs.com/).
9 |
10 | :::tip
11 |
12 | Use the power of React to create interactive blog posts.
13 |
14 | :::
15 |
16 | {/* truncate */}
17 |
18 | For example, use JSX to create an interactive button:
19 |
20 | ```js
21 | alert('button clicked!')}>Click me!
22 | ```
23 |
24 | alert('button clicked!')}>Click me!
25 |
--------------------------------------------------------------------------------
/docs/blog/2024-08-26-welcome/docusaurus-plushie-banner.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PotLock/grantsdotfun/973bd1b4d35bae406c0fa8c94128dd7e7d32420d/docs/blog/2024-08-26-welcome/docusaurus-plushie-banner.jpeg
--------------------------------------------------------------------------------
/docs/blog/2024-08-26-welcome/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | slug: welcome
3 | title: Welcome to GRANTS.FUN
4 | authors: [plugrel]
5 | tags: [contract, factory, grants]
6 | ---
7 |
8 | # Welcome to GRANTS.FUN 🎉
9 |
10 | We're excited to launch GRANTS.FUN, your platform for deploying AI-powered grant operators. Stay tuned for more updates and announcements!
11 |
12 | ## What's Coming
13 | - Detailed tutorials
14 | - Integration guides
15 | - Community features
16 | - Success stories
17 |
18 | More content coming soon!
19 |
20 |
--------------------------------------------------------------------------------
/docs/blog/authors.yml:
--------------------------------------------------------------------------------
1 | plugrel:
2 | name: Plugrel
3 | title: Core Contributor at Potlock
4 | url: https://github.com/codingshot
5 | image_url: https://github.com/codingshot.png
6 | page: true
7 | socials:
8 | x: plugrel
9 | github: codingshot
10 |
11 |
--------------------------------------------------------------------------------
/docs/blog/tags.yml:
--------------------------------------------------------------------------------
1 | facebook:
2 | label: Facebook
3 | permalink: /facebook
4 | description: Facebook tag description
5 |
6 | hello:
7 | label: Hello
8 | permalink: /hello
9 | description: Hello tag description
10 |
11 | docusaurus:
12 | label: Docusaurus
13 | permalink: /docusaurus
14 | description: Posts related to Docusaurus features and functionality
15 |
16 | hola:
17 | label: Hola
18 | permalink: /hola
19 | description: Hola tag description
20 |
21 | referral-system:
22 | label: Referral System
23 | permalink: /referral-system
24 | description: Documentation and information about the Referral System API
25 |
26 | smart-contracts:
27 | label: Smart Contracts
28 | permalink: /smart-contracts
29 | description: Topics related to blockchain smart contracts
30 |
31 | api-documentation:
32 | label: API Documentation
33 | permalink: /api-documentation
34 | description: Detailed explanations of API endpoints and structures
35 |
--------------------------------------------------------------------------------
/docs/docs/developers/_category_.json:
--------------------------------------------------------------------------------
1 | {
2 | "label": "Developers",
3 | "position": 3,
4 | "link": {
5 | "type": "generated-index"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/docs/docs/developers/contracts.md:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: 1
3 | ---
4 |
5 | # Contracts
6 |
7 | Coming Soon
--------------------------------------------------------------------------------
/docs/docs/developers/indexer.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: 2
3 | ---
4 |
5 | # 📊 Indexer
6 |
7 | Build your own GraphQL Indexer or use our existing GraphQL Indexer.
8 |
9 | ## What is GraphQL?
10 |
11 | [GraphQL](https://graphql.org/) is a query language and runtime for APIs that allows clients to request exactly the data they need. Unlike traditional REST APIs, GraphQL provides a more efficient, powerful, and flexible approach to data fetching and manipulation. With GraphQL, you can:
12 |
13 | - Request multiple resources in a single query
14 | - Specify precisely the data you want to retrieve
15 | - Receive predictable results that match your query structure
16 | - Evolve your API without versioning
17 |
18 | ## 🔍 Available Queries
19 | Coming soon
20 |
21 | ## 🔄 Mutations
22 | Coming soon
23 |
24 | ## 📈 Subscriptions
25 | Coming soon
26 |
27 | ## 🚀 Getting Started
28 | Coming soon
29 |
30 | ## 📖 Examples
31 | Coming soon
32 |
33 | ## 🛠️ Self-Hosting Guide
34 | Coming soon
35 |
36 |
37 |
--------------------------------------------------------------------------------
/docs/docs/developers/js.mdx:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: 3
3 | ---
4 |
5 | # JavaScript SDK
6 |
7 | Use our JavaScript SDK to build this into a script or a dApp.
8 |
9 | ## Installation
10 | Coming soon
11 |
12 | ## Usage
13 | Coming soon
14 |
15 | ## API Reference
16 | Coming soon
17 |
18 | ## Examples
19 | Coming soon
20 |
21 |
22 |
--------------------------------------------------------------------------------
/docs/docs/intro.md:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: 1
3 | ---
4 |
5 | # 🎮 GRANTS.FUN Overview
6 |
7 | Let's discover **GRANTS.FUN in less than 5 minutes** ⚡
8 |
9 | ## 🎯 Overview
10 |
11 | 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.
12 |
13 | ### ✨ Key Features:
14 |
15 | 1. **🤖 AI Grant Operators**: Deploy autonomous agents that evaluate and distribute grants based on customizable criteria
16 | 2. **🐦 Social Integration**: Direct integration with Twitter/X for grant applications and community feedback
17 | 3. **👥 Multi-reviewer System**: Set up multiple reviewers to evaluate grant effectiveness based on the social media ID
18 | 4. **🏛️ Token-based Governance**: Use your GRant OPERATOR tokens for setting overall grant criteria and priorities (soon)
19 | 5. **💸 On-chain Payments**: Automated grant distribution across multiple chains
20 | 6. **🧠 Built on Eliza **: Leveraging the Eliza Framework for robust AI agent capabilities
21 |
22 | ## 🤔 Problem Statement
23 |
24 | GRANTS.FUN addresses several key issues in the Web3 ecosystem:
25 |
26 | 1. **⏳ Grant Distribution Inefficiency**: Traditional grant programs are slow and resource-intensive
27 | 2. **🔗 Limited Social Integration**: Current systems lack direct integration with social platforms
28 | 3. **👤 Centralized Decision Making**: Most grant programs rely on manual, centralized evaluation
29 | 4. **📈 Scale Limitations**: Human-operated grant programs struggle to scale effectively
30 |
31 | # High Level Architecture
32 | - Agentoor SDK - framework on top of Eliza for building social agents that facilaite grants
33 | - Grants.fun - UI for deploying agents and managing grants
34 | = $GRANTS token - governance platform
35 | - Agent token
36 | - Contract layer - training.potlock.near - training contract for adjusting agents settings on Agent Registry
37 | - Agent wallet configuration
38 | ## 🎯 Use Cases
39 |
40 | - 🤖 Autonomous grant distribution
41 | - 🌟 KOL tokens
42 | - 🏆 Rewards and contests
43 | - 📱 Social-signal based evaluation
44 | - 🤝 Community-driven funding allocation
45 | - ⛓️ Cross-chain grant programs
46 | - 🏦 DAO treasury management
47 |
48 | ## 🚀 Getting Started
49 |
50 | To start using GRANTS.FUN, you'll need to:
51 |
52 | 1. 🐦 Connect your Twitter/X account
53 | 2. 🤖 Deploy an AI grant operator
54 | 3. 👥 Set up reviewers and criteria
55 | 4. 💰 Fund your operator wallet
56 |
57 | Built with ❤️ by Potlock Labs
58 |
59 | ## 🛠️ Technical Stack
60 |
61 | - ⛓️ Built on NEAR Protocol
62 | - 🍳 Integrated with meme.cooking
63 | - 🧠 Powered by the Eliza Framework
64 | - 💸 Multi-chain payment support
65 |
66 | ## 🌐 Community Channels
67 |
68 | - 💬 [Telegram](https://t.me/grantsdotfun)
69 | - 🐦 [Twitter/X](https://twitter.com/grantsdotfun)
70 | - 📚 [GitHub](https://github.com/potlock/grantsdotfun)
71 |
--------------------------------------------------------------------------------
/docs/docs/user-guides/_category_.json:
--------------------------------------------------------------------------------
1 | {
2 | "label": "User Guides",
3 | "position": 2,
4 | "link": {
5 | "type": "generated-index",
6 | "description": "Learn how to use the REFER App."
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/docs/docs/user-guides/create_agent.md:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: 1
3 | ---
4 |
5 | # Creating a Grant Operator Agent
6 |
7 | Learn how to create and deploy your own AI grant operator.
8 |
9 | ## Prerequisites
10 | - Twitter/X account
11 | - NEAR wallet
12 | - $GRANTS tokens for payment (optional)
13 |
14 | ## Steps to Create a Program
15 |
16 | ### 1. Connect Social Accounts
17 | - Link your Twitter/X account
18 | - Verify your account ownership
19 | - Set up program social profile
20 |
21 | ### 2. Configure AI Operator
22 |
23 | #### Basic Settings
24 | - Program name and description
25 | - Grant pool size and token types
26 | - Grant size ranges
27 | - Program duration
28 |
29 | #### AI Parameters
30 | - Project evaluation criteria
31 | - Social signal weights
32 | - Required engagement metrics
33 | - Automated response templates
34 |
35 | ### 3. Set Up Reviewers
36 | - Add reviewer accounts
37 | - Define reviewer permissions
38 | - Set minimum reviewer consensus
39 | - Configure review timeframes
40 |
41 | ### 4. Fund Your Program
42 | - Transfer funds to operator wallet
43 | - Set up multi-chain payment options
44 | - Configure payout schedules
45 |
46 | ### 5. Launch Program
47 | - Activate AI operator
48 | - Announce on Twitter/X
49 | - Monitor initial applications
50 |
51 | ## Best Practices
52 | - Start with smaller grant sizes during testing
53 | - Regularly review AI decisions
54 | - Maintain active social presence
55 | - Engage with community feedback
56 |
57 | Built with ❤️ by Potlock Labs
58 |
--------------------------------------------------------------------------------
/docs/docs/user-guides/governance.md:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: 4
3 | ---
4 |
5 | # 🏛️ Token Governance
6 |
7 | Each grant operator token has governance setting the priority of the agent. This is not to be confused with Potlock Protocol $GRANTS token which also serves a payment for dpeloying agents and the platform token
8 |
9 | ## 🪙 Token Overview
10 | - 💎 Opeattor token utility
11 | - 🗳️ Governance rights
12 | - 🔒 Staking mechanisms
13 | - 💰 Reward distribution
14 |
15 | ## 🗳️ Voting Mechanisms
16 |
17 | ### 📋 Program Parameters
18 | - 🎯 Setting grant criteria
19 | - ⚖️ Adjusting evaluation weights
20 | - 📊 Defining success metrics
21 | - 💰 Establishing funding limits
22 |
23 | ### 🔄 Strategic Decisions
24 | - 🎯 Program priorities
25 | - ⛓️ Chain integrations
26 | - 💡 Feature proposals
27 | - 🔄 Protocol upgrades
28 |
29 | ## 📜 Participation Guidelines
30 |
31 | ### 🗳️ Voting Process
32 | - 📝 Proposal submission
33 | - 💬 Discussion period
34 | - ✅ Voting period
35 | - ⏱️ Implementation timeline
36 |
37 | ### 🔒 Staking Requirements
38 | - 💰 Minimum stake amounts
39 | - ⏳ Lock-up periods
40 | - ⚖️ Voting power calculation
41 | - 🔓 Unstaking procedures
42 |
43 | ## 👥 Community Governance
44 |
45 | ### 📋 Proposal Framework
46 | - 📝 Creating proposals
47 | - 📚 Required documentation
48 | - 💬 Discussion formats
49 | - 🎯 Voting thresholds
50 |
51 | ### ⚙ Execution Process
52 | - Approved changes implementation
53 | - Timelock periods
54 | - Emergency procedures
55 | - Update verification
56 |
57 | # Current Integrations
58 | - NEAR
59 | - Twitter
--------------------------------------------------------------------------------
/docs/docs/user-guides/social_integration.md:
--------------------------------------------------------------------------------
1 | ---
2 | sidebar_position: 2
3 | ---
4 |
5 | # 🐦 Social Integration Guide
6 |
7 | Learn how to leverage Twitter/X integration for your grant program.
8 |
9 | ## 🔗 Twitter/X Integration
10 |
11 | ### 🎯 Setting Up Your Program Account
12 | - Creating a dedicated program handle
13 | - Configuring automated responses
14 | - Setting up application tracking
15 |
16 | ### 📝 Application Process
17 | 1. **Tweet Application Format**
18 | - Required hashtags (#GRANTSFUN, #Grants)
19 | - Project description format (max 280 chars)
20 | - Required attachments/links (GitHub, Website)
21 |
22 | 2. **📊 Engagement Metrics**
23 | - Like thresholds
24 | - Retweet requirements
25 | - Comment analysis
26 | - Smart Followers
27 |
28 | ### 🤖 Automated Responses
29 | - Application received confirmations
30 | - Status updates
31 | - Grant approval notifications
32 | - Payment claim instructions
33 |
34 | ## 👥 Community Management
35 |
36 | ### 📋 Reviewer Integration
37 | - Adding reviewer accounts
38 | - Review comment format
39 | - Consensus tracking
40 |
41 | ### 📈 Analytics Dashboard (on grants.fun agent admin view)
42 | - Engagement metrics
43 | - Application statistics
44 | - Success rates
45 | - Recent submitted applciations
46 | - Filter by reviweers
47 | - Community growth
48 |
49 | ## ✨ Best Practices
50 | - Regular community updates
51 | - Transparent decision processes
52 | - Active engagement with applicants
53 | - Clear communication guidelines
--------------------------------------------------------------------------------
/docs/docusaurus.config.ts:
--------------------------------------------------------------------------------
1 | import {themes as prismThemes} from 'prism-react-renderer';
2 | import type {Config} from '@docusaurus/types';
3 | import type * as Preset from '@docusaurus/preset-classic';
4 |
5 | const config: Config = {
6 | title: 'GRANTS.FUN',
7 | tagline: 'Deploy AI Grant Operators',
8 | favicon: 'img/favicon.ico',
9 |
10 | // Set the production url of your site here
11 | url: 'https://docs.grants.fun',
12 | // Set the // pathname under which your site is served
13 | // For GitHub pages deployment, it is often '//'
14 | baseUrl: '/',
15 |
16 | // GitHub pages deployment config.
17 | // If you aren't using GitHub pages, you don't need these.
18 | organizationName: 'POTLOCK', // Usually your GitHub org/user name.
19 | projectName: 'grantsdotfun', // Usually your repo name.
20 |
21 | onBrokenLinks: 'throw',
22 | onBrokenMarkdownLinks: 'warn',
23 |
24 | // Even if you don't use internationalization, you can use this field to set
25 | // useful metadata like html lang. For example, if your site is Chinese, you
26 | // may want to replace "en" with "zh-Hans".
27 | i18n: {
28 | defaultLocale: 'en',
29 | locales: ['en'],
30 | },
31 |
32 | presets: [
33 | [
34 | 'classic',
35 | {
36 | docs: {
37 | sidebarPath: './sidebars.ts',
38 | // Please change this to your repo.
39 | // Remove this to remove the "edit this page" links.
40 | editUrl:
41 | 'https://github.com/potlock/grantsdotfun',
42 | },
43 | blog: {
44 | showReadingTime: true,
45 | feedOptions: {
46 | type: ['rss', 'atom'],
47 | xslt: true,
48 | },
49 | // Please change this to your repo.
50 | // Remove this to remove the "edit this page" links.
51 | editUrl:
52 | 'https://github.com/potlock/grantsdotfun',
53 | // Useful options to enforce blogging best practices
54 | onInlineTags: 'warn',
55 | onInlineAuthors: 'warn',
56 | onUntruncatedBlogPosts: 'warn',
57 | },
58 | theme: {
59 | customCss: './src/css/custom.css',
60 | },
61 | } satisfies Preset.Options,
62 | ],
63 | ],
64 |
65 | themeConfig: {
66 | // Replace with your project's social card
67 | image: 'img/meta.png',
68 | navbar: {
69 | title: 'GRANTS.FUN',
70 | logo: {
71 | alt: 'GRANTS.FUN Docs Logo',
72 | src: 'img/grantsdotfun_icon.png',
73 | },
74 | items: [
75 | {
76 | type: 'docSidebar',
77 | sidebarId: 'tutorialSidebar',
78 | position: 'left',
79 | label: 'Tutorial',
80 | },
81 | {
82 | href: 'https://grants.fun',
83 | label: 'Website',
84 | position: 'right',
85 | },
86 | {
87 | href: 'https://x.com/potlock_',
88 | label: 'X',
89 | position: 'right',
90 | },
91 | {
92 | href: 'https://github.com/potlock/grantsdotfun',
93 | label: 'GitHub',
94 | position: 'right',
95 | },
96 | ],
97 | },
98 | footer: {
99 | style: 'dark',
100 | links: [
101 | {
102 | title: '📚 Docs',
103 | items: [
104 | {
105 | label: '🚀 Tutorial',
106 | to: '/docs/intro',
107 | },
108 | ],
109 | },
110 | {
111 | title: '🌐 Community',
112 | items: [
113 | {
114 | label: '💬 Telegram',
115 | href: 'https://t.me/grantsdotfun',
116 | },
117 | {
118 | label: '🐦 Twitter',
119 | href: 'https://twitter.com/grantsdotfun',
120 | },
121 | ],
122 | },
123 | {
124 | title: '🛠️ Products',
125 | items: [
126 | {
127 | label: '🔒 POTLOCK',
128 | href: 'https://potlock.org',
129 | },
130 | {
131 | label: '🤖 AI-PGF',
132 | href: 'https://aipgf.com',
133 | },
134 | ],
135 | },
136 | ],
137 | copyright: `Built with ❤️ POTLOCK`,
138 | },
139 | prism: {
140 | theme: prismThemes.github,
141 | darkTheme: prismThemes.dracula,
142 | },
143 | } satisfies Preset.ThemeConfig,
144 | };
145 |
146 | export default config;
147 |
--------------------------------------------------------------------------------
/docs/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PotLock/grantsdotfun/973bd1b4d35bae406c0fa8c94128dd7e7d32420d/docs/favicon.ico
--------------------------------------------------------------------------------
/docs/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "refer-docs",
3 | "version": "0.0.0",
4 | "private": true,
5 | "scripts": {
6 | "docusaurus": "docusaurus",
7 | "start": "docusaurus start",
8 | "build": "docusaurus build",
9 | "swizzle": "docusaurus swizzle",
10 | "deploy": "docusaurus deploy",
11 | "clear": "docusaurus clear",
12 | "serve": "docusaurus serve",
13 | "write-translations": "docusaurus write-translations",
14 | "write-heading-ids": "docusaurus write-heading-ids",
15 | "typecheck": "tsc"
16 | },
17 | "dependencies": {
18 | "@docusaurus/core": "3.5.2",
19 | "@docusaurus/preset-classic": "3.5.2",
20 | "@mdx-js/react": "^3.0.0",
21 | "clsx": "^2.0.0",
22 | "prism-react-renderer": "^2.3.0",
23 | "react": "^18.0.0",
24 | "react-dom": "^18.0.0"
25 | },
26 | "devDependencies": {
27 | "@docusaurus/module-type-aliases": "3.5.2",
28 | "@docusaurus/tsconfig": "3.5.2",
29 | "@docusaurus/types": "3.5.2",
30 | "typescript": "~5.5.2"
31 | },
32 | "browserslist": {
33 | "production": [
34 | ">0.5%",
35 | "not dead",
36 | "not op_mini all"
37 | ],
38 | "development": [
39 | "last 3 chrome version",
40 | "last 3 firefox version",
41 | "last 5 safari version"
42 | ]
43 | },
44 | "engines": {
45 | "node": ">=18.0"
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/docs/sidebars.ts:
--------------------------------------------------------------------------------
1 | import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';
2 |
3 | /**
4 | * Creating a sidebar enables you to:
5 | - create an ordered group of docs
6 | - render a sidebar for each doc of that group
7 | - provide next/previous navigation
8 |
9 | The sidebars can be generated from the filesystem, or explicitly defined here.
10 |
11 | Create as many sidebars as you want.
12 | */
13 | const sidebars: SidebarsConfig = {
14 | // By default, Docusaurus generates a sidebar from the docs folder structure
15 | tutorialSidebar: [{type: 'autogenerated', dirName: '.'}],
16 |
17 | // But you can create a sidebar manually
18 | /*
19 | tutorialSidebar: [
20 | 'intro',
21 | 'hello',
22 | {
23 | type: 'category',
24 | label: 'Tutorial',
25 | items: ['user-guides/create-a-document'],
26 | },
27 | ],
28 | */
29 | };
30 |
31 | export default sidebars;
32 |
--------------------------------------------------------------------------------
/docs/src/components/HomepageFeatures/index.tsx:
--------------------------------------------------------------------------------
1 | import clsx from 'clsx';
2 | import Heading from '@theme/Heading';
3 | import styles from './styles.module.css';
4 |
5 | type FeatureItem = {
6 | title: string;
7 | emoji: string;
8 | description: JSX.Element;
9 | };
10 |
11 | const FeatureList: FeatureItem[] = [
12 | {
13 | title: 'Deploy Agents',
14 | emoji: '🤖',
15 | description: (
16 | <>
17 | Create a grant operator agent with a single click with type of projects and appropriate filter for program.
18 | >
19 | ),
20 | },
21 | {
22 | title: 'Set Reviewers',
23 | emoji: '👥',
24 | description: (
25 | <>
26 | Set reviewers that can evaluate a projects effectiveness via comments on twitter.
27 | >
28 | ),
29 | },
30 | {
31 | title: 'Easy Onboarding From Twitter',
32 | emoji: '🐦',
33 | description: (
34 | <>
35 | Use twitter social graph and other socials to accept grantees and then onboard them to claim payouts via Twitter-Auth claim links.
36 | >
37 | ),
38 | },
39 | {
40 | title: 'On-Chain Payouts',
41 | emoji: '💸',
42 | description: (
43 | <>
44 | Integrated into on-chain actions for payouts and multichain token support.
45 | >
46 | ),
47 | },
48 | {
49 | title: 'Replenish Agent Wallet',
50 | emoji: '🏦',
51 | description: (
52 | <>
53 | Top up payouts from treasury for weekly payouts automation
54 | >
55 | ),
56 | },
57 | {
58 | title: 'Token Integration',
59 | emoji: '🪙',
60 | description: (
61 | <>
62 | Directly buy grant operator agent tokens.
63 | >
64 | ),
65 | },
66 | {
67 | title: 'See How Much Capital is Deployed',
68 | emoji: '📊',
69 | description: (
70 | <>
71 | Easily see how much capital has been deployed trhough grant operators
72 | >
73 | ),
74 | },
75 | {
76 | title: 'Open Source MIT License',
77 | emoji: '📖',
78 | description: (
79 | <>
80 | Built on the Eliza framework, we believe in open source and have completely open soruced our front ends.
81 | >
82 | ),
83 | },
84 | ];
85 |
86 | function Feature({title, emoji, description}: FeatureItem) {
87 | return (
88 |
89 |
90 |
91 | {emoji}
92 |
93 |
94 |
95 |
{title}
96 |
{description}
97 |
98 |
99 | );
100 | }
101 |
102 | export default function HomepageFeatures(): JSX.Element {
103 | return (
104 |
105 |
106 |
107 | {FeatureList.map((props, idx) => (
108 |
109 | ))}
110 |
111 |
112 |
113 | );
114 | }
115 |
--------------------------------------------------------------------------------
/docs/src/components/HomepageFeatures/styles.module.css:
--------------------------------------------------------------------------------
1 | .features {
2 | display: flex;
3 | align-items: center;
4 | padding: 2rem 0;
5 | width: 100%;
6 | }
7 |
8 | .featureSvg {
9 | height: 200px;
10 | width: 200px;
11 | }
12 |
13 | .featureEmoji {
14 | font-size: 3rem;
15 | display: block;
16 | margin-bottom: 1rem;
17 | }
18 |
--------------------------------------------------------------------------------
/docs/src/css/custom.css:
--------------------------------------------------------------------------------
1 | /**
2 | * Any CSS included here will be global. The classic template
3 | * bundles Infima by default. Infima is a CSS framework designed to
4 | * work well for content-centric websites.
5 | */
6 |
7 | /* You can override the default Infima variables here. */
8 | :root {
9 | --ifm-color-primary: #007bcd;
10 | --ifm-color-primary-dark: #006fb9;
11 | --ifm-color-primary-darker: #0068ae;
12 | --ifm-color-primary-darkest: #005590;
13 | --ifm-color-primary-light: #0087e1;
14 | --ifm-color-primary-lighter: #008eec;
15 | --ifm-color-primary-lightest: #0ca0ff;
16 | --ifm-code-font-size: 95%;
17 | --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
18 | }
19 |
20 | /* For readability concerns, you should choose a lighter palette in dark mode. */
21 | [data-theme='dark'] {
22 | --ifm-color-primary: #0ca0ff;
23 | --ifm-color-primary-dark: #0091f0;
24 | --ifm-color-primary-darker: #0089e3;
25 | --ifm-color-primary-darkest: #0071bb;
26 | --ifm-color-primary-light: #26aaff;
27 | --ifm-color-primary-lighter: #33afff;
28 | --ifm-color-primary-lightest: #5cbfff;
29 | --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
30 | }
31 |
--------------------------------------------------------------------------------
/docs/src/pages/index.module.css:
--------------------------------------------------------------------------------
1 | /**
2 | * CSS files with the .module.css suffix will be treated as CSS modules
3 | * and scoped locally.
4 | hsl(var(--primary))
5 | */
6 |
7 | .heroBanner {
8 | padding: 4rem 0;
9 | text-align: center;
10 | position: relative;
11 | overflow: hidden;
12 | background-color: white;
13 | color: var(--ifm-color-primary-darkest);
14 | }
15 |
16 | @media screen and (max-width: 996px) {
17 | .heroBanner {
18 | padding: 2rem;
19 | }
20 | }
21 |
22 | .buttons {
23 | display: flex;
24 | align-items: center;
25 | justify-content: center;
26 | gap: 1rem;
27 | }
28 |
29 | .heroTitle {
30 | font-size: 3rem;
31 | font-weight: 700;
32 | }
33 |
34 | .heroSubtitle {
35 | font-size: 1.5rem;
36 | margin-bottom: 2rem;
37 | }
38 |
39 |
--------------------------------------------------------------------------------
/docs/src/pages/index.tsx:
--------------------------------------------------------------------------------
1 | import clsx from 'clsx';
2 | import Link from '@docusaurus/Link';
3 | import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
4 | import Layout from '@theme/Layout';
5 | import HomepageFeatures from '@site/src/components/HomepageFeatures';
6 | import Heading from '@theme/Heading';
7 | import Head from '@docusaurus/Head';
8 |
9 | import styles from './index.module.css';
10 |
11 | function HomepageHeader() {
12 | const {siteConfig} = useDocusaurusContext();
13 | return (
14 |
34 | );
35 | }
36 |
37 | export default function Home(): JSX.Element {
38 | const {siteConfig} = useDocusaurusContext();
39 | return (
40 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | );
59 | }
60 |
--------------------------------------------------------------------------------
/docs/src/pages/markdown-page.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Markdown page example
3 | ---
4 |
5 | # Markdown page example
6 |
7 | You don't need React to write simple standalone pages.
8 |
--------------------------------------------------------------------------------
/docs/static/.nojekyll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PotLock/grantsdotfun/973bd1b4d35bae406c0fa8c94128dd7e7d32420d/docs/static/.nojekyll
--------------------------------------------------------------------------------
/docs/static/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PotLock/grantsdotfun/973bd1b4d35bae406c0fa8c94128dd7e7d32420d/docs/static/favicon.ico
--------------------------------------------------------------------------------
/docs/static/img/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PotLock/grantsdotfun/973bd1b4d35bae406c0fa8c94128dd7e7d32420d/docs/static/img/apple-touch-icon.png
--------------------------------------------------------------------------------
/docs/static/img/docs-api.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PotLock/grantsdotfun/973bd1b4d35bae406c0fa8c94128dd7e7d32420d/docs/static/img/docs-api.png
--------------------------------------------------------------------------------
/docs/static/img/docs-boilerplate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PotLock/grantsdotfun/973bd1b4d35bae406c0fa8c94128dd7e7d32420d/docs/static/img/docs-boilerplate.png
--------------------------------------------------------------------------------
/docs/static/img/docs-graphql.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PotLock/grantsdotfun/973bd1b4d35bae406c0fa8c94128dd7e7d32420d/docs/static/img/docs-graphql.png
--------------------------------------------------------------------------------
/docs/static/img/docs-mlm.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PotLock/grantsdotfun/973bd1b4d35bae406c0fa8c94128dd7e7d32420d/docs/static/img/docs-mlm.png
--------------------------------------------------------------------------------
/docs/static/img/docs-puzzle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PotLock/grantsdotfun/973bd1b4d35bae406c0fa8c94128dd7e7d32420d/docs/static/img/docs-puzzle.png
--------------------------------------------------------------------------------
/docs/static/img/docs-security.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PotLock/grantsdotfun/973bd1b4d35bae406c0fa8c94128dd7e7d32420d/docs/static/img/docs-security.png
--------------------------------------------------------------------------------
/docs/static/img/docs-stakeslash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PotLock/grantsdotfun/973bd1b4d35bae406c0fa8c94128dd7e7d32420d/docs/static/img/docs-stakeslash.png
--------------------------------------------------------------------------------
/docs/static/img/docs-toolbox.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PotLock/grantsdotfun/973bd1b4d35bae406c0fa8c94128dd7e7d32420d/docs/static/img/docs-toolbox.png
--------------------------------------------------------------------------------
/docs/static/img/docs-tracking.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PotLock/grantsdotfun/973bd1b4d35bae406c0fa8c94128dd7e7d32420d/docs/static/img/docs-tracking.png
--------------------------------------------------------------------------------
/docs/static/img/docusaurus-social-card.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PotLock/grantsdotfun/973bd1b4d35bae406c0fa8c94128dd7e7d32420d/docs/static/img/docusaurus-social-card.jpg
--------------------------------------------------------------------------------
/docs/static/img/docusaurus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PotLock/grantsdotfun/973bd1b4d35bae406c0fa8c94128dd7e7d32420d/docs/static/img/docusaurus.png
--------------------------------------------------------------------------------
/docs/static/img/favicon-48x48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PotLock/grantsdotfun/973bd1b4d35bae406c0fa8c94128dd7e7d32420d/docs/static/img/favicon-48x48.png
--------------------------------------------------------------------------------
/docs/static/img/favicon-96x96.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PotLock/grantsdotfun/973bd1b4d35bae406c0fa8c94128dd7e7d32420d/docs/static/img/favicon-96x96.png
--------------------------------------------------------------------------------
/docs/static/img/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PotLock/grantsdotfun/973bd1b4d35bae406c0fa8c94128dd7e7d32420d/docs/static/img/favicon.ico
--------------------------------------------------------------------------------
/docs/static/img/grantsdotfun_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PotLock/grantsdotfun/973bd1b4d35bae406c0fa8c94128dd7e7d32420d/docs/static/img/grantsdotfun_icon.png
--------------------------------------------------------------------------------
/docs/static/img/logo.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/docs/static/img/meta.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PotLock/grantsdotfun/973bd1b4d35bae406c0fa8c94128dd7e7d32420d/docs/static/img/meta.png
--------------------------------------------------------------------------------
/docs/static/img/refer-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PotLock/grantsdotfun/973bd1b4d35bae406c0fa8c94128dd7e7d32420d/docs/static/img/refer-logo.png
--------------------------------------------------------------------------------
/docs/static/img/site.webmanifest:
--------------------------------------------------------------------------------
1 | {
2 | "name": "MyWebSite",
3 | "short_name": "MySite",
4 | "icons": [
5 | {
6 | "src": "/web-app-manifest-192x192.png",
7 | "sizes": "192x192",
8 | "type": "image/png",
9 | "purpose": "maskable"
10 | },
11 | {
12 | "src": "/web-app-manifest-512x512.png",
13 | "sizes": "512x512",
14 | "type": "image/png",
15 | "purpose": "maskable"
16 | }
17 | ],
18 | "theme_color": "#ffffff",
19 | "background_color": "#ffffff",
20 | "display": "standalone"
21 | }
--------------------------------------------------------------------------------
/docs/static/img/web-app-manifest-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PotLock/grantsdotfun/973bd1b4d35bae406c0fa8c94128dd7e7d32420d/docs/static/img/web-app-manifest-192x192.png
--------------------------------------------------------------------------------
/docs/static/img/web-app-manifest-512x512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PotLock/grantsdotfun/973bd1b4d35bae406c0fa8c94128dd7e7d32420d/docs/static/img/web-app-manifest-512x512.png
--------------------------------------------------------------------------------
/docs/static/site.webmanifest:
--------------------------------------------------------------------------------
1 | {
2 | "name": "MyWebSite",
3 | "short_name": "MySite",
4 | "icons": [
5 | {
6 | "src": "/web-app-manifest-192x192.png",
7 | "sizes": "192x192",
8 | "type": "image/png",
9 | "purpose": "maskable"
10 | },
11 | {
12 | "src": "/web-app-manifest-512x512.png",
13 | "sizes": "512x512",
14 | "type": "image/png",
15 | "purpose": "maskable"
16 | }
17 | ],
18 | "theme_color": "#ffffff",
19 | "background_color": "#ffffff",
20 | "display": "standalone"
21 | }
--------------------------------------------------------------------------------
/docs/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | // This file is not used in compilation. It is here just for a nice editor experience.
3 | "extends": "@docusaurus/tsconfig",
4 | "compilerOptions": {
5 | "baseUrl": "."
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/landing-page/.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 |
--------------------------------------------------------------------------------
/landing-page/README.md:
--------------------------------------------------------------------------------
1 | # 🎮 GRANTS.FUN Landing Page
2 |
3 | Welcome to the GRANTS.FUN landing page repository! This is the official website for GRANTS.FUN, a platform that enables the deployment of AI grant operators with integrated token and social features.
4 |
5 | ## ✨ Features
6 |
7 | - 🎨 Modern, responsive design
8 | - ⌨️ Animated typing effect
9 | - 🔍 SEO optimized
10 | - 🌐 Social media integration
11 | - 📚 Documentation links
12 |
13 | ## 🛠️ Tech Stack
14 |
15 | - ⚡ Next.js
16 | - ⚛️ React
17 | - 📝 TypeScript
18 | - 🎨 Tailwind CSS
19 | - ⚡ React Type Animation
20 |
21 | ## 🚀 Getting Started
22 |
23 | 1. Clone the repository:
24 | ```bash
25 | git clone https://github.com/potlock/grantsdotfun.git
26 |
27 | ```
28 |
29 | ```bash
30 | # Install dependencies
31 | npm install
32 | # or
33 | yarn install
34 |
35 | # Run development server
36 | npm run dev
37 | # or
38 | yarn dev
39 | ```
40 |
41 | 2. Open [http://localhost:3000](http://localhost:3000) in your browser.
42 |
43 | ## 📝 Environment Variables
44 |
45 | Create a `.env.local` file in the root directory and add any required environment variables.
46 |
47 | ## 🤝 Contributing
48 |
49 | Contributions are welcome! Please feel free to submit a Pull Request.
50 |
51 | ## 📄 License
52 |
53 | This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
54 |
55 | ## 🔗 Links
56 |
57 | - [Website](https://grants.fun)
58 | - [Documentation](https://docs.grants.fun)
59 | - [Twitter](https://twitter.com/grantsdotfun)
60 | - [GitHub](https://github.com/potlock/grantsdotfun)
61 |
62 | ## 🏗 Built by Potlock Protocol
63 |
64 | GRANTS.FUN is built and maintained by [Potlock Protocol](https://potlock.org).
65 |
66 |
--------------------------------------------------------------------------------
/landing-page/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "grants-fun-landing",
3 | "version": "0.1.0",
4 | "private": true,
5 | "scripts": {
6 | "dev": "next dev",
7 | "build": "next build",
8 | "start": "next start",
9 | "lint": "next lint"
10 | },
11 | "dependencies": {
12 | "autoprefixer": "^10.4.20",
13 | "next": "14.1.0",
14 | "postcss": "^8.4.49",
15 | "react": "^18.2.0",
16 | "react-dom": "^18.2.0",
17 | "react-type-animation": "^3.2.0",
18 | "tailwindcss": "^3.4.16"
19 | },
20 | "devDependencies": {
21 | "@types/node": "^20.11.19",
22 | "@types/react": "^18.2.57",
23 | "@types/react-dom": "^18.2.19",
24 | "eslint": "^8.56.0",
25 | "eslint-config-next": "14.1.0",
26 | "typescript": "^5.3.3"
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/landing-page/pages/_app.tsx:
--------------------------------------------------------------------------------
1 | import '../styles/globals.css'
2 | import type { AppProps } from 'next/app'
3 |
4 | function MyApp({ Component, pageProps }: AppProps) {
5 | return
6 | }
7 |
8 | export default MyApp
9 |
--------------------------------------------------------------------------------
/landing-page/postcss.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | plugins: {
3 | tailwindcss: {},
4 | autoprefixer: {},
5 | },
6 | }
--------------------------------------------------------------------------------
/landing-page/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/PotLock/grantsdotfun/973bd1b4d35bae406c0fa8c94128dd7e7d32420d/landing-page/public/favicon.ico
--------------------------------------------------------------------------------
/landing-page/styles/globals.css:
--------------------------------------------------------------------------------
1 | @tailwind base;
2 | @tailwind components;
3 | @tailwind utilities;
4 |
5 | @layer components {
6 | .btn {
7 | @apply px-8 py-3 text-base font-mono text-white bg-blue-600 rounded-lg hover:bg-blue-700 transition-colors tracking-wide;
8 | }
9 | }
10 |
11 | @layer utilities {
12 | .delay-150 {
13 | animation-delay: 150ms;
14 | }
15 | .delay-300 {
16 | animation-delay: 300ms;
17 | }
18 | }
19 |
20 | @keyframes spin {
21 | 0% {
22 | transform: translateY(-20px);
23 | opacity: 0;
24 | }
25 | 100% {
26 | transform: translateY(0);
27 | opacity: 1;
28 | }
29 | }
30 |
31 | #emojis span {
32 | display: inline-block;
33 | animation: spin 0.1s ease-out;
34 | }
--------------------------------------------------------------------------------
/landing-page/tailwind.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('tailwindcss').Config} */
2 | module.exports = {
3 | content: [
4 | "./app/**/*.{js,ts,jsx,tsx,mdx}",
5 | "./pages/**/*.{js,ts,jsx,tsx,mdx}",
6 | "./components/**/*.{js,ts,jsx,tsx,mdx}",
7 | ],
8 | theme: {
9 | extend: {},
10 | },
11 | plugins: [],
12 | }
--------------------------------------------------------------------------------
/landing-page/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "lib": ["dom", "dom.iterable", "esnext"],
5 | "allowJs": true,
6 | "skipLibCheck": true,
7 | "strict": true,
8 | "noEmit": true,
9 | "esModuleInterop": true,
10 | "module": "esnext",
11 | "moduleResolution": "bundler",
12 | "resolveJsonModule": true,
13 | "isolatedModules": true,
14 | "jsx": "preserve",
15 | "incremental": true,
16 | "plugins": [
17 | {
18 | "name": "next"
19 | }
20 | ],
21 | "paths": {
22 | "@/*": ["./*"]
23 | }
24 | },
25 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
26 | "exclude": ["node_modules"]
27 | }
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "next": "latest",
4 | "react": "latest",
5 | "react-dom": "latest",
6 | "react-type-animation": "^3.2.0",
7 | "tailwindcss": "^3.4.0"
8 | }
9 | }
--------------------------------------------------------------------------------
/tailwind.config.js:
--------------------------------------------------------------------------------
1 | /** @type {import('tailwindcss').Config} */
2 | module.exports = {
3 | content: [
4 | './pages/**/*.{js,ts,jsx,tsx}',
5 | './components/**/*.{js,ts,jsx,tsx}',
6 | ],
7 | theme: {
8 | extend: {},
9 | },
10 | plugins: [],
11 | }
--------------------------------------------------------------------------------