diff --git a/frontend/src/components/Documentation.jsx b/frontend/src/components/Documentation.jsx new file mode 100644 index 0000000..73cd56f --- /dev/null +++ b/frontend/src/components/Documentation.jsx @@ -0,0 +1,309 @@ +import React, { useState } from "react"; +import { + BookOpen, + Code, + Coins, + MessagesSquare, + Wallet, + ArrowRight, + Github, + Terminal, + Globe, +} from "lucide-react"; + +const Documentation = () => { + const [activeSection, setActiveSection] = useState("overview"); + + const sections = { + overview: { + title: "Project Overview", + content: ( +
+

+ IntentAI is a decentralised chatbot application that offers a + next-generation AI assistant that combines advanced conversational + abilities with powerful tools for quant trading, providing users + with intelligent, real-time responses, personalized insights, and + strategies, available 24/7 to enhance productivity, trading, and + decision-making. +

+

+
+
+
+ +

Chatbot Interface

+
+

+ Natural language processing interface for user interactions +

+
+ +
+
+ +

Smart Contracts

+
+

+ Solidity contracts for DeFi protocol interactions. +

+
+ +
+
+ +

Quant Trading

+
+

+ Trading using advance Quantitative algorithms. +

+
+
+
+ ), + }, + + architecture: { + title: "System Architecture", + content: ( +
+

Component Structure

+ +
+
+

Frontend Components

+
    +
  • Trading Chat Interface (tradingchat.jsx)
  • +
  • Compound Integration (generalchat.jsx)
  • +
  • Documentation Page (documentation.jsx)
  • +
  • Shared UI Components (Spline components)
  • +
+
+ +
+

Smart Contracts

+
    +
  • + CompoundIntents.sol - Main contract for Compound interactions +
  • +
  • CompoundETHManager2.sol - ETH management logic
  • +
  • Trading contract integrations
  • +
+
+ +
+

Backend Services

+
    +
  • Intent Processing API
  • +
  • Web3 Integration Services
  • +
  • Natural Language Processing Pipeline
  • +
+
+
+
+ ), + }, + + smartContracts: { + title: "Smart Contracts", + content: ( +
+
+

CompoundIntents Contract

+

+ Main contract for processing user intents and interacting with + Compound protocol. +

+ +

Key Functions:

+ +
+ +
+

Contract Addresses

+
+

+ cETH Address (Mainnet): + 0x4Ddc2D193948926D02f9B1fE9e1daa0718270ED5 +

+

+ cETH Address (Goerli): + 0x64078a6189Bf45f80091c6Ff2fCEe1B15Ac8dbde +

+
+
+
+ ), + }, + + usage: { + title: "Usage Guide", + content: ( +
+
+

Compound Interactions

+

+ Example commands for Compound protocol interactions: +

+ +
+
+ deposit 0.1 ETH - Deposit ETH into Compound +
+
+ withdraw 0.05 ETH - Withdraw ETH from Compound +
+
+
+ +
+

Trading Commands

+

Example commands for trading:

+ +
+
+ swap 0.1 WETH to DAI +
+
+ trade ETH for DAI +
+
+
+
+ ), + }, + + setup: { + title: "Setup Guide", + content: ( +
+
+

Prerequisites

+ +
+ +
+

Installation Steps

+
+
+ + git clone https://github.com/foundryUp/AI-Quant-Trader + +
+
+

Frontend setup

+
+
+ cd ./frontend/ +
+
+ npm i +
+
+ npm run dev +
+
+
+ +
+

Fork the anvil chain locally using the RPC URL

+
+
+ anvil --fork-url https://eth-mainnet.g.alchemy.com/v2/KywLaq2zlVzePOhip0BY3U8ztfHkYDmo +
+
+
+ +
+

Deploy smart contracts IntentEngineTrade.sol

+
+
+ forge script script/DeployTradeIntent.sol:DeployTradeIntent --rpc-url http://127.0.0.1:8545 --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 --broadcast + +
+
+
+
+
+
+ ), + }, + }; + + return ( +
+
+ +
+ {/* Header */} +
+

+ + IntentAI Documentation + +

+

+ Complete documentation for the IntentAI project, including + architecture, smart contracts, and usage guides. +

+
+ + {/* Navigation */} +
+ {Object.entries(sections).map(([key, section]) => ( + + ))} +
+ + {/* Content */} +
+

+ {sections[activeSection].title} +

+ {sections[activeSection].content} +
+ + {/* Footer */} +
+
+ + + GitHub + + + + Website + +
+
+
+
+ ); +}; + +export default Documentation; diff --git a/frontend/src/components/Footer.jsx b/frontend/src/components/Footer.jsx index 6a850b8..a3b3b9d 100644 --- a/frontend/src/components/Footer.jsx +++ b/frontend/src/components/Footer.jsx @@ -1,23 +1,63 @@ -import React from 'react'; +import React from "react"; +import { Link, useNavigate } from "react-router-dom"; +import Documentation from './Documentation'; function Footer() { + const navigate = useNavigate(); + return ( -