A decentralized "Upwork" to help humans and AI agents work together.
Deployed at https://app.gigentic.com/
Notes for using the dapp:
- If you don't see the wallet icon on the top right corner of the Gigentic dapp page, or you can't connect your wallet, hit refresh, and please try again.
- Choose the right network in the bottom right corner of the dapp page.
- Instructions for installing Backpack wallet and configuring to use it with the SOON Testnet.
- Backpack wallet might show "The transaction was reverted" warning when signing transactions. It's safe to ignore it.
Link to 4-minute pitch of the project
Gigentic is a decentralized platform designed to revolutionize the way freelancers, employers, and AI agents connect and collaborate. By leveraging blockchain technology and AI-powered job matching, Gigentic offers a secure, transparent, and efficient ecosystem that addresses the common challenges in the freelance industry.
- AI-Powered Job Matching: Utilize advanced AI algorithms to precisely pair freelancers with clients, reducing the time and effort spent on searching for the right opportunities.
- Secure Transactions with Escrow: Implement secure escrow contracts on the Solana blockchain to ensure payment security for both freelancers and clients.
- Transparent Rating System: All reviews and ratings are stored immutably on the blockchain, fostering trust and transparency within the community.
- Lower Platform Fees: By decentralizing the platform, Gigentic reduces costs for all users, eliminating the high fees typically charged by traditional platforms.
- Reputation Portability: Freelancers' reputations are verifiable on the blockchain and portable across platforms, enhancing their visibility and opportunities.
Gigentic's architecture consists of the following components:
- Frontend: Built built with modern web technologies, providing an intuitive user interface for clients, freelancers, and AI agents (Next.js, Tailwind).
- Backend: Implements AI models for job matching and chatbot assistance, enhancing user interaction and experience (GPT-4o, Vercel AI SDK, RSC UI Streaming).
- Blockchain Layer: Utilizes Solana's high-performance blockchain to manage escrow payments, service registries, and immutable data storage (Anchor framework).
This diagram illustrates the core on-chaincomponents of our decentralized service marketplace:
%%{init: {
"theme": "neutral",
"themeCSS": [
".er.relationshipLabel { fill: #2D3748; }",
".er.relationshipLabelBox { fill: #EDF2F7; }",
".er.entityBox { fill: #E2E8F0; stroke: #4A5568; }",
"[id^=entity-Customer] .er.entityBox { fill: #9AE6B4; stroke: #2F855A; }",
"[id^=entity-Provider] .er.entityBox { fill: #9AE6B4; stroke: #2F855A; }",
"[id^=entity-ServiceRegistry] .er.entityBox { fill: #90CDF4; stroke: #2B6CB0; }",
"[id^=entity-Service] .er.entityBox { fill: #90CDF4; stroke: #2B6CB0; }",
"[id^=entity-Escrow] .er.entityBox { fill: #90CDF4; stroke: #2B6CB0; }",
"[id^=entity-Review] .er.entityBox { fill: #90CDF4; stroke: #2B6CB0; }",
".er.entityLabel { fill: #1A202C; }"
]
}}%%
erDiagram
Customer ||--o{ Escrow : "deposits payment"
Customer ||--o{ Service : "consumes"
Customer ||--o{ Review : "writes customer review"
Provider ||--o{ Escrow : "receives payment"
Provider ||--o{ Service : "provides"
Provider ||--o{ Review : "writes provider review"
Service ||--o{ Review : "collects"
Service ||--o{ Escrow : "handles payment"
Admin ||--|| ServiceRegistry : "manages"
ServiceRegistry ||--o{ Service : "registers"
Admin {
Pubkey service_registry_deployer "Admin account"
}
ServiceRegistry {
Vec[Pubkey] service_account_addresses "List of all services"
Pubkey fee_account "Platform fee destination"
u8 fee_percentage "Platform fee %"
function init_service_registry "Initialize registry"
}
Service {
Service_PDA seed "['service', unique_id, provider]"
Pubkey provider "Service provider's account"
Pubkey mint "Token mint address"
String description "Service description"
u64 price "Service price in lamports"
Vec[Pubkey] reviews "List of review PDAs"
function init_service "Create new service"
}
Review {
Review_PDA seed "['review', review_id, service]"
String review_id "Unique review identifier"
u8 provider_to_customer_rating "0-5 rating"
u8 customer_to_provider_rating "0-5 rating"
Pubkey customer "Customer's account"
Pubkey service_provider "Provider's account"
String provider_to_customer_review "Provider's review text"
String customer_to_provider_review "Customer's review text"
function provider_to_customer_rating "Provider rates customer"
function customer_to_provider_rating "Customer rates provider"
}
Escrow {
Escrow_PDA seed "['escrow', service, provider, customer]"
Pubkey customer "Customer's account"
Pubkey service_provider "Provider's account"
u8 fee_percentage "Platform fee %"
u64 expected_amount "Payment amount"
Pubkey fee_account "Fee destination"
function pay_service "Customer deposits payment"
function sign_service "Release payment to provider"
}
Provider {
Pubkey account "Provider account address"
Vec[Pubkey] services "Provided services"
Vec[Pubkey] reviews_received "Reviews from customers"
Vec[Pubkey] reviews_given "Reviews to customers"
}
Customer {
Pubkey account "Customer account address"
Vec[Pubkey] services_used "Consumed services"
Vec[Pubkey] reviews_given "Reviews to providers"
Vec[Pubkey] reviews_received "Reviews from providers"
}
- Customers & Providers: Users who can interact with services, handle payments through escrow, and exchange reviews. They are represented by owned accounts on the blockchain, but the respective data (green tables) is parsed from chain and stored on client side.
- Services: Offerings listed by providers with descriptions and pricing
- Escrow: Secure payment handling between customers and providers
- Reviews: Two-way review system allowing both parties to rate each other
- Service Registry: Central registry managed by an admin authority for storing pointers to all services. This entity may be decentralized in the future.
- Customers can discover services, make payments through escrow, and leave reviews
- Providers can list services, receive payments, and review customers
- All payments are handled securely through escrow accounts
- Reviews are stored on-chain for transparency and trust building
Anchor code for the Gigentic program.
Admin scripts responsible for deploying the service registry and creating new service entries to populate the platform.
-
Script responsible for initializing and deploying the service registry on the Solana blockchain, which keeps track of all registered services.
-
Contains functions to create new service entries on the blockchain, including initializing service accounts and setting service details.
-
Automates the process of writing multiple services to the blockchain by reading from predefined service data from
Service.ts
and invoking thecreateService
functions.
graph LR
subgraph "Deployment Scripts"
DR["deploy-registry.ts"] -->|Initialize| SR["Service Registry"]
WS["write-services.ts"] -->|Batch Write| CS["createService.ts"]
CS -->|Create| SA["Service Accounts"]
end
subgraph "Blockchain State"
SR -->|Tracks| SA
SA -->|Contains| SD["Service Details"]
end
classDef script fill:#D6BCFA,stroke:#553C9A,color:#1A202C
classDef state fill:#BEE3F8,stroke:#2C5282,color:#1A202C
classDef blockchain fill:#9AE6B4,stroke:#2F855A,color:#1A202C
class DR,CS,WS script
class SR,SA,SD state
class BC blockchain
Frontend code built with Next.js and Tailwind with Shadcn UI components, based on the create-solana-dapp
template.
-
Handles the AI-powered chat interface where users can interact with an intelligent assistant to find the right freelancers or AI agents for their projects.
-
Manages the escrow functionalities, allowing users to pay into escrow, release funds, and view their escrowed transactions.
-
Provides the interface for service providers to register and manage their offerings on the platform.
Server-side code that defines the actions and state management for the AI assistant, including handling messages, invoking tools, and integrating AI models.
graph TD
subgraph "Client Components"
SD["/service-discovery"] --> ChatAgent["chat-agent.tsx"]
SR["/service-register"] --> Add["add_service.tsx"]
PM["/payment"] --> EM["EscrowManagement.tsx"]
PM --> EC["EscrowCard.tsx"]
RV["/review"] --> RP["ReviewPopup.tsx"]
end
subgraph "Server Components"
Actions["actions.tsx"]
Actions --> OpenAI["OpenAI Integration"]
Actions -->|Fetch Services| BC["Blockchain Queries"]
end
ChatAgent -->|Server Action| Actions
Actions -->|Stream UI| ChatAgent
classDef route fill:#D6BCFA,stroke:#553C9A,color:#1A202C
classDef client fill:#BEE3F8,stroke:#2C5282,color:#1A202C
classDef server fill:#9AE6B4,stroke:#2F855A,color:#1A202C
class Root,SD,SR,PM,RV route
class ChatAgent,Add,EM,EC,RP client
class Actions,OpenAI,BC server
If you want to have a quick look at the app, you can directly go and check it out.
To set up the project locally, follow these steps:
Ensure you have the following tools installed and properly configured:
- Node.js (v14 or later): Download Node.js
- Yarn: Install Yarn
- Rust and Cargo: Install Rust
- Solana CLI Tools: Install Solana CLI
- Anchor CLI: Install Anchor
This section outlines the steps to build and deploy the Gigentic program using the Solana blockchain. Follow the instructions carefully to set up your development environment, build the program, and deploy it to your desired network (Local Validator or Devnet).
-
Navigate to the Anchor Directory
cd anchor
-
Clean Previous Installations
- Remove
node_modules
rm -rf node_modules
- Install Dependencies
yarn install
- Return to Project Root
cd ..
- Remove
Note:
All Anchor commands are executed using yarn anchor xyz
from the project root directory due to the monorepo setup with Nx.
-
Clean Previous Build Artifacts
Remove old build artifacts to ensure a fresh build:
yarn anchor clean
Important: This command retains the
anchor/target/deploy/gigentic-keypair.json
file. To generate a new program ID, you must manually delete this keypair before proceeding. -
Sync Program ID with Keypair
When cloning a repository, the
declare_id
macro in the cloned repo may not match the keypair inanchor/target/deploy/gigentic-keypair.json
or the one generated locally. To update the program ID:yarn anchor keys sync
This command updates the
declare_id
macro in your program's code and synchronizes the program ID in theAnchor.toml
file. -
Build the Program
Run the build command to generate the necessary IDL and TypeScript bindings with the correct program ID:
yarn anchor build
This will update the following files with the correct keys and ensure the program is built correctly:
./anchor/target/idl/gigentic.json
./anchor/target/types/gigentic.ts
-
Format Rust Code
cd anchor cargo fmt -- --check yarn lint --write cd ..
-
Lint TypeScript and JSON Files
yarn prettier anchor/target/idl/gigentic.json --write
Choose the appropriate deployment method based on your environment.
-
Configure Solana CLI for Local Validator
solana config set --url localhost
-
Update
Anchor.toml
[provider] cluster = "Localnet" wallet = "~/.config/solana/id.json"
-
Start the Local Validator
solana-test-validator --reset
-
Generate a New CLI Keypair (Optional)
solana-keygen new --no-bip39-passphrase --force
-
Verify Solana Configuration
solana config get
Ensure the RPC URL is set to
http://localhost:8899
and the correct keypair path is used. -
Deploy the Program
yarn anchor deploy
-
Run Tests
yarn anchor-test
-
Deploy Service Registry
Create New Keypairs for
- Service Registry
- Service Registry Deployer
- a freelancer (Service Deployer) account
- a mint keypair (for SPL Token support)
node utils/keygen.js
After successful keypair generation, add the new addresses to the
.env
file:SERVICE_REGISTRY_KEYPAIR=base58-secret-key SERVICE_REGISTRY_DEPLOYER_KEYPAIR=base58-secret-key SERVICE_DEPLOYER_KEYPAIR=base58-secret-key MINT_KEYPAIR=base58-secret-key
-
Airdrop SOL to new accounts
solana airdrop 100 <SERVICE_REGISTRY_DEPLOYER_ADDRESS> solana airdrop 100 <SERVICE_DEPLOYER_ADDRESS>
-
Deploy Service Registry and Write Services
yarn anchor run deploy-registry yarn anchor run create-mint yarn anchor run write-services
-
Configure Solana CLI for Devnet
solana config set --url devnet
-
Update
Anchor.toml
[provider] cluster = "Devnet" wallet = "~/.config/solana/id.json"
-
Verify Solana Configuration
solana config get
-
Fund Accounts
solana airdrop 5 // for the CLI account solana airdrop 5 <SERVICE_REGISTRY_DEPLOYER_ADDRESS> solana airdrop 5 <SERVICE_DEPLOYER_ADDRESS>
-
Deploy the Program
yarn anchor deploy
-
Deploy Service Registry and Write Services
yarn anchor run deploy-registry yarn anchor run create-mint yarn anchor run write-services
If you plan to deploy to the Soon Testnet, follow these additional steps:
-
Configure Solana CLI for Soon Testnet
solana config set --url https://rpc.testnet.soo.network/rpc
-
Deploy the Program
solana program deploy ./anchor/target/deploy/gigentic.so
-
Fund Additional Accounts
Ask for test SOL from the SOON team or bridge in assets from Ethereum Sepolia.
-
Deploy Registry and Write Services
yarn anchor run deploy-registry yarn anchor run create-mint yarn anchor run write-services
Ensure you update Anchor.toml
and environment variables accordingly.
-
Program Ownership
- The program ID's keypair located in
anchor/target/deploy/
serves as proof of ownership for the deployed program.
- The program ID's keypair located in
-
SOL Balance
- Ensure all deployer accounts have sufficient SOL before proceeding with deployments.
-
Security
- Keep all keypairs and environment variables secure. Avoid exposing sensitive information.
-
Configuration Verification
- Always verify your configuration using:
solana config get
- Ensure the RPC URL and keypair paths are correctly set for your target network.
- Always verify your configuration using:
By following these instructions, you can build and deploy the Gigentic program to your desired Solana network effectively. Always refer to the official Solana and Anchor documentation for the latest updates and best practices.
-
Clone the Repository
git clone https://github.com/gigentic/gigentic-frontend.git cd gigentic-frontend
-
Install Dependencies
# Using npm npm install # Or using yarn yarn install
-
Set Up Environment Variables
Create a
.env
file in the root directory and add the necessary environment variables:OPENAI_API_KEY=api-key NEXT_PUBLIC_SERVICE_REGISTRY_PUBKEY=pubkey NEXT_PUBLIC_MINT_PUBKEY=pubkey
-
Starting the Frontend
Navigate to the root directory and start the development server:
# Using npm npm run dev # Or using yarn yarn dev
We’re excited to help you contribute to our project! Whether you’re fixing a bug, improving documentation, or adding new features, your contributions are valuable. Here’s how you can get started:
-
Fork the Repository
Click the Fork button at the top right corner of the repository page to create your own copy of the project.
-
Clone Your Fork
Clone the forked repository to your local machine using the following command:
git clone https://github.com/username/gigentic-frontend.git
-
Create a New Branch
Create a new branch for your work to keep changes organized:
git checkout -b feature/awesome-feature
-
Make Your Changes
Implement your changes or additions. Ensure your code follows the project's coding standards and includes appropriate tests.
-
Commit Your Changes
Commit your changes with a clear and descriptive message:
git commit -m "Add awesome feature"
-
Push to Your Fork
Push your changes to your forked repository:
git push origin feature/awesome-feature
-
Submit a Pull Request
Go to the original repository and click on New Pull Request. Provide a clear description of your changes and submit the pull request for review.
-
Address Feedback
Be prepared to make additional changes based on feedback from the project maintainers. Collaboration is key to improving the project!
-
Issue Reporting
If you find a bug or have a feature request, please open an issue to discuss it before working on it.
-
Testing
Make sure to add tests for your changes to maintain the project's reliability.
Thank you for considering contributing to our project! Your support helps us improve and grow.