Jecta is a Next.js-based AI Copilot application that integrates with Injective Blockchain and uses Supabase for data storage. This application allows users to interact with an AI Copilot that can perform various blockchain-related tasks like checking balances, staking, swapping tokens, and more.
- AI-powered Copilot interface
- Blockchain wallet integration (Leap, Keplr)
- User authentication via wallet signatures
- Chat history storage and retrieval
- Token balance checking
- Validator staking functionality
- Unstaking functionality
- DefiLlama integration for TVL informations of the ecosystem
- Token swapping capabilities
- Token sending functionality
- Portfolio management
- Portfolio analysis
- Transaction search & AI-powered analysis
- Search latest Injective news with Venice API
- Token analysis using Sonia
- Injective burn auction tools (get & place bid auction)
- Frontend: Next.js 15, React 18, TypeScript, Tailwind CSS, Shadcn UI
- Backend: Next.js API Routes
- Database: PostgreSQL via Supabase
- Authentication: JWT with wallet signature verification
- Blockchain Integration: Injective Typescript SDK, Cosmos SDK
- AI Integration: OpenRouter API
- Node.js 18+ and npm/yarn/pnpm
- Supabase account
- OpenRouter API key (for AI functionality)
- Basic knowledge of blockchain concepts
git clone https://github.com/Jecta-ai/jecta-app
cd jecta-app
npm install
# or
yarn install
# or
pnpm install
Copy the .env.example
file to .env.local
and fill in the required values:
cp .env.example .env.local
Required environment variables:
NEXT_PUBLIC_SUPABASE_URL
: Your Supabase project URLNEXT_PUBLIC_SUPABASE_ANON_KEY
: Your Supabase anonymous keySUPABASE_JWT_SECRET
: Secret key for JWT token generationOPENROUTER_API_KEY
: API key for OpenRouterOPENROUTER_BASE_URL
: Base URL for OpenRouter APIMODEL
: AI model to useBEARER_TOKEN
: Bearer token for API authenticationMAX_POSTS
: Maximum number of posts to retrieve
You need to set up the following tables in your Supabase PostgreSQL database:
CREATE TABLE users (
id UUID PRIMARY KEY,
wallet_address TEXT UNIQUE NOT NULL,
nonce UUID
);
CREATE TABLE chats (
id UUID PRIMARY KEY,
ai_id UUID,
user_id UUID REFERENCES users(id),
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
title TEXT
);
CREATE TABLE messages (
id UUID PRIMARY KEY,
chat_id UUID REFERENCES chats(id),
sender_id UUID REFERENCES users(id),
message JSONB NOT NULL,
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
npm run dev
# or
yarn dev
# or
pnpm dev
Open http://localhost:3000 with your browser to see the application.
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out the Next.js deployment documentation for more details.
/app
: Main application code/api
: API routes for backend functionality/components
: React components/providers
: Context providers/services
: Service functions for API calls
/lib
: Utility libraries/public
: Static assets/ai
: AI-related functionality/wallet
: Wallet integration code
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0).
This means you are free to:
- Share — copy and redistribute the material in any medium or format
- Adapt — remix, transform, and build upon the material
Under the following terms:
- Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made.
- NonCommercial — You may not use the material for commercial purposes.
See the LICENSE file for more details.