├── .github └── workflows │ └── main.yml ├── .gitignore ├── README.md ├── docs ├── architecture.mdx ├── assets │ ├── images │ │ ├── architecture.png │ │ ├── core_node_agent.jpg │ │ ├── core_node_browser.jpg │ │ ├── ecosystem.png │ │ ├── edge-node.png │ │ ├── lite-node.png │ │ ├── opi-token.jpg │ │ ├── optimai-intro.png │ │ └── services.png │ └── videos │ │ ├── lite-node-claim.mp4 │ │ ├── lite-node-mining.mp4 │ │ └── lite-node-referrals.mp4 ├── data-network.mdx ├── faqs.md ├── intro.md ├── litepaper.mdx ├── opi-token.md ├── optimai-agent.mdx ├── optimai-node │ ├── _category_.json │ ├── core-node.mdx │ ├── edge-node.mdx │ ├── how-node-working.mdx │ ├── lite-node.mdx │ ├── node-intro.md │ └── platforms-versions.md ├── overview │ ├── _category_.json │ ├── intro.md │ ├── problem.md │ └── solution.md ├── roadmap.md └── services.md ├── docusaurus.config.ts ├── package-lock.json ├── package.json ├── sidebars.ts ├── src ├── components │ └── ImageWithCaption.tsx ├── hooks │ ├── useIsomorphicLayoutEffect.ts │ └── useMediaQuery.ts ├── pages │ ├── index.module.css │ ├── index.tsx │ └── markdown-page.md ├── styles │ ├── admonition.scss │ ├── breadcrumb.scss │ ├── common │ │ ├── color.scss │ │ ├── index.scss │ │ └── media.scss │ ├── container.scss │ ├── fonts.scss │ ├── footer.scss │ ├── index.scss │ ├── markdown.scss │ ├── nav.scss │ ├── pagination.scss │ ├── reset.scss │ ├── search-modal.scss │ ├── search-page.scss │ ├── sidebar.scss │ ├── toc.scss │ └── variables.scss └── theme │ ├── Admonition │ ├── Icon │ │ ├── Danger.tsx │ │ ├── Info.tsx │ │ ├── Note.tsx │ │ ├── Tip.tsx │ │ └── Warning.tsx │ ├── Layout │ │ ├── index.tsx │ │ └── styles.module.scss │ ├── Type │ │ ├── Caution.tsx │ │ ├── Danger.tsx │ │ ├── Info.tsx │ │ ├── Note.tsx │ │ ├── Tip.tsx │ │ └── Warning.tsx │ ├── Types.tsx │ └── index.tsx │ ├── Details │ ├── index.tsx │ └── styles.module.scss │ ├── DocBreadcrumbs │ ├── Items │ │ └── Home │ │ │ ├── index.tsx │ │ │ └── styles.module.css │ ├── index.tsx │ └── styles.module.css │ ├── DocCard │ ├── index.tsx │ └── styles.module.scss │ ├── DocCardList │ ├── index.tsx │ └── styles.module.scss │ ├── DocCategoryGeneratedIndexPage │ ├── index.tsx │ └── styles.module.css │ ├── DocItem │ ├── Layout │ │ ├── index.tsx │ │ └── styles.module.scss │ └── TOC │ │ └── Mobile │ │ ├── index.tsx │ │ └── styles.module.css │ ├── DocPaginator │ └── index.tsx │ ├── DocRoot │ └── Layout │ │ └── Main │ │ ├── index.tsx │ │ └── styles.module.scss │ ├── Footer │ ├── Copyright │ │ └── index.tsx │ ├── Layout │ │ └── index.tsx │ ├── LinkItem │ │ └── index.tsx │ ├── Links │ │ ├── MultiColumn │ │ │ └── index.tsx │ │ ├── Simple │ │ │ └── index.tsx │ │ └── index.tsx │ ├── Logo │ │ ├── index.tsx │ │ ├── styles.module.css │ │ └── styles.module.scss │ └── index.tsx │ ├── Icon │ ├── ExternalLink │ │ ├── index.tsx │ │ └── styles.module.css │ └── Home │ │ └── index.tsx │ ├── Logo │ └── index.tsx │ ├── PaginatorNavLink │ └── index.tsx │ ├── SearchPage │ ├── index.tsx │ └── styles.module.scss │ ├── TOC │ ├── index.tsx │ └── styles.module.css │ └── TOCCollapsible │ ├── CollapseButton │ ├── index.tsx │ └── styles.module.scss │ ├── index.tsx │ └── styles.module.scss ├── static ├── .nojekyll ├── fonts │ └── actual.otf └── img │ ├── branding │ ├── optimai-documentation-logo.svg │ └── pi.svg │ ├── favicon.ico │ ├── logo.svg │ ├── optimai-logo.svg │ ├── social-card.jpeg │ └── social-card.png └── tsconfig.json /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: OptimAI Network docs 2 | 3 | on: 4 | push: 5 | branches: [ main ] 6 | pull_request: 7 | branches: [ main ] 8 | workflow_dispatch: 9 | 10 | permissions: 11 | contents: read 12 | pages: write 13 | id-token: write 14 | 15 | jobs: 16 | build: 17 | runs-on: ubuntu-20.04 18 | steps: 19 | - name: Checkout 20 | uses: actions/checkout@v2 21 | 22 | - name: Install Node.js 23 | uses: actions/setup-node@v2 24 | with: 25 | node-version: '18' 26 | 27 | - name: Build 28 | run: | 29 | npm install 30 | npm run build 31 | 32 | - name: Upload artifact 33 | uses: actions/upload-pages-artifact@v3 34 | with: 35 | path: ./build 36 | 37 | deploy: 38 | runs-on: ubuntu-20.04 39 | needs: build 40 | if: github.event_name == 'push' 41 | environment: 42 | name: github-pages 43 | steps: 44 | - name: Deploy to GitHub Pages 45 | id: deployment 46 | uses: actions/deploy-pages@v4 47 | -------------------------------------------------------------------------------- /.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 | .vscode 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Website](https://img.shields.io/badge/website-000000?style=for-the-badge&logo=About.me&logoColor=white)](https://optimai.network/?utm_source=github_docs) [![X (Twitter)](https://img.shields.io/badge/X-000000?style=for-the-badge&logo=x&logoColor=white)](https://x.com/optimainetwork) [![Telegram](https://img.shields.io/badge/Telegram-2CA5E0?style=for-the-badge&logo=telegram&logoColor=white)](https://t.me/OptimAINetwork) 2 | # 🌟 OptimAI Network Documentation 3 | 4 | This repository contains the source code for [docs.optimai.network](https://docs.optimai.network/). 5 | 6 | 🔗 Visit our main website at [optimai.network](https://optimai.network) to learn more about our Decentralized Data Network! ✨ 7 | 8 | ## Contributing 9 | 10 | We welcome contributions to improve our documentation! Here's how you can contribute: 11 | 1. Fork the repository: 12 | - Visit the [OptimAI Network Docs repository](https://github.com/optimainetwork/docs) on GitHub 13 | - Click the "Fork" button in the top-right corner 14 | - Select where you want to fork the repository (your personal account or an organization) 15 | 2. Clone your forked repository:` 16 | 17 | ``` 18 | git clone https://github.com/YOUR-USERNAME/docs.git 19 | cd docs 20 | 3. Create a new branch for your changes:` 21 | ``` 22 | git checkout -b your-feature-branch 23 | ``` 24 | 25 | 4. Make your changes to the documentation 26 | 5. Commit your changes:` 27 | ``` 28 | git add . 29 | git commit -m "Description of your changes" 30 | 6. Push your changes to your fork: 31 | ``` 32 | git push origin your-feature-branch 33 | 7. Create a pull request: 34 | - Go to your fork on GitHub 35 | - Click "Pull request" and select "New pull request" 36 | - Select your feature branch and submit the pull request 37 | Please ensure your contributions align with our documentation style and standards. 38 | 39 | ## Running the Documentation Locally 40 | After forking and cloning the repository: 41 | 1. Install dependencies: 42 | ``` 43 | npm install 44 | 2. Start the development server: 45 | ``` 46 | npm start 47 | 3. Open your browser and visit `http://localhost:3000` 48 | 49 | ## Structure 50 | - `docs/`: Contains all the markdown files for the documentation 51 | - `src/`: Custom React components and pages 52 | - `static/`: Static assets like images 53 | - `docusaurus.config.js`: Main configuration file for Docusaurus 54 | 55 | ## Deployment 56 | This documentation is automatically deployed to [docs.optimai.network](https://docs.optimai.network) when changes are merged into the main branch. 57 | 58 | ## Need Help? 59 | If you have any questions or need assistance, please open an issue in this repository or reach out through our community channels. 60 | 61 | Thank you for contributing to OptimAI Network's documentation! -------------------------------------------------------------------------------- /docs/architecture.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 4 3 | title: "OptimAI Network Architecture" 4 | --- 5 | 6 | import ImageWithCaption from '@site/src/components/ImageWithCaption'; 7 | 8 | # OptimAI Network Architecture 9 | 10 | :::tip[Overview] 11 | The OptimAI Network is an innovative **L2 DePIN Reinforcement Data Network for Agentic AI**, designed to empower users to **mine data, fuel AI, and earn rewards**. By transforming user-contributed data into the foundation for tomorrow’s AI agents, OptimAI creates a decentralized, scalable, and incentivized ecosystem. Its architecture revolves around four key pillars: the OptimAI DePIN Network, OptimAI Integrated Browser Nodes, OptimAI Reinforcement Data Layer, and OptimAI OP-Stack Layer 2 Blockchain. 12 | 13 | OptimAI redefines AI development by placing users at the center. Through intuitive tools, anyone can **mine data** and contribute to AI innovation, earning OPI tokens as rewards. This participatory model turns everyday data into powerful AI agents, driving a future where AI is collaborative, accessible, and community-powered. 14 | ::: 15 | 16 | import architectureImage from './assets/images/architecture.png'; 17 | 18 | 23 | 24 | ## Architecture Overview 25 | 26 | The OptimAI Network Architecture is a robust, layered system engineered to support its mission of decentralized AI development. At the top, the **OptimAI Agent Platform** enables users to create and manage AI agents using their data. This is powered by **OptimAI Infrastructures**, which provide the computational backbone for AI operations. The **OptimAI Reinforcement Data Network** processes and refines user-contributed data, while the **DePIN and DeHIN Networks** supply decentralized resources and validation. **OptimAI Nodes** make participation seamless, and the **OptimAI Chain**, a Layer 2 blockchain, ensures secure, scalable transactions—allowing users to **mine data, fuel AI, and earn rewards**. 27 | 28 | ### OptimAI Agent Platform 29 | 30 | The entry point for users to **turn their data into tomorrow’s AI agents**: 31 | - **OptimAI Agent Studio**: A user-friendly toolset for designing and customizing AI agents with contributed data. 32 | - **OptimAI Agent Operator**: Manages the deployment and operation of AI agents across the network. 33 | - **OptimAI Agent Store**: A marketplace for sharing and monetizing AI agents, encouraging collaboration. 34 | 35 | ### OptimAI Infrastructures 36 | 37 | The operational core supporting AI development: 38 | - **OptimAI Compute Engine**: Harnesses decentralized computing power for AI tasks, scaling with user contributions. 39 | - **OptimAI Data Engine**: Processes and organizes user-mined data for AI training. 40 | - **OptimAI Agent OS**: Optimizes AI agent performance across the ecosystem. 41 | 42 | ### OptimAI Reinforcement Data Network 43 | 44 | The engine that refines data to **fuel AI**: 45 | - **Network Compute Layer**: Leverages edge computing, decentralized storage, and federated learning for efficient data processing. 46 | - **Reinforcement Data Layer**: Enhances data quality through mining, annotation, and reinforcement learning with human feedback (RLHF). 47 | 48 | ### DePIN and DeHIN Networks 49 | 50 | The decentralized foundation: 51 | - **DePIN (Decentralized Physical Infrastructure Network)**: Uses global hardware to support AI workloads, enabling users to **mine data**. 52 | - **DeHIN (Decentralized Human Intelligence Network)**: Incorporates human validation to ensure data accuracy and value. 53 | 54 | ### OptimAI Node 55 | 56 | Browser-based nodes allow users to **mine data** effortlessly via Chrome, Firefox, or Safari, democratizing participation and reward-earning. 57 | 58 | ### OptimAI Chain 59 | 60 | A Layer 2 EVM-compatible blockchain built on OP-Stack, it ensures secure, low-cost transactions and governance, rewarding users with OPI tokens for their contributions. 61 | 62 | ## Core Pillars 63 | 64 | ### OptimAI DePIN Network 65 | 66 | - **Description**: A decentralized network where users **mine data** and provide resources to power AI, forming the backbone of OptimAI’s ecosystem. 67 | - **Key Features**: 68 | - **Global Participation**: Taps into user hardware worldwide for scalable AI computing. 69 | - **Secure Design**: Employs cryptography and consensus for data and network integrity. 70 | - **Rewards System**: Pays users in OPI tokens for data and resource contributions. 71 | - **Benefits**: Lowers costs, boosts resilience, and grows with user involvement. 72 | 73 | ### OptimAI Integrated Browser Nodes 74 | 75 | - **Description**: Simplifies data mining through browsers, enabling users to contribute and **earn rewards** without technical barriers. 76 | - **Key Features**: 77 | - **Edge Processing**: Handles data locally for privacy and speed. 78 | - **Data Capture**: Gathers consented data from platforms like Twitter, enriching AI datasets. 79 | - **User Privacy**: Offers control and anonymization for secure contributions. 80 | - **Benefits**: Makes participation easy and secure, empowering users to shape AI. 81 | 82 | ### OptimAI Reinforcement Data Layer 83 | 84 | - **Description**: Transforms mined data into high-quality inputs that **fuel AI** development. 85 | - **Key Features**: 86 | - **Data Pipelines**: Automates cleaning, annotation, and validation. 87 | - **RLHF Integration**: Improves data through human feedback and learning loops. 88 | - **Community Input**: Leverages users for data validation. 89 | - **Benefits**: Speeds up AI training and enhances data value. 90 | 91 | ### OptimAI OP-Stack Layer 2 Blockchain 92 | 93 | - **Description**: A scalable blockchain enabling users to **earn rewards** for their contributions. 94 | - **Key Features**: 95 | - **Layer 2 Scaling**: Cuts costs and boosts transaction speed. 96 | - **Smart Contracts**: Automates rewards and governance. 97 | - **Token Empowerment**: Gives OPI holders a voice in the network’s future. 98 | - **Benefits**: Ensures trust and efficiency in a user-driven ecosystem. 99 | 100 | import ecosystemImage from './assets/images/ecosystem.png'; 101 | 102 | 107 | 108 | ## Conclusion 109 | 110 | The OptimAI Network Architecture embodies its mission as an **L2 DePIN Reinforcement Data Network for Agentic AI**. By enabling users to **mine data, fuel AI, and earn rewards**, it transforms individual contributions into the building blocks of tomorrow’s AI agents. This decentralized, user-powered approach not only overcomes traditional AI development hurdles but also creates a future where AI is shaped by and for its community, delivering innovation that is equitable, transparent, and impactful. -------------------------------------------------------------------------------- /docs/assets/images/architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OptimaiNetwork/docs/ec3924aaab0eaef4bedacd57679c2af1db04233f/docs/assets/images/architecture.png -------------------------------------------------------------------------------- /docs/assets/images/core_node_agent.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OptimaiNetwork/docs/ec3924aaab0eaef4bedacd57679c2af1db04233f/docs/assets/images/core_node_agent.jpg -------------------------------------------------------------------------------- /docs/assets/images/core_node_browser.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OptimaiNetwork/docs/ec3924aaab0eaef4bedacd57679c2af1db04233f/docs/assets/images/core_node_browser.jpg -------------------------------------------------------------------------------- /docs/assets/images/ecosystem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OptimaiNetwork/docs/ec3924aaab0eaef4bedacd57679c2af1db04233f/docs/assets/images/ecosystem.png -------------------------------------------------------------------------------- /docs/assets/images/edge-node.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OptimaiNetwork/docs/ec3924aaab0eaef4bedacd57679c2af1db04233f/docs/assets/images/edge-node.png -------------------------------------------------------------------------------- /docs/assets/images/lite-node.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OptimaiNetwork/docs/ec3924aaab0eaef4bedacd57679c2af1db04233f/docs/assets/images/lite-node.png -------------------------------------------------------------------------------- /docs/assets/images/opi-token.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OptimaiNetwork/docs/ec3924aaab0eaef4bedacd57679c2af1db04233f/docs/assets/images/opi-token.jpg -------------------------------------------------------------------------------- /docs/assets/images/optimai-intro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OptimaiNetwork/docs/ec3924aaab0eaef4bedacd57679c2af1db04233f/docs/assets/images/optimai-intro.png -------------------------------------------------------------------------------- /docs/assets/images/services.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OptimaiNetwork/docs/ec3924aaab0eaef4bedacd57679c2af1db04233f/docs/assets/images/services.png -------------------------------------------------------------------------------- /docs/assets/videos/lite-node-claim.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OptimaiNetwork/docs/ec3924aaab0eaef4bedacd57679c2af1db04233f/docs/assets/videos/lite-node-claim.mp4 -------------------------------------------------------------------------------- /docs/assets/videos/lite-node-mining.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OptimaiNetwork/docs/ec3924aaab0eaef4bedacd57679c2af1db04233f/docs/assets/videos/lite-node-mining.mp4 -------------------------------------------------------------------------------- /docs/assets/videos/lite-node-referrals.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OptimaiNetwork/docs/ec3924aaab0eaef4bedacd57679c2af1db04233f/docs/assets/videos/lite-node-referrals.mp4 -------------------------------------------------------------------------------- /docs/data-network.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 3 3 | title: "OptimAI: Reinforcement Data Network" 4 | --- 5 | 6 | # OptimAI Network: Reinforcement Data Network for AI Agents, Built by Everyone 7 | 8 | :::tip[Key Points] 9 | - **Decentralized Platform:** A community-driven ecosystem for AI development. 10 | - **Core Functions:** Refines AI Agents learning process via Data Mining, Annotation, Validation, and Reinforcement Learning with Human Feedback (RLHF). 11 | - **Community-Powered:** Leverages DePIN (Decentralized Physical Infrastructure Network) and DeHIN (Decentralized Human Intelligence Network), powered by OptimAI nodes. 12 | - **Blockchain Integration:** Utilizes OptimAI Chain for transparency and trustless collaboration. 13 | ::: 14 | 15 | --- 16 | 17 | ## Overview 18 | The **OptimAI Network Reinforcement Data Network** is a decentralized, collaborative platform designed to enhance AI agents through high-quality data and iterative feedback. Built by a global community, it aims to make AI development accessible, transparent, and resilient using cutting-edge technologies like blockchain and decentralized computing. 19 | 20 | ### Purpose and Key Features 21 | The network focuses on creating a robust environment for training and refining AI models. Key features include: 22 | - **OptimAI Chain:** A high-performance EVM Layer-2 blockchain with up to 2,000 TPS and fees under $0.001. 23 | - **Decentralized Infrastructure:** Combines DePIN and DeHIN for computing and human intelligence tasks. 24 | - **Self-Evolving Engine:** Continuously improves AI through data-driven feedback loops. 25 | 26 | ### How It Works 27 | The network operates through two synergistic layers: 28 | - **Infrastructure Layer:** Handles computing, storage, and connectivity. 29 | - **Reinforcement Data Layer:** Processes and refines data for AI training. 30 | 31 | ### Getting Involved 32 | To engage with the network: 33 | 1. **Explore the Reinforcement Data Network:** Visit [OptimAI Data Network](https://optimai.network/data-network/). 34 | 2. **Set Up a Node:** Contribute to DePIN/DeHIN infrastructure. 35 | 3. **Contribute Data:** Participate in mining, annotation, or validation via OptimAI Node. 36 | 4. **Fuel AI Agents:** Together build the future Autonomous AI Agents by simply prompt engineering. 37 | 38 | Refer to the official site for detailed instructions, as specifics may evolve. 39 | 40 | --- 41 | 42 | ## Comprehensive Analysis of OptimAI Network Reinforcement Data Network 43 | 44 | ### Introduction and Background 45 | The OptimAI Network Reinforcement Data Network is a self-evolving ecosystem that refines AI models through iterative feedback, driving toward enhanced intelligence. Described as "Built by Everyone," it fosters a participatory model where global contributors shape AI development, making it a decentralized alternative to traditional AI frameworks. 46 | 47 | ### Key Components and Functionality 48 | The network's core components support the AI development lifecycle: 49 | 50 | | **Component** | **Description** | **Role in AI Development** | 51 | |-----------------------------------|---------------------------------------------------------------------------------|-------------------------------------------------------------------------| 52 | | Data Mining | Uncovers insights from raw datasets, providing depth and diversity. | Gathers data for training and pattern recognition. | 53 | | Data Annotation | Labels and contextualizes data for precise AI learning. | Enables supervised learning with accurate datasets. | 54 | | Data Validation | Ensures transparency and resilience in a trustless ecosystem. | Maintains data quality and reliability. | 55 | | Reinforcement Learning with Human Feedback (RLHF) | Refines AI behavior using real-world human input loops. | Aligns AI with human values and ethical standards. | 56 | 57 | These components form the **Reinforcement Data Layer**, central to the network's mission. 58 | 59 | ### Technology Stack and Architecture 60 | The network integrates advanced technologies for performance and scalability: 61 | - **OptimAI Chain:** An EVM-compatible Layer-2 blockchain with high throughput (2,000 TPS) and low costs (`<$0.001` per transaction). 62 | - **Decentralized Networks:** 63 | - **DePIN:** Community-driven nodes for computing, storage, and connectivity. 64 | - **DeHIN:** Global crowdsourcing for data validation and annotation. 65 | - **AI and Computing:** 66 | - **AI Inference/Edge Compute:** Local processing for low latency. 67 | - **Federated Learning:** Privacy-preserving model training across nodes. 68 | - **Decentralized Storage:** Global data distribution for transparency. 69 | - **Dynamic Bandwidth Sharing:** Real-time resource optimization. 70 | 71 | ### Operational Mechanics 72 | The dual-layer architecture ensures seamless operation: 73 | 74 | | **Layer** | **Description** | **Core Components** | 75 | |-----------------------------|------------------------------------------------------|-------------------------------------------------------------------------------------| 76 | | **Infrastructure Layer** | Resilient backbone for ecosystem performance. | - **AI Inference/Edge Compute:** Local AI tasks. 77 | | | | - **Federated Learning:** Privacy-preserving training. 78 | | | | - **Decentralized Storage:** Global data resilience. 79 | | | | - **Dynamic Bandwidth Sharing:** Efficient data transfer. 80 | | **Reinforcement Data Layer** | Self-evolving engine for AI refinement. | - **Data Mining:** Insight extraction. 81 | | | | - **Data Annotation:** Labeling for learning. 82 | | | | - **Data Validation:** Quality assurance. 83 | | | | - **RLHF:** Human-aligned refinement. 84 | 85 | **OptimAI Nodes** power both layers, acting as decentralized hubs for computing and data processing. 86 | 87 | ### Benefits and Community Engagement 88 | - **For AI Developers:** Access to diverse datasets and scalable infrastructure. 89 | - **For Contributors:** Opportunities to contribute data or compute power, potentially earning rewards. 90 | - **For the Community:** Transparent, trustless collaboration via blockchain. 91 | 92 | ### Example Use Case 93 | **Training a Medical Language Model:** 94 | 1. **Data Mining:** Collect medical texts from diverse sources. 95 | 2. **Data Annotation:** DeHIN labels entities and terms. 96 | 3. **Data Validation:** Ensures accuracy and consistency. 97 | 4. **Model Training:** Uses federated learning across nodes. 98 | 5. **RLHF:** Refines the model with expert feedback. 99 | 100 | This showcases the network's end-to-end support for AI development. 101 | 102 | ### Conclusion and Future Implications 103 | The OptimAI Network Reinforcement Data Network is a pioneering platform that combines decentralization, blockchain, and community collaboration to advance AI. Its potential to reduce barriers and foster global innovation is significant, though further documentation may enhance adoption. 104 | -------------------------------------------------------------------------------- /docs/faqs.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 11 3 | --- 4 | 5 | # FAQs 6 | *Get answers to the most common questions about OptimAI Network as a whole.* 7 | 8 | ## General Questions 9 | 10 |
11 | What is OptimAI Network? 12 | 13 | The OptimAI Network is a decentralized data network that transforms everyday internet usage into a data mining process to fuel AI development. By leveraging a Layer 2 DePIN Blockchain and integrated browser nodes, users can contribute data, fuel AI innovation, and earn rewards in the form of OPI Tokens. 14 |
15 | 16 |
17 | How does OptimAI Network data mining differ from traditional data collection methods? 18 | 19 | Unlike traditional centralized data scraping, OptimAI utilizes integrated browser inside OptimAI Core Nodes that allow access to both public and closed-source data, including user interactions and behaviors. This decentralized approach ensures richer data collection while maintaining user privacy and security. 20 |
21 | 22 |
23 | What are OPI Tokens? 24 | 25 | OPI Tokens are the native token of the OptimAI Network. They serve as rewards for participants who contribute data and computational resources. OPI Tokens can be used within the network, traded on supported exchanges, or held for future value. 26 |
27 | 28 |
29 | How can I participate in the OptimAI Network? 30 | 31 | Participation is simple: 32 | - **Download** the OptimAI Node for your preferred platform (browser extension, desktop app, mobile app, CLI, or Telegram). 33 | - **Install and activate** the node. 34 | - **Use your device** as you normally would; the node operates in the background. 35 | - **Earn rewards** in OPI Tokens for your contributions. 36 |
37 | 38 | ## Installation and Setup 39 |
40 | What are the system requirements for running an OptimAI Core Node? 41 | 42 | - Minimum Requirements: 43 | 44 | - CPU: Dual-core processor 45 | - RAM: 4 GB 46 | - Storage: 500 MB free space 47 | - Operating Systems: Windows 10+, macOS 10.13+, Ubuntu 18.04+, iOS 12+, Android 7.0+ 48 | - Browsers: Latest versions of Chrome, Firefox, or Edge 49 | 50 | - Recommended Requirements: 51 | - CPU: Quad-core processor 52 | - RAM: 8 GB 53 | - Storage: 1 GB free spa 54 |
55 | 56 |
57 | How do I install the OptimAI Lite Node (Browser Extension)? 58 | 59 | - Step 1: Visit your browser's extension store. 60 | - Step 2: Search for "OptimAI Lite Node". 61 | - Step 3: Click "Add to Browser" or "Install". 62 | - Step 4: Follow the prompts to complete the installation. 63 | - Step 5: Activate the node by clicking the OptimAI icon and logging in or creating an account. 64 |
65 | 66 |
67 | Can I run OptimAI Nodes on multiple devices? 68 | 69 | Yes, you can install and run nodes on multiple devices to increase your contributions and earnings. Ensure each node is linked to your account for consolidated rewards. 70 |
71 | 72 |
73 | Do I need technical expertise to set up the node? 74 | 75 | No technical expertise is required for most users. The installation process is user-friendly, with step-by-step instructions provided. For the CLI version, basic command-line knowledge is helpful but not mandatory. 76 |
77 | 78 | ## Data Privacy and Security 79 | 80 |
81 | How does OptimAI protect my privacy? 82 | 83 | OptimAI prioritizes privacy by: 84 | - Local Data Processing: Data is processed on your device. 85 | - Anonymization: Personal identifiers are removed before data transmission. 86 | - Encryption: Data is encrypted during transmission to the network. 87 | - User Control: You can customize data sharing preferences. 88 | - Compliance: Adheres to GDPR and other international privacy laws. 89 |
90 | 91 |
92 | What kind of data does the OptimAI Node collect? 93 | 94 | The node collects: 95 | - Public Data: From websites you visit. 96 | - Closed-Source Data: From authenticated platforms (with your permission). 97 | - User Behaviors: Clicks, navigation paths, interaction patterns. 98 | - Sequential Data: Series of actions over time for AI training. 99 | 100 | All data is anonymized and used solely for AI development purposes. 101 |
102 | 103 |
104 | Can I control what data I share? 105 | 106 | Yes, you have full control over your data sharing settings. You can: 107 | - Adjust Preferences: Choose the types of data you're comfortable sharing. 108 | - Opt-In/Out of Tasks: Participate in specific missions or tasks as desired. 109 | - Pause Data Collection: Temporarily halt data mining when needed. 110 |
111 | 112 |
113 | Is my personal information safe? 114 | 115 | Absolutely. OptimAI employs robust security measures: 116 | - Data Encryption: Both at rest and in transit. 117 | - Secure Authentication: Protects your account access. 118 | - Regular Audits: Ensures compliance and security standards are met. 119 |
120 | 121 | ## Earnings and Rewards 122 | 123 |
124 | How are rewards calculated? 125 | 126 | Rewards are based on: 127 | - Contribution Volume: The amount of data you provide. 128 | - Data Quality: Higher-quality data earns more rewards. 129 | - Participation in Tasks: Completing missions and quests boosts earnings. 130 | - Referral Bonuses: Earn a percentage from referrals' contributions. 131 |
132 | 133 |
134 | How can I track my earnings? 135 | 136 | Use your personal dashboard to: 137 | - Monitor OPI Tokens: See real-time balance updates. 138 | - View Contribution Stats: Track your data mining activity. 139 | - Access Reward History: Review past earnings and transactions. 140 |
141 | 142 |
143 | What can I do with OPI Tokens? 144 | 145 | - Use within Network: Purchase services or products in the OptimAI ecosystem. 146 | - Hold: Keep tokens as an investment for potential future value. 147 |
-------------------------------------------------------------------------------- /docs/intro.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 1 3 | title: "Welcome to OptimAI Network" 4 | --- 5 | 6 | # Welcome to OptimAI Network 7 | 8 | :::tip[**What is OptimAI Network?**] 9 | **OptimAI Network** is a **decentralized Reinforcement Data Network** that seamlessly integrates an **EVM Layer-2 blockchain, DePIN (Decentralized Physical Infrastructure Network), and a community-driven data mining and validation framework** to revolutionize the learning process of AI Agents. By leveraging a decentralized network of contributors, OptimAI enables real-time **data collection, validation, and reinforcement learning**, ensuring AI models evolve continuously with **high-quality, diverse, and contextually rich datasets**. 10 | 11 | This **scalable, self-improving AI ecosystem** guarantees AI Agents become more **intelligent, autonomous, and responsive**, making them **faster, more accurate, and seamlessly adaptive** to real-world scenarios. 12 | ::: 13 | 14 | ![OptimAI Introduction](./assets/images/optimai-intro.png) 15 | 16 | ## Why OptimAI Network? 17 | Traditional AI training is constrained by data scarcity, centralized control, and outdated validation mechanisms. OptimAI Network addresses these challenges by: 18 | 19 | - **Decentralizing Data Access:** Shifting control from monopolized entities to a community-driven model, ensuring fair and open AI development. 20 | - **Enhancing Data Mining & Validation:** Using reinforcement learning principles, community participation, and on-device computation to mine, clean, and structure datasets dynamically. 21 | - **Leveraging DePIN & Layer-2 Blockchain:** Enabling secure, high-speed, and cost-efficient transactions within the AI data ecosystem. 22 | - **Empowering AI Agents:** Supporting the autonomous creation and development of AI agents that operate contextually within user environments. 23 | 24 | ## Unique Features of OptimAI Network 25 | ### 1. Built-in Browser Nodes: Intuitive Data Mining 26 | OptimAI introduces a revolutionary approach to data mining by embedding built-in browser within a DePIN node, enabling users to contribute data effortlessly while maintaining control over privacy. 27 | 28 | - **Seamless Background Data Collection:** Nodes operate within everyday browsing sessions, allowing passive yet impactful participation in AI training. 29 | - **Access to Authenticated Platforms:** Supports data retrieval from closed ecosystems (e.g., Twitter, Facebook, and other authenticated platforms) with user consent. 30 | - **Privacy-Preserving Architecture:** Local data processing ensures compliance with GDPR, CCPA, and other regulatory frameworks, sharing only anonymized insights. 31 | 32 | ### 2. Multi-Layered Data Processing & Validation 33 | To ensure AI models are trained on high-quality datasets, OptimAI Network implements a multi-faceted approach to data handling: 34 | 35 | - **Diverse Data Sourcing**: Aggregates structured and unstructured data from public domains, user interactions, and curated repositories. 36 | - **Automated Cleaning & Validation Pipelines**: Utilizes AI-driven algorithms and human-in-the-loop verification for continuous dataset refinement. 37 | - **Scalability & Efficiency**: OptimAI’s architecture supports massive data ingestion while reducing redundancy and optimizing storage across nodes. 38 | 39 | ### 3. Layer-2 DePIN Blockchain: OptimAI OP-Stack 40 | OptimAI Network operates on an advanced Layer-2 blockchain infrastructure, enhancing scalability, security, and transaction efficiency within its decentralized AI ecosystem. 41 | 42 | - **Optimized for High-Throughput AI Transactions**: Enables micro-transactions, incentivized data sharing, and real-time model training without network congestion. 43 | - **Decentralized Governance & Transparency**: Community stakeholders influence network upgrades and data policies via smart contract voting mechanisms. 44 | - **Lower Fees, Higher Security**: Layer-2 rollups ensure cost-effective transactions while inheriting Ethereum’s robust security framework. 45 | 46 | ### 4. OptimAI Agent OS 47 | OptimAI offers an innovative AI Agent Operating System (OS) that enables users to develop and deploy personalized AI agents: 48 | 49 | - **User-Centric AI**: Agents adapt to individual user preferences, automating tasks based on real-time contextual data. 50 | - **Edge Computing Integration**: AI models process data on user devices, minimizing latency and enhancing efficiency. 51 | - **Agent Marketplace**: Developers can create, distribute, and monetize AI agents tailored to various applications. 52 | 53 | ### 5. OptimAI SDK: Developer Empowerment 54 | For developers and enterprises looking to leverage OptimAI’s data and AI infrastructure, the OptimAI SDK provides tools and incentives: 55 | 56 | - **Custom Data Collection APIs**: Offers tailored data pipelines that integrate seamlessly with OptimAI’s decentralized framework. 57 | - **Incentivized AI Innovation**: Developers earn OPI tokens for creating specialized data-mining strategies or AI agent enhancements. 58 | - **Modular & Interoperable**: Built for adaptability across diverse AI models, blockchain integrations, and enterprise applications. 59 | 60 | ### 6. Privacy-Centric and Ethical Design 61 | OptimAI upholds a strong commitment to ethical AI development and user privacy: 62 | 63 | - **Privacy-Preserving AI Training**: Employs federated learning techniques to process data locally on devices while still refining global AI models. 64 | - **Transparent & Bias-Resistant AI**: Uses community-driven validation protocols to mitigate biases in AI decision-making. 65 | - **Regulatory Compliance**: Adheres to international data protection standards (GDPR, CCPA, etc.), fostering trust and security within the ecosystem. -------------------------------------------------------------------------------- /docs/litepaper.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 15 3 | title: "Litepaper" 4 | --- 5 | 6 | import 'katex/dist/katex.min.css' 7 | 8 | # OptimAI Network: Litepaper 9 | 10 | **Mine Data. Fuel AI. Earn Rewards.** 11 | 12 | --- 13 | 14 | ## Introduction 15 | 16 | **OptimAI Network** is a revolutionary **Decentralized Data Network** built to power the next generation of AI applications. It combines **Layer-2 blockchain** scalability, **DePIN (Decentralized Physical Infrastructure)** resource sharing, **Generative AI** capabilities, and **reinforcement-based data validation** to continuously improve data quality. Through **OptimAI Nodes**, users from all walks of life can contribute data, processing power, and bandwidth in return for tokenized rewards—all while maintaining control over their personal environment. 17 | 18 | --- 19 | 20 | ## Core Objectives 21 | 22 | 1. **Democratize Data Collection** 23 | - Unlock previously inaccessible or private data sources, thanks to embedded browser environments and secure extension-based mining. 24 | - Reward contributors for sharing unique data and verifying its authenticity. 25 | 26 | 2. **Leverage Collective Compute** 27 | - Tap into an ever-growing community of devices (desktops, servers, mobile, IoT) to form a highly scalable, cost-effective AI infrastructure. 28 | - Distribute intensive tasks like model training, inference, and data labeling across a network of incentivized node operators. 29 | 30 | 3. **Reinforce Data Quality** 31 | - Use reinforcement learning to continually rank, validate, and refine incoming data. 32 | - Encourage community-driven annotation campaigns to enrich datasets for specialized AI needs. 33 | 34 | 4. **Accelerate AI Innovation** 35 | - Provide a decentralized marketplace where developers, businesses, and researchers can access fresh, curated datasets, robust compute power, and pre-trained AI models. 36 | - Support real-time, edge-based analytics for high-speed or low-latency scenarios. 37 | 38 | --- 39 | 40 | ## Node Architecture Overview 41 | 42 | At the heart of OptimAI’s ecosystem is the **OptimAI Node**—software that can run on different types of devices with varying capabilities. Each node type plays a distinct role, collectively forming a resilient, decentralized network. 43 | 44 | ### 1. Lite Nodes 45 | Designed for simplicity and low resource usage, **Lite Nodes** are perfect for users who want to contribute to the network without dedicating powerful hardware or constant uptime. 46 | 47 | - **Browser Extension** 48 | - **Seamless Integration**: Runs as an extension in popular browsers. 49 | - **Data Validation**: Allows users to earn rewards by labeling, tagging, or voting on small data snippets. 50 | - **Passive Data Capture**: Collects public browsing insights (with user consent) and relays them to the network in anonymized form. 51 | 52 | - **Telegram Mini-App** 53 | - **Chat-Based Interaction**: Operates inside Telegram as a mini-app, making it easy to validate data or perform annotation tasks within a familiar interface. 54 | - **Lightweight Contributions**: No advanced hardware needed—just occasional engagement to confirm data or provide feedback. 55 | 56 | **Use Cases for Lite Nodes** 57 | - Individuals looking to earn tokens by casually validating AI training data. 58 | - Users wanting a simple entry point into a decentralized AI ecosystem. 59 | 60 | ### 2. Core Nodes 61 | For those with more robust hardware or a desire to contribute substantial resources, **Core Nodes** offer advanced capabilities, including an **integrated (built-in) browser environment** for comprehensive data mining from both public and authenticated sites. 62 | 63 | - **Built-In Browser** 64 | - **Authenticated Crawling**: Securely fetch data from sites requiring login credentials, such as subscription-based platforms or specialized forums. 65 | - **Configurable Scripts**: Automate data-collection rules—deciding which pages to visit, when to crawl, and how to parse data fields. 66 | - **High-Volume Data Mining**: Ideal for large-scale or domain-specific campaigns requiring frequent, targeted scraping. 67 | 68 | - **Resource Powerhouse** 69 | - **Advanced Hardware**: Utilize CPUs, GPUs, or large storage volumes for tasks like distributed AI training, big data processing, or advanced indexing. 70 | - **Bandwidth Sharing**: Relay large datasets within the network to balance loads and prevent bottlenecks. 71 | - **Continuous Operation**: Often run 24/7, receiving elevated rewards commensurate with their higher contribution. 72 | 73 | **Use Cases for Core Nodes** 74 | - AI developers or data analysts who require deeper data access and can commit their machine(s) to continuous network operations. 75 | - Organizations seeking large-scale data pipelines and robust compute for specialized AI research. 76 | 77 | ### 3. Edge Nodes 78 | **Edge Nodes** extend the OptimAI Network into mobile devices and IoT hardware, also featuring an **embedded browser environment** for data gathering—especially useful in on-the-go scenarios or IoT-driven platforms. 79 | 80 | - **Real-Time Data** 81 | - **Sensor Streams**: Capture time-sensitive info like location, temperature, user interactions, or environment metrics directly on the device. 82 | - **Local Inference**: Perform quick AI tasks (e.g., object detection in camera feeds) without relying on external servers. 83 | 84 | - **Built-In Browser for Mobile** 85 | - **Context-Aware**: Mobile browsing can yield region-specific or scenario-specific data often missed by conventional approaches. 86 | - **Adaptive Usage**: Functions at variable connection speeds, caching data for sync when stable bandwidth is available. 87 | 88 | - **Low Latency Processing** 89 | - **On-Device AI**: Running certain inference tasks locally improves speed and privacy. 90 | - **Partial Updates**: Periodically send aggregated data or model adjustments back to the network, contributing to global AI improvements. 91 | 92 | **Use Cases for Edge Nodes** 93 | - IoT deployments requiring real-time analytics with minimal latency (smart cities, industrial IoT, etc.). 94 | - Mobile-first users who want to capture unique, location-based data streams. 95 | 96 | --- 97 | 98 | ## Reinforcement Data Flow 99 | 100 | 1. **Data Ingestion** 101 | - Core Nodes scrape large volumes of domain-specific or gated content. 102 | - Lite and Edge Nodes contribute partial data streams (public browsing data, sensor metrics) and help annotate new data. 103 | 104 | 2. **Validation & Rewards** 105 | - Multiple nodes cross-check each data piece. If consensus is reached, data is approved and integrated into the global dataset. 106 | - **Reinforcement Learning** techniques fine-tune how data is accepted or rejected, continually raising quality standards. 107 | 108 | 3. **Reward Function** 109 | - Each node earns OPI tokens based on factors like data contribution, validation consistency, and resource provision. 110 | - For instance, if $ P_i $ denotes processing power, $ B_i $ the bandwidth contribution, and $ D_i $ the amount of validated data for node $ i $, one simplified reward model could be: 111 | 112 | $$ 113 | R_i = \alpha \cdot \bigl(P_i + B_i + D_i\bigr) 114 | $$ 115 | 116 | Where $ \alpha $ is a scaling parameter reflecting the overall network demand at a given time. 117 | 118 | 4. **Iterative Quality Gains** 119 | - Feedback loops update data confidence scores and node reputations. 120 | - Over time, the dataset evolves to retain only the most accurate, diverse, and context-rich entries. 121 | 122 | --- 123 | 124 | ## OPI Token: The Economic Driver 125 | 126 | ### Earning OPI 127 | 1. **Data Contributions** 128 | - Scraping authenticated content (Core Node) or ambient data (Edge Node). 129 | - Passive browser extension data mining (Lite Node). 130 | 2. **Validation & Annotation** 131 | - Confirm or label data samples. 132 | - Conduct specialized domain-specific tasks (image bounding boxes, text sentiment, etc.). 133 | 3. **Infrastructure Sharing** 134 | - Provide CPU, GPU, or storage to assist others’ training, inference, or indexing tasks. 135 | - Offer bandwidth for distributing large datasets. 136 | 137 | ### Spending OPI 138 | 1. **Marketplace Transactions** 139 | - Purchase premium datasets. 140 | - Acquire pre-trained AI models or advanced analytics modules. 141 | - Commission specialized scrapers or data labelers. 142 | 2. **Rent Compute Power** 143 | - Scale your AI projects by accessing high-throughput, GPU-equipped Core Nodes. 144 | - Pay only for the resources you utilize—perfect for short-term model training spikes. 145 | 3. **Network Governance** 146 | - Stake OPI to propose or vote on protocol changes, funding allocations, and new ecosystem initiatives. 147 | - The staking rewards for participant $ i $ at time $ t $ might follow: 148 | 149 | $$ 150 | R_i(t) \;=\; k \cdot \frac{\,S_i\,}{S_\text{total}} \,\cdot\, T(t) 151 | $$ 152 | 153 | Where $ S_i $ is the tokens staked by participant $ i $, $ S_\text{total} $ the total staked by all participants, and $ T(t) $ the total reward pool allocated at time $ t $. 154 | 155 | --- 156 | 157 | ## Marketplace & Collaboration 158 | 159 | The **OptimAI Marketplace** is where data, compute, and models meet: 160 | 161 | - **Data Campaigns** 162 | - Users fund campaigns seeking specific datasets or annotations. 163 | - Contributors submit matching data or labeled samples; successful deliveries are rewarded with OPI bounties. 164 | 165 | - **AI Model Exchange** 166 | - Developers can list models—chatbots, image generators, language processors—for lease or sale in OPI. 167 | - Researchers can crowdsource model improvement by incentivizing bug fixes, refinements, or domain-specific expansions. 168 | 169 | - **Microservices & Plug-Ins** 170 | - Technical contributors offer node-level plug-ins, such as advanced scraping bots or specialized data processing pipelines. 171 | - This modular approach keeps the network evolving with user-driven enhancements. 172 | 173 | --- 174 | 175 | ## Technical Highlights 176 | 177 | 1. **Layer-2 Blockchain** 178 | - A high-throughput environment that minimizes transaction costs for data validations, token rewards, and governance actions. 179 | - Achieves near-instant finality, crucial for micro-rewards and fast data lifecycles. 180 | 181 | 2. **DePIN Resource Allocation** 182 | - Distributes tasks to nodes with optimal availability, guided by real-time metrics. 183 | - Another possible formula for node task assignment is a weighted approach: 184 | 185 | $$ 186 | \text{Minimize:} \quad \sum_{i=1}^{n} w_i \,\left(\frac{L_i}{C_i}\right) 187 | $$ 188 | 189 | Where $ L_i $ is the current workload of node $ i $, $ C_i $ its capacity, and $ w_i $ a priority weight (e.g., reliability, uptime). 190 | 191 | 3. **Edge Computing** 192 | - Streamlined inference and data pre-processing at the source, reducing latency. 193 | - Periodic aggregation of local model updates improves the global AI model pool, fostering a continuous loop of distributed learning. 194 | 195 | --- 196 | 197 | ## Vision and Impact 198 | 199 | By fusing **Lite Nodes**, **Core Nodes**, and **Edge Nodes** into a **reinforcement-driven** ecosystem, OptimAI aims to: 200 | 201 | - **Unlock Previously Hidden Data** 202 | Authenticated gateways, mobile contexts, and sensor-driven streams ensure AI has richer, more diverse input. 203 | - **Scale AI at Lower Cost** 204 | Idle computing resources are monetized, driving more node operators to join, which in turn fosters a robust, perpetually growing infrastructure. 205 | - **Engage a Global Community** 206 | From tech-savvy developers to casual annotators, everyone has a role—and a reward stream—in shaping AI’s future. 207 | - **Continuously Improve** 208 | Reinforcement learning frameworks ensure that data quality and model outputs keep getting better as the network matures. 209 | 210 | --- 211 | 212 | ## Conclusion 213 | 214 | **OptimAI Network** heralds a new era of **decentralized AI**—where data gathering, validation, and computation become collaborative, transparent, and self-sustaining. Whether you’re casually running a Lite Node, scraping authenticated sites via a powerful Core Node, or capturing mobile data through an Edge Node, your contributions **matter** and are **rewarded**. 215 | 216 | Take part in building a more inclusive, resource-efficient AI landscape. Embrace OptimAI’s **“Mine Data. Fuel AI. Earn Rewards.”** mantra, and help shape tomorrow’s AI—one validated data chunk at a time. 217 | 218 | **Get started** or learn more at: 219 | [**optimai.network**](https://optimai.network) -------------------------------------------------------------------------------- /docs/opi-token.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 9 3 | title: "The OPI Token" 4 | --- 5 | 6 | :::tip[Overview] 7 | At the heart of the OptimAI Network is the **OPI Token**, a versatile utility token designed to drive the ecosystem's growth, incentivize active participation, and support decentralized governance. Its well-crafted tokenomics ensure a transparent, equitable, and sustainable economic framework that aligns the interests of users, developers, clients, and the network as a whole. 8 | ::: 9 | 10 | ## Key Roles of the OPI Token 11 | ![OPI Token](./assets/images/opi-token.jpg) 12 | ### Incentivization of Contributions 13 | The OPI Token rewards participants for their efforts in maintaining and enhancing the network, fostering a collaborative ecosystem. 14 | 15 | - Node Operation Tasks: Incentives for contributing computing power, storage, and network bandwidth. 16 | - Data Operation Tasks: Rewards for performing data mining, validation, and quality assurance. 17 | - Developers: Encourages the creation of data campaigns and AI solutions using the OptimAI SDK. 18 | 19 | ### Decentralized Governance 20 | Token holders are empowered to influence the network's future by participating in governance decisions. This decentralized approach ensures the community plays an active role in shaping the platform's direction. 21 | 22 | ### OptimAI Intelligence Service Fees 23 | Clients can access various OptimAI Intelligence Services, including dataset creation, computing power, and data validation, by paying fees in OPI Tokens. This utility strengthens the token's role in real-world applications. 24 | 25 | ### OptimAI Marketplace 26 | The OptimAI Marketplace is a decentralized platform enabling users, developers, and organizations to trade data, AI models, services, and computational resources. It fosters a dynamic ecosystem, driving innovation and incentivizing active participation. The OPI Token serves as the primary payment utility within the marketplace, facilitating seamless transactions across all exchanges. 27 | 28 | ### GenAI Agents Platform 29 | The GenAI Agents Platform, powered by OPI Tokens, allows users to build, deploy, and monetize AI Agents. Users can also stake OPI Tokens to hire AI Agents through a subscription-based model, enabling seamless access to personalized AI solutions. 30 | 31 | ### Layer-2 Blockchain Transaction Fees 32 | OPI Tokens are used as gas fees to facilitate transactions on the Layer-2 blockchain, ensuring efficient and cost-effective network operations. 33 | 34 | ### Staking and Security 35 | Staking mechanisms encourage long-term engagement, reward participants, and enhance the network's security and stability. 36 | 37 | ## OPI Token's Symbolic Journey: From 0 to 1 and Beyond 38 | The OPI token isn't merely a digital asset; it encapsulates a profound journey, mirroring the essence of the OptimAI Network and the transformative power of AI. The token's name, "OPI", holds a multi-layered significance: 39 | 40 | ### Mathematical Resonance 41 | 0^π to π^0: This mathematical expression represents a fascinating transition. 0 raised to the power of π (any number raised to the power of 0) equals 0, signifying a state of potentiality, a blank canvas awaiting creation. On the other hand, π raised to the power of 0 equals 1, symbolizing the realization of that potential, the birth of something meaningful from the void. Binary Representation: The range [0,1] is fundamental in binary code, the language of computers. Every piece of data, every image, every AI model is ultimately built from a sequence of 0s and 1s. OPI, through its name, evokes this core principle, hinting at the limitless possibilities that can emerge from the simplest of building blocks. Philosophical Underpinnings: 42 | 43 | ### Creation from Nothingness 44 | The transition from 0 to 1 mirrors the act of creation itself. In the realm of AI, this signifies the potential of AI agents to generate novel ideas, solutions, and even art from a seemingly blank slate. The Journey of Learning: Like an AI agent starting from a state of ignorance (0) and gradually acquiring knowledge and intelligence (1), the OPI token represents the continuous learning and evolution that are at the heart of the OptimAI Network. Empowerment & Potential: Just as binary code can represent anything, the OPI token empowers its holders to participate in and shape the future of AI. It's a symbol of potential, of the ability to contribute to something greater than oneself. OptimAI Network Connection: 45 | 46 | ### Community-Driven Growth 47 | The OPI token fuels the network's growth, incentivizing users to contribute data, validate information, and run nodes. This collective effort mirrors the journey from 0 to 1, as the network evolves and expands through the contributions of its community. AI's Transformative Power: Just as 0 and 1 are the building blocks of the digital world, the OPI token and the OptimAI Network aim to be the foundation for a new era of AI, where artificial intelligence is accessible, beneficial, and truly empowering for all. -------------------------------------------------------------------------------- /docs/optimai-agent.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 8 3 | title: "OptimAI Agents" 4 | --- 5 | 6 | # OptimAI Agents: Unleashing Autonomous AI for Everyone 7 | 8 | :::tip[Key Features] 9 | - **Self-Running AI:** OptimAI Agents work independently, tackling any task you throw their way. 10 | - **Data Freedom:** They pull from a vast, decentralized pool of global data sources, mining from public to even authenticated platforms. 11 | - **Prompt Magic:** Build your own agent with a single sentence—no tech degree needed. 12 | - **People-Powered:** A worldwide community shapes these agents, making them affordable and trustworthy. 13 | ::: 14 | 15 | --- 16 | 17 | ## Welcome to the World of OptimAI Agents 18 | Imagine an AI that doesn’t just follow orders but thinks for itself, fetching whatever data it needs to get the job done. That’s an **OptimAI Agent**, a creation of the **OptimAI Network**—a decentralized powerhouse where data flows freely and anyone can craft their own AI with a simple prompt. Whether you’re a student, a startup, or just curious, this is AI made for *you*. 19 | 20 | ![OptimAI Core Node: AI Agent](./assets/images/core_node_agent.jpg) 21 | 22 | ### The Old Way: Where AI Hits a Wall 23 | Traditional AI development is stuck in a rut: 24 | - **Locked Data:** Big companies hoard it, leaving the rest of us begging for scraps. 25 | - **Pricey Overhead:** Storage, computing, and delivery costs pile up fast. 26 | - **Hidden Secrets:** Closed systems mean you can’t trust what’s under the hood. 27 | 28 | These roadblocks keep AI exclusive, expensive, and sometimes unethical. Innovation suffers, and most people are left out. 29 | 30 | ### The OptimAI Fix: A Game-Changer 31 | The OptimAI Network flips the script: 32 | - **Open Data Network:** Blockchain-backed, community-driven data from everywhere. 33 | - **Cheap and Cheerful:** Shared nodes slash costs to pennies. 34 | - **Prompt Power:** Say what you want, and the network builds it for you. 35 | 36 | --- 37 | 38 | ## How OptimAI Agents Come to Life 39 | 40 | The secret sauce is a two-layer system that’s as seamless as it is brilliant: 41 | 42 | | **Layer** | **What It Does** | **How It Works** | 43 | |-----------------------------|--------------------------------------------|------------------------------------------------------------------------------------------| 44 | | **Infrastructure Layer** | The muscle behind the operation | - **Edge Compute:** Fast local processing 45 | | | | - **Federated Learning:** Private, distributed training 46 | | | | - **Decentralized Storage:** Data safe and sound worldwide 47 | | | | - **Dynamic Bandwidth:** Speedy data flow 48 | | **Reinforcement Data Layer** | The brain that keeps agents sharp | - **Data Mining:** Digs up insights 49 | | | | - **Data Annotation:** Labels it right 50 | | | | - **Data Validation:** Keeps it honest 51 | | | | - **RLHF:** Tunes it with human wisdom 52 | 53 | 54 | ### Crafting Your Agent: As Easy as 1-2-3 55 | 1. **Drop a Prompt:** Try "Make an AI to plan my weekly meals." 56 | 2. **Network Does the Heavy Lifting:** It scours data, refines it, and trains your agent. 57 | 3. **Meet Your Agent:** A fully autonomous helper, ready to roll and evolve. 58 | 59 | No coding, no fuss—just a sentence, and you’ve got a custom AI. 60 | 61 | --- 62 | 63 | ## Why This Matters 64 | - **Anyone Can Play:** From kids to CEOs, building AI is now a breeze. 65 | - **Built on Trust:** Transparency and community feedback mean no shady surprises. 66 | - **Endless Possibilities:** Agents grow smarter as the network thrives. 67 | 68 | Think of a teacher prompting, "Create an AI to grade essays," and getting a reliable assistant overnight—cheap, fair, and open for all to improve. 69 | 70 | --- 71 | 72 | ## The Future Is Now 73 | OptimAI Agents aren’t just AI—they’re a movement. With decentralized data and prompt engineering, the OptimAI Network hands you the keys to create, own, and evolve AI that’s autonomous, ethical, and accessible. This isn’t tech for the few; it’s tech for the world. 74 | 75 | **Dive In:** [OptimAI Network Data Network Overview](https://optimai.network/data-network) -------------------------------------------------------------------------------- /docs/optimai-node/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "OptimAI Node", 3 | "position": 5, 4 | "link": { 5 | "type": "generated-index", 6 | "description": "One Network, All Platforms. Run an OptimAI Node that fuels AI and multiplies your rewards." 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /docs/optimai-node/core-node.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 5 3 | title: "OptimAI Core Node" 4 | --- 5 | 6 | # OptimAI Core Node 7 | 8 | :::tip[Overview] 9 | The **OptimAI Core Node** is the most comprehensive option for engaging with the OptimAI Network. It supports all available tasks and features, making it perfect for users who want to dive deep into the network’s capabilities. This node is designed for flexibility and power, catering to both general users and developers. 10 | ::: 11 | 12 | ## Installation (Coming soon) 13 | 14 | The OptimAI Core Node can be installed as a desktop application or accessed via a command-line interface (CLI). Choose the option that suits your needs. 15 | 16 | ## Available Tasks 17 | 18 | The OptimAI Core Node unlocks a wide range of tasks for users to contribute to the network: 19 | 20 | - **DePIN Tasks:** Participate in decentralized physical infrastructure network (DePIN) activities, supporting the backbone of the OptimAI ecosystem. 21 | - **Data Tasks:** Engage in data-related activities, including collection, validation, and processing, to enhance the network’s data capabilities. 22 | 23 | ## Supported Platforms 24 | 25 | - **Desktop App:** Compatible with Windows 10+, MacOS 12+, and Ubuntu 20+. 26 | - **CLI:** Available for developers on the supported operating systems listed above. 27 | 28 | --- 29 | 30 | ## OptimAI Core Node: The Power of Built-in Browser in OptimAI DePIN Nodes 31 | At the heart of the OptimAI Network lies our revolutionary **Integrated Browser Node**—a fusion of a node and a built-in web browser designed to seamlessly support the **autonomous AI Agent revolution**. This integration transforms the way data is gathered, utilized, and continuously fed into AI models, paving the way for **truly self-improving AI systems accessible to everyone**. 32 | 33 | Unlike traditional methods of AI training, which rely on **static datasets and centralized data control**, the **OptimAI Browser Node** enables **real-time, dynamic, and contextually rich data streams** that can adapt **as users interact with the digital world**. By **eliminating barriers to high-quality, real-world data**, this technology accelerates AI development, **making personalized, autonomous AI Agents a reality**. 34 | 35 | ![OptimAI Node: Built-in Browser](../assets/images/core_node_browser.jpg) 36 | 37 | ## Overcoming the Limitations of Traditional Data Scraping 38 | In traditional DePIN networks, nodes receive tasks with URLs to crawl public websites like CNN, Bloomberg, Wikipedia, and YouTube, scraping as much data as possible from accessible sources. While this method collects raw data from public domains, it has significant limitations: 39 | 40 | - **Access Restriction:** Limited to publicly available data, missing out on valuable information behind authentication walls. 41 | - **Lack of Behavioural Insights:** Does not capture **user interactions, engagement patterns, or decision-making processes**, which are crucial for advanced AI models. 42 | - **Sequential Data Gaps:** Fails to collect **multi-step user actions and decision pathways**, which are necessary for training AI to perform **complex, multi-step tasks with real-world utility**. 43 | 44 | ## Unlocking Access to Closed-Source Data with Privacy-Preserving Methods 45 | Unlike traditional scraping models, **OptimAI Browser Nodes operate directly within user sessions**, allowing the **responsible and secure collection of valuable, real-world interaction data** without compromising user privacy. By utilizing **on-device processing, encryption, and anonymization**, OptimAI ensures that data remains **private, ethical, and compliant with regulations like GDPR and CCPA** while unlocking insights from: 46 | 47 | - **Social Media:** Facebook, Twitter (X), Discord, LinkedIn, Reddit, and more. 48 | - **Private Channels:** Messaging apps, private forums, Discord servers, and community groups. 49 | - **Subscription Services:** News outlets, academic journals, and specialized paywalled databases. 50 | 51 | With this **groundbreaking approach**, OptimAI **creates a new paradigm for AI training**, where AI Agents are not limited by outdated, incomplete datasets but are **continuously improving based on human-like learning from real-world interactions**. 52 | 53 | ## Capturing User Behaviour and Sequential Data for Next-Gen AI Agents 54 | To build **truly autonomous AI Agents**, capturing **context, intent, and sequential interactions** is crucial. The OptimAI Browser Node enables: 55 | 56 | - **Deep Context Awareness:** AI Agents **observe, process, and learn from real-world digital behaviors**, ensuring they understand **why** actions are taken, not just **what** actions are taken. 57 | - **Predictive Learning & Assistance:** By analyzing **patterns of user behavior**, AI Agents **anticipate actions, suggest improvements, and automate complex workflows**. 58 | - **Personalized Adaptation & Evolution:** Unlike static AI models, **OptimAI AI Agents evolve over time**, learning from real-time user interactions to **offer hyper-personalized responses and decision-making support**. 59 | 60 | ## The Breakthrough to True Autonomous AI Agents 61 | The **integration of the built-in browser within OptimAI Nodes** is the missing link in achieving the vision of **fully autonomous, adaptive AI Agents for everyone**. By bridging **real-time data streams, edge computing, and reinforcement learning**, the **OptimAI Network enables AI to evolve in ways never before possible**: 62 | 63 | - **Self-Improving AI Agents:** AI no longer depends on pre-trained models alone; it continuously refines itself through **real-world user interactions**. 64 | - **Decentralized AI Training:** No reliance on centralized entities to train AI—**users power AI evolution through their everyday activities**. 65 | - **Trustless and Transparent AI Learning:** The network ensures **data integrity, privacy, and transparency**, providing **ethical, unbiased, and community-driven AI advancements**. -------------------------------------------------------------------------------- /docs/optimai-node/edge-node.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 6 3 | title: "OptimAI Edge Node" 4 | --- 5 | 6 | # OptimAI Edge Node 7 | 8 | :::tip[Overview] 9 | The **OptimAI Edge Node** is a mobile-centric solution designed specifically for smartphones, bringing the power of the OptimAI Network to users on the go. It is tailored to leverage the unique capabilities of mobile devices, enabling seamless participation in the network. Additionally, future support is planned for IoT devices, expanding the node’s versatility. 10 | ::: 11 | 12 | ## Installation (Coming Soon) 13 | 14 | The OptimAI Edge Node will be available as a mobile app for iOS and Android devices. Support for IoT devices, such as Raspberry Pi and Jetson Nano, is also planned for future releases. 15 | 16 | - **Mobile Apps:** Installation instructions for iOS and Android will be provided upon release. 17 | - **IoT Devices:** Setup guides for Raspberry Pi and Jetson Nano will be available once support is launched. 18 | 19 | Stay tuned to the official OptimAI website or documentation for updates on availability and detailed installation steps. 20 | 21 | ![OptimAI Edge Node](../assets/images/edge-node.png) 22 | 23 | ## Available Tasks 24 | 25 | The OptimAI Edge Node enables users to contribute to the network through tasks optimized for mobile and IoT environments: 26 | 27 | - **DePIN Tasks:** Participate in decentralized physical infrastructure network (DePIN) activities, adapted for the performance and connectivity of mobile and IoT devices. 28 | - **Data Tasks:** Engage in data-related activities, such as collection and validation, leveraging device-specific capabilities like cameras, sensors, or local processing power. 29 | 30 | ## Supported Platforms 31 | 32 | - **Mobile Apps:** iOS and Android (coming soon). 33 | - **IoT Devices:** Raspberry Pi and Jetson Nano (planned for future releases). 34 | 35 | --- -------------------------------------------------------------------------------- /docs/optimai-node/how-node-working.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 2 3 | title: "How OptimAI Node Works?" 4 | --- 5 | 6 | # How OptimAI Node Works? 7 | ## Mining Data 8 | ### How It Works: 9 | - The integrated browser node collects data as you navigate the web. 10 | - It captures valuable insights, including: 11 | - Content from public and authenticated websites. 12 | - User interaction data (clicks, scrolls, navigation paths). 13 | - Sequential actions for advanced AI training. 14 | ### Your Role: 15 | - Simply use your device as you normally would. 16 | - Optionally participate in specific data collection tasks or missions. 17 | - Ensure your node remains active to maximize contributions. 18 | 19 | ### Earning Rewards (OPI Points) 20 | - Earning Mechanism: 21 | - Rewards are based on the volume and quality of data contributed. 22 | - Completing tasks and missions can earn you bonus OPI points. 23 | - Tracking Earnings: 24 | - Use your dashboard to monitor accumulated OPI rewards. 25 | - View detailed reports on your contributions and rewards. 26 | 27 | import miningVideo from '@site/docs/assets/videos/lite-node-mining.mp4'; 28 | 29 | 33 | 34 | ## Node Management 35 | - Settings: 36 | - Adjust data collection preferences. 37 | - Set bandwidth and resource usage limits. 38 | - Updates: 39 | - Keep your node software updated for optimal performance. 40 | - Enable automatic updates if available. 41 | - Notifications: 42 | - Receive alerts for important updates, tasks, or issues. 43 | - Security: 44 | - Regularly check your account security settings. 45 | - Update your password and 2FA as needed. 46 | 47 | ## Common Tasks and Missions 48 | - Daily Tasks: 49 | - Simple activities like visiting certain websites or engaging with content. 50 | - Missions: 51 | - Longer-term tasks that may involve data labeling or validation. 52 | - Quests: 53 | - Special events or challenges with higher reward potentials. 54 | - Participation: 55 | - Opt-in to tasks that interest you. 56 | - Complete tasks to earn additional rewards and bonuses. -------------------------------------------------------------------------------- /docs/optimai-node/lite-node.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 4 3 | title: "OptimAI Lite Node" 4 | --- 5 | 6 | # OptimAI Lite Node 7 | 8 | :::tip[Overview] 9 | The **OptimAI Lite Node** serves as a straightforward and accessible entry point for joining the OptimAI Network. Designed to be lightweight and minimally intrusive, it allows users to participate with ease, making it ideal for fostering a large and diverse community of contributors. 10 | ::: 11 | 12 | ## Installation 13 | 14 | The OptimAI Lite Node is available through two primary channels: browser extensions and Telegram Mini Apps. Follow the steps below to get started. 15 | 16 | ### Browser Extensions 17 | 18 | 1. **Chrome, Opera, Brave:** 19 | - Visit the [Chrome Web Store](https://chromewebstore.google.com/detail/optimai-lite-node/njlfcjdojmopagogfpjgcbnpmiknapnd). 20 | - Click "Add to Chrome" and follow the prompts to install. 21 | 22 | ![OptimAI Lite Node](../assets/images/lite-node.png) 23 | 24 | ### Telegram Mini Apps 25 | 26 | 1. **Locate the OptimAI Bot:** 27 | - Open Telegram and search for "@OptimAI_Node_Bot" or click [here](https://t.me/OptimAI_Node_Bot) to access it directly. 28 | 29 | 2. **Start the Bot:** 30 | - Tap "Start" to begin interacting with the bot. 31 | 32 | 3. **Set Up Your Node:** 33 | - Follow the bot’s guided instructions to activate your node and link it to your account. 34 | 35 | ## Available Tasks 36 | 37 | The OptimAI Lite Node supports simple yet impactful tasks that allow users to contribute to the network effortlessly: 38 | 39 | - **Contribute Network Bandwidth:** Share your unused network bandwidth to assist in data scraping tasks, helping gather valuable information for the OptimAI Network. 40 | - **Data Validation:** Participate in validating collected data to ensure its accuracy and reliability, supporting the network’s quality standards. 41 | 42 | ## Supported Platforms 43 | 44 | - **Browser Extensions:** Currently compatible with Chrome, Opera, and Brave. 45 | - **Telegram Mini Apps:** Accessible via the Telegram platform on any device supporting the app. 46 | 47 | --- -------------------------------------------------------------------------------- /docs/optimai-node/node-intro.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 1 3 | title: "What is OptimAI Node?" 4 | --- 5 | 6 | :::tip[Overview] 7 | At the core of the OptimAI Network are the Nodes—essential elements that enhance the ecosystem’s functionality, security, and scalability. By engaging as node operators, both users and developers play pivotal roles in advancing the AI revolution, directly influencing the network’s expansion and effectiveness. The OptimAI Network provides a diverse array of node types, each designed for specific tasks and capabilities. This variety ensures inclusivity and optimizes the combined potential of all participants, offering opportunities for active involvement or even earning passive income through different levels of resource contribution. 8 | ::: 9 | 10 | ## Node Tasks in OptimAI Node 11 | ### DePIN-Operation Tasks 12 | DePIN Operation Tasks in OptimAI Nodes significantly enhance the capabilities of the OptimAI Network through three critical areas: AI + Edge Computing, Data Storage, and Network-Operation Tasks. These tasks not only enhance network performance but also enable node operators to generate passive income by utilizing their idle resources, such as RAM, CPU, and GPU. The greater the hardware contribution and node availability, the higher the rewards received. This integration of technological advancements with financial incentives creates a dynamic system that propels both growth and efficiency within the OptimAI Network. 13 | #### AI + Edge Computing Tasks 14 | Nodes with advanced computing power (CPU/GPU) handle AI model training and inference tasks directly at the network's edge. AI computing on the edge reduces latency, enhances security, and increases scalability and cost-efficiency by processing data locally. 15 | #### Data Storage Tasks 16 | Nodes manage the storage of distributed data, crucial for handling large data volumes. Distributed storage scales with the network, provides fault tolerance, and ensures cost-efficient, speedy access to large data sets, supporting AI training. 17 | #### Data Request Tasks 18 | Nodes perform data scraping, collecting information from various sources. Network-Opeartion tasks like scraping improve data availability and freshness, optimize load balancing, and increase the robustness of the network infrastructure. 19 | 20 | ### Data-Operation Tasks 21 | Offer node operators the opportunity to earn OPI tokens for their contributions, with additional rewards available through specialized campaigns. Engaging in these tasks allows participants to enhance their data management and AI skills, increasing their expertise. This involvement not only advances personal development but also significantly improves the quality of AI models within the network, contributing to its overall enhancement. 22 | #### Data Mining 23 | Leverage Browser Nodes to efficiently collect data during regular internet browsing sessions, even from authenticated platforms. 24 | #### Data Cleaning and Annotation 25 | Contribute to the enhancement of data quality by eliminating redundancies, rectifying errors, and providing essential annotations. This process is vital for preparing data for machine learning models. Annotation involves labeling data accurately to make it usable for training AI, directly impacting the performance of AI systems by improving their ability to accurately interpret and process information. Through precise data annotation, AI models can better understand and interact with real-world data, making them more effective and reliable for tasks ranging from automated driving to enhanced image recognition. Common types of data annotation include: 26 | 1. **Text Annotation:** Labelling text for natural language processing tasks to help models understand language contextually. 27 | 28 | 2. **Image Annotation:** Labelling features in images, crucial for computer vision applications. 29 | 30 | 3. **Video Annotation:** Applying labels to video sequences to track objects or actions over time. 31 | 32 | 4. **Audio Annotation:** Labelling audio data for voice recognition and other audio-based AI systems. 33 | 34 | 5. **Semantic Annotation:** Assigning labels that provide context about the meaning, important for understanding beyond literal interpretation. 35 | 36 | #### Data Validation 37 | Participate in community-led validation protocol to confirm data accuracy and enhance reliability. -------------------------------------------------------------------------------- /docs/optimai-node/platforms-versions.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 3 3 | --- 4 | 5 | # Supported Platforms and Versions 6 | 7 | OptimAI Network provides multiple node types to engage with our decentralized data network. This section outlines the supported platforms and versions for each node, including installation instructions for available nodes and planned platforms for those in development. 8 | 9 | ## OptimAI Lite Node 10 | 11 | The OptimAI Lite Node is a browser extension currently supported on Google Chrome, Opera, and Brave browsers. 12 | 13 | ### Installation Steps 14 | 15 | 1. **Download the Extension:** 16 | - Visit the Chrome Web Store: [OptimAI Lite Node](https://chromewebstore.google.com/detail/optimai-lite-node/njlfcjdojmopagogfpjgcbnpmiknapnd) 17 | 18 | 2. **Install the Extension:** 19 | - Click "Add to Chrome" and follow the on-screen prompts to install. 20 | 21 | 3. **Activate the Node:** 22 | - Click the OptimAI icon in your browser toolbar. 23 | - Create an account via the OptimAI Dashboard or log in if you already have one. 24 | - Customize your settings and start mining data. 25 | 26 | ## Telegram DePIN Node 27 | 28 | The Telegram DePIN Node operates as a bot within the Telegram platform. 29 | 30 | ### Setup Steps 31 | 32 | 1. **Find the OptimAI Bot:** 33 | - Open Telegram and search for "@OptimAI_Node_Bot". 34 | - Alternatively, click [here](https://t.me/OptimAI_Node_Bot) to access the bot directly. 35 | 36 | 2. **Start the Bot:** 37 | - Click "Start" to initiate the bot. 38 | 39 | 3. **Activate Your Node:** 40 | - Follow the bot’s instructions to set up your node and account. 41 | 42 | ## OptimAI Core Node (Coming Soon) 43 | 44 | The OptimAI Core Node will be available on the following platforms: 45 | 46 | - Windows 47 | - Linux 48 | - MacOS 49 | - Command-Line Interface (CLI) for Servers 50 | 51 | ## OptimAI Edge Node (Coming Soon) 52 | 53 | The OptimAI Edge Node will be supported on: 54 | 55 | - Mobile OS: iOS and Android 56 | - IoT devices: Raspberry Pi and NVIDIA Jetson Nano 57 | 58 | **Note:** For the latest updates on the release of Core and Edge Nodes, refer to the official OptimAI website or community groups. -------------------------------------------------------------------------------- /docs/overview/_category_.json: -------------------------------------------------------------------------------- 1 | { 2 | "label": "Overview", 3 | "position": 2, 4 | "link": { 5 | "type": "generated-index", 6 | "description": "Mine Data. Fuel AI. Earn Rewards." 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /docs/overview/intro.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 1 3 | title: "OptimAI Network Introduction" 4 | --- 5 | 6 | # OptimAI Network Introduction 7 | 8 | :::tip[Overview] 9 | OptimAI Network is a revolutionary data network that transforms the way artificial intelligence is developed by redefining the concept of data mining on the web. By leveraging a Layer 2 Decentralized Physical Infrastructure Network (DePIN) Blockchain, OptimAI enables individuals to contribute to AI advancement by mining data through integrated browser nodes. Participants earn rewards in the form of OPI Tokens for their contributions, creating a decentralized, community-driven ecosystem that fuels next-generation AI agents. 10 | ::: 11 | 12 | ## Key Features 13 | - Multi-Platform Availability: OptimAI Nodes are available as browser extensions, desktop applications, mobile apps, CLI tools, and even within Telegram. 14 | - Integrated Browser Nodes: Nodes with built-in browsers allow seamless data collection from both public and authenticated websites. 15 | - Data Mining Rewards: Participants earn OPI Tokens by mining data, completing tasks, and contributing to the network. 16 | - Privacy and Security: Data is processed locally and anonymized, ensuring compliance with global privacy regulations. 17 | - Developer Empowerment: An open SDK allows developers to build custom applications and enhance the network's capabilities. 18 | 19 | ## How OptimAI Works 20 | OptimAI transforms everyday internet use into a powerful data mining operation: 21 | 1. Installation: Users install the OptimAI Node on their preferred platform. 22 | 2. Data Mining: As users browse the web, the integrated browser node collects valuable data, including user interactions and behaviors. 23 | 3. Data Processing: Collected data is anonymized and processed locally to protect user privacy. 24 | 4. Contribution: Processed data is securely transmitted to the OptimAI Network. 25 | 5. AI Advancement: The network uses the data to train and improve AI models. 26 | 6. Earning Rewards: Users receive OPI Tokens as compensation for their contributions. 27 | 28 | ## Why Choose OptimAI? 29 | - Earn While You Browse: Turn your everyday internet activities into a source of income. 30 | - Contribute to AI Innovation: Play a direct role in advancing artificial intelligence. 31 | - Flexible Participation: Choose from various node types and platforms to suit your preferences. 32 | - Secure and Private: Benefit from robust privacy measures and data security protocols. 33 | - Community-Driven: Join a global network of individuals collaborating to shape the future of AI. -------------------------------------------------------------------------------- /docs/overview/problem.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 2 3 | --- 4 | 5 | # The Key Problem 6 | 7 | :::tip[Did you know...] 8 | Artificial Intelligence (AI) holds transformative power across industries and global communities. Yet its progress is frequently stifled by key hurdles: limited access to high-quality datasets, centralized control by dominant tech entities, and the complexities of ethically obtaining and validating data. **OptimAI Network** emerges as a groundbreaking, decentralized solution to these challenges. It democratizes AI development by fostering a community-driven, privacy-centric data ecosystem that empowers everyone to contribute and benefit. 9 | ::: 10 | 11 | ## Key Challenges & Limitations of AI Development: Data Scarcity and Quality 12 | AI's transformative potential is hindered by a critical bottleneck: the scarcity of high-quality, relevant, and diverse data. Without robust datasets, AI models face limitations in performance, fairness, and reliability, impacting innovation, economic growth, and ethical development. 13 | - **Data Scarcity and Quality:** Publicly available data is often unstructured, outdated, or irrelevant, making it inadequate for domain-specific applications like healthcare or finance. Diverse, high-quality datasets are essential for effective, unbiased AI models. 14 | - **Access to Private Data:** Valuable data on private platforms (e.g., Twitter, Facebook) is difficult to access due to privacy regulations and authentication barriers, limiting personalization and innovation opportunities. 15 | - **Collection Complexity:** Traditional methods face technical hurdles, high costs, and require specialized expertise, creating barriers for small businesses and developers. 16 | - **Privacy Concerns:** Complying with regulations like GDPR and maintaining user trust is challenging but crucial for ethical and legal AI development. -------------------------------------------------------------------------------- /docs/overview/solution.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 3 3 | title: "The OptimAI Solution" 4 | --- 5 | 6 | # The OptimAI Solution 7 | 8 | ## What OptimAI Network resolve? 9 | The OptimAI Network presents a groundbreaking solution to the critical challenges hindering AI development. By leveraging innovative technology and a community-driven approach, we have created a decentralized ecosystem that fundamentally transforms how data is collected, processed, and utilized for AI. Our solution not only addresses the existing problems but also unlocks new possibilities for AI innovation, making it more accessible, efficient, and ethical. 10 | 11 | OptimAI addresses critical obstacles in AI development, providing innovative, privacy-centric solutions that unlock the potential of high-quality data for AI training. 12 | 13 | ### Data Scarcity and Quality 14 | - **Solutions:** 15 | - Converts everyday browsing into a continuous data collection opportunity. 16 | - Accesses diverse data from both public and private platforms. 17 | - Ensures data accuracy and relevance with automated cleaning and community validation. 18 | - **Impact:** 19 | - Boosts AI model performance with high-quality, diverse datasets. 20 | - Accelerates innovation by reducing barriers to obtaining essential data. 21 | 22 | ### Access to Private Data Sources 23 | - **Solutions:** 24 | - Browser Nodes securely collect data from authenticated private platforms. 25 | - Anonymization processes protect personal identifiers. 26 | - **Impact:** 27 | - Enriches AI models with contextual, nuanced data from private platforms. 28 | - Provides organizations with a competitive edge through unique insights. 29 | 30 | ### Data Collection Complexity 31 | - **Solutions:** 32 | - Simplifies user participation with an intuitive Browser Node interface. 33 | - Automates data collection, cleaning, and validation workflows. 34 | - Offers an SDK for developers to streamline custom data collection. 35 | - **Impact:** 36 | - Enables small businesses and independent developers to engage in AI development. 37 | - Frees resources for innovation and refining AI models. 38 | 39 | ### Privacy Concerns 40 | - **Solutions:** 41 | - Processes data locally to safeguard user privacy. 42 | - Adheres to global privacy laws (e.g., GDPR, CCPA). 43 | - Provides users with tools to control their data sharing preferences. 44 | - **Impact:** 45 | - Builds trust among users, increasing participation in the network. 46 | - Minimizes legal and reputational risks for organizations. -------------------------------------------------------------------------------- /docs/roadmap.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 10 3 | --- 4 | 5 | # Development Roadmap 6 | 7 | ### Stage 1: Laying the DePIN Data Network Foundation 8 | *Power the DePIN Data Network* 9 | - Contribute to Massive Data Collection: Help gather valuable information from the web and crowdsourced sources. 10 | - Build a Global Knowledge Base: Your efforts will fuel intelligent AI systems with rich, diverse data. 11 | - Share, invite friends to accelerate your contribution and rewards (referral program) 12 | 13 | ### Stage 2: Expanding the DePIN Nodes 14 | *Grow the Network Across Platforms* 15 | - Run OptimAI Nodes Anywhere: Whether on your web browser, desktop, mobile device, or even Telegram, you can operate a node. 16 | 17 | ### Stage 3: Structuring the Reinforcement Data Layer 18 | *Build the Future of AI* 19 | - Structure the Web: Aid in constructing the Reinforcement Data Layer essential for future Generative AI Agents. 20 | 21 | ### Stage 4: Supercharging the Network Computing 22 | *Supercharge the Network* 23 | - Contribute Spare Resources: Offer your unused bandwidth and idle computing power. 24 | - Accelerate AI Development: Enhance edge computing capabilities to speed up AI advancements. 25 | 26 | ### Stage 5: Scaling and securing the Network 27 | *Secure and Scale the Network* 28 | - Leverage Blockchain Technology: Utilize the speed and security of the Layer 2 EVM blockchain. 29 | - Ensure Consensus and Growth: Support massive scalability while maintaining network integrity. 30 | 31 | ### Stage 6: Building Next-Gen AI Agents 32 | *Drive Decentralized AI Learning* 33 | - Develop and Train AI Agents: Participate in creating AI that learns autonomously and adapts to complex problems. 34 | - Push the Boundaries of AI: Contribute to agents capable of unprecedented learning and problem-solving. 35 | 36 | ### Stage 7: Embracing the OptimAI Ecosystem 37 | *Redefine DePIN AI as a Service* 38 | - Build a Global Ecosystem: Help establish a worldwide OptimAI network. 39 | - Democratize AI Access: Make advanced AI technologies accessible and beneficial for everyone. -------------------------------------------------------------------------------- /docs/services.md: -------------------------------------------------------------------------------- 1 | --- 2 | sidebar_position: 6 3 | title: OptimAI Intelligence Services 4 | --- 5 | 6 | # OptimAI Intelligence Services 7 | The OptimAI Network Intelligence Services is a comprehensive suite of interconnected components designed to create a dynamic and robust environment for AI development. By seamlessly integrating data collection, processing, computation, and deployment, we provide a holistic platform that empowers users, developers, and organizations to harness the full potential of AI. This ecosystem not only addresses the current challenges in AI but also lays the groundwork for future advancements, making it a compelling proposition for our community and investors. 8 | 9 | :::tip[The key components of the OptimAI Intelligence Services includes] 10 | 1. OptimAI **Data Engine** 11 | 2. OptimAI **Compute Engine** 12 | 3. OptimAI **GenAI Agent Platform** 13 | ::: 14 | 15 | Each component plays a crucial role in the ecosystem, and together, they form a synergistic whole that is greater than the sum of its parts. 16 | 17 | ![OptimAI Intelligence Services](./assets/images/services.png) 18 | 19 | ## OptimAI Data Engine 20 | *Harnessing the Power of Data for Superior AI* 21 | ### What is the OptimAI Data Engine? 22 | The OptimAI Data Engine is the core component responsible for managing the entire lifecycle of data within the network. It oversees data collection, processing, storage, and distribution, ensuring that high-quality, relevant data is available for AI model training and deployment. 23 | 24 | #### Key Features 25 | - Data Aggregation: Collects data from various sources, including Browser Nodes, Mobile Nodes, and external datasets. 26 | - Data Processing: Cleanses, normalizes, and annotates data to ensure it meets the quality standards required for effective AI training. 27 | - Data Storage: Utilizes decentralized storage solutions for secure and scalable data retention. 28 | - Data Distribution: Facilitates efficient data access and sharing among authorized parties within the network. 29 | 30 | #### Innovative Aspects 31 | - Real-Time Data Processing: Supports streaming data for applications requiring up-to-the-minute information. 32 | - Intelligent Data Selection: Employs AI algorithms to select the most relevant data for specific model training tasks. 33 | - Privacy-Preserving Techniques: Implements federated learning and differential privacy methods to protect user data while still extracting valuable insights. 34 | 35 | ### Benefits 36 | - Enhanced AI Models: Access to high-quality, diverse datasets leads to more accurate and robust AI models. 37 | - Efficiency: Automated data pipelines reduce time-to-insight, accelerating the development cycle. 38 | - Competitive Advantage: Unique data sources provide a strategic edge in the AI marketplace. 39 | 40 | ## OptimAI Compute Engine 41 | *Unleashing Computational Power for AI Excellence* 42 | ### What is the OptimAI Compute Engine? 43 | The OptimAI Compute Engine is a decentralized computing platform that harnesses the collective processing power of the network's nodes. It enables distributed AI model training, inference, and other computational tasks, making high-performance computing accessible and cost-effective. 44 | #### Key Features 45 | - Distributed Computing: Leverages the idle computational resources of participating nodes. 46 | - Scalable Infrastructure: Automatically adjusts to workload demands, ensuring optimal performance. 47 | - GPU Acceleration: Supports GPU-enabled nodes for resource-intensive AI tasks. 48 | - Edge Computing: Performs computations closer to data sources, reducing latency and bandwidth usage. 49 | #### Innovative Aspects 50 | - Workload Balancing: Uses intelligent scheduling algorithms to distribute tasks efficiently across the network. 51 | - Energy Efficiency: Optimizes resource utilization to minimize energy consumption and environmental impact. 52 | - Fault Tolerance: Implements redundancy and checkpointing to ensure resilience against node failures. 53 | #### Benefits 54 | - Cost Savings: Reduces the need for expensive centralized servers and cloud computing services. 55 | - Performance: Accelerates AI model training and inference times. 56 | - Accessibility: Democratizes access to high-performance computing resources, enabling broader participation in AI development. 57 | 58 | ## OptimAI Network Engine 59 | *Ensuring Seamless Connectivity and Security* 60 | ### What is the OptimAI Network Engine? 61 | The OptimAI Network Engine is the communication backbone of the ecosystem. It manages data transfer, synchronization, and security across all nodes and components, ensuring that the network operates smoothly and securely. 62 | #### Key Features 63 | - High-Speed Connectivity: Utilizes optimized protocols for rapid data exchange. 64 | - Secure Communications: Implements end-to-end encryption and secure authentication mechanisms. 65 | - Network Monitoring: Provides real-time insights into network performance and health. 66 | - Scalability: Designed to handle increasing network traffic as the ecosystem grows. 67 | #### Innovative Aspects 68 | - Adaptive Routing: Dynamically selects the most efficient data paths based on network conditions. 69 | - Decentralized DNS: Employs distributed naming services to enhance reliability and censorship resistance. 70 | #### Benefits 71 | - Reliability: Ensures consistent network uptime and performance. 72 | - Security: Protects against cyber threats, safeguarding data and operations. 73 | - Efficiency: Optimizes data flow, reducing latency and improving user experience. 74 | 75 | ## OptimAI GenAI Agent Platform 76 | *Catalyzing the Next Generation of AI Applications* 77 | ### What is the OptimAI GenAI Agent Platform? 78 | The OptimAI GenAI Platform is an advanced AI development environment that provides tools and infrastructure for creating, training, and deploying next-generation AI agents and models. It leverages the collective strengths of the ecosystem to push the boundaries of what's possible in AI. 79 | #### Key Features 80 | - Model Training Suite: Offers a comprehensive suite for training AI models, including deep learning frameworks and hyperparameter tuning tools. 81 | - Pre-Trained Models: Provides access to a library of pre-trained models that can be fine-tuned for specific applications. 82 | - Deployment Tools: Facilitates the deployment of AI models across various platforms and devices. 83 | - Collaboration Spaces: Enables teams to work together on AI projects, sharing resources and expertise. 84 | #### Innovative Aspects 85 | - AutoML Capabilities: Implements automated machine learning features that lower the barrier to AI development. 86 | - Explainable AI Tools: Includes tools for interpreting and explaining AI model decisions, promoting transparency. 87 | - Ethical AI Compliance: Integrates guidelines and checks to ensure AI models adhere to ethical standards and avoid biases. 88 | #### Benefits 89 | - Accelerated Innovation: Streamlines the AI development process, reducing time from concept to deployment. 90 | - Quality Assurance: Ensures that AI models are robust, reliable, and aligned with ethical considerations. 91 | - Competitive Edge: Equips developers and organizations with cutting-edge tools to stay ahead in the AI landscape. 92 | 93 | ## Synergy Within the Ecosystem 94 | ### Creating a Self-Sustaining and Growth-Oriented Environment 95 | The components of the OptimAI Network Ecosystem are designed to interconnect seamlessly, each enhancing the functionality and value of the others. This synergy creates a self-sustaining environment where growth in one area propels advancement across the entire network. 96 | #### Data Fuels Compute 97 | - The OptimAI Data Engine provides high-quality data that powers AI model training in the OptimAI Compute Engine. 98 | - As more data becomes available, the Compute Engine can train more sophisticated models, enhancing the capabilities of the OptimAI GenAI Platform. 99 | #### Compute Enables Innovation 100 | - The Compute Engine's processing power supports developers using the OptimAI SDK, enabling them to build complex applications and services. 101 | - These innovations feed back into the ecosystem, enriching the offerings in the OptimAI Marketplace. 102 | #### Marketplace Drives Participation 103 | - The Marketplace incentivizes users and developers by providing monetization opportunities, increasing engagement and contributions to the Data and Compute Engines. 104 | - Successful applications and services attract more users, creating a positive feedback loop that fosters ecosystem growth. 105 | #### GenAI Platform Advances AI 106 | - The OptimAI GenAI Platform leverages all ecosystem components to push the frontiers of AI, developing next-generation models and agents. 107 | - Breakthroughs achieved on the GenAI Platform benefit the entire ecosystem, providing advanced tools and capabilities to all participants. 108 | -------------------------------------------------------------------------------- /docusaurus.config.ts: -------------------------------------------------------------------------------- 1 | import type * as Preset from '@docusaurus/preset-classic' 2 | import type { Config } from '@docusaurus/types' 3 | import rehypeKatex from 'rehype-katex' 4 | import remarkMath from 'remark-math' 5 | 6 | // This runs in Node.js - Don't use client-side code here (browser APIs, JSX...) 7 | 8 | const config: Config = { 9 | title: 'OptimAI Network Docs', 10 | tagline: 'Mine Data. Fuel AI. Earn Rewards.', 11 | favicon: 'img/favicon.ico', 12 | 13 | // Set the production url of your site here 14 | url: 'https:/docs.optimai.network/', 15 | // Set the // pathname under which your site is served 16 | // For GitHub pages deployment, it is often '//' 17 | baseUrl: '/', 18 | 19 | // GitHub pages deployment config. 20 | // If you aren't using GitHub pages, you don't need these. 21 | organizationName: 'OptimaiNetwork', // Usually your GitHub org/user name. 22 | projectName: 'OptimAI Network Docs', // Usually your repo name. 23 | 24 | onBrokenLinks: 'throw', 25 | onBrokenMarkdownLinks: 'warn', 26 | 27 | // Even if you don't use internationalization, you can use this field to set 28 | // useful metadata like html lang. For example, if your site is Chinese, you 29 | // may want to replace "en" with "zh-Hans". 30 | i18n: { 31 | defaultLocale: 'en', 32 | locales: ['en'], 33 | }, 34 | 35 | markdown: { 36 | mermaid: true, 37 | }, 38 | themes: ['@docusaurus/theme-mermaid'], 39 | plugins: [ 40 | 'docusaurus-plugin-sass', 41 | [ 42 | '@docusaurus/plugin-google-analytics', 43 | { 44 | trackingID: 'G-E46T1HJVX5' 45 | }, 46 | ], 47 | [ 48 | '@docusaurus/plugin-google-tag-manager', 49 | { 50 | containerId: 'GTM-WZVXXH7L' 51 | }, 52 | ], 53 | ], 54 | presets: [ 55 | [ 56 | 'classic', 57 | { 58 | docs: { 59 | // routeBasePath: '/', 60 | sidebarPath: './sidebars.ts', 61 | remarkPlugins: [remarkMath], 62 | rehypePlugins: [rehypeKatex], 63 | // Please change this to your repo. 64 | // Remove this to remove the "edit this page" links. 65 | editUrl: 'https://github.com/optimainetwork/docs/tree/main/', 66 | }, 67 | theme: { 68 | customCss: './src/styles/index.scss', 69 | }, 70 | } satisfies Preset.Options, 71 | ], 72 | ], 73 | 74 | themeConfig: { 75 | image: 'img/social-card.png', 76 | algolia: { 77 | appId: '21H8NIK27E', 78 | apiKey: '2764b00b42701493a032fe50aab6c8f4', 79 | indexName: 'optimai', 80 | 81 | contextualSearch: true, 82 | externalUrlRegex: 'external\\.com|domain\\.com', 83 | // replaceSearchResultPathname: { 84 | // from: '/docs/', // or as RegExp: /\/docs\// 85 | // to: '/', 86 | // }, 87 | 88 | // Optional: Algolia search parameters 89 | searchParameters: {}, 90 | searchPagePath: 'search', 91 | insights: false, 92 | }, 93 | 94 | colorMode: { 95 | defaultMode: 'dark', 96 | disableSwitch: true, 97 | respectPrefersColorScheme: false, 98 | }, 99 | 100 | navbar: { 101 | logo: { 102 | alt: 'OptimAI Network Logo', 103 | src: 'img/branding/optimai-documentation-logo.svg', 104 | }, 105 | items: [ 106 | { 107 | href: 'https://github.com/optimainetwork/docs', 108 | label: 'GitHub', 109 | position: 'right', 110 | className: 'navbar__item--github', 111 | }, 112 | ], 113 | }, 114 | footer: { 115 | style: 'dark', 116 | logo: { 117 | src: 'img/branding/optimai-documentation-logo.svg', 118 | alt: 'OptimAI Network Logo', 119 | href: 'https://optimai.network', 120 | }, 121 | links: [ 122 | { 123 | title: 'OptimAI Network', 124 | items: [ 125 | { 126 | label: 'Website', 127 | href: 'https://optimai.network/', 128 | }, 129 | { 130 | label: 'Whitepaper', 131 | href: 'https://optimai.network/files/OptimAI-Whitepaper-v1.pdf', 132 | }, 133 | ], 134 | }, 135 | { 136 | title: 'Community', 137 | items: [ 138 | { 139 | label: 'Telegram', 140 | href: 'https://t.me/OptimAINetwork', 141 | }, 142 | { 143 | label: 'X', 144 | href: 'https://x.com/OptimaiNetwork', 145 | }, 146 | ], 147 | }, 148 | { 149 | title: 'More', 150 | items: [ 151 | { 152 | label: 'Blog', 153 | href: 'https://optimai.network/blog', 154 | }, 155 | { 156 | label: 'GitHub', 157 | href: 'https://github.com/optimainetwork/', 158 | }, 159 | ], 160 | }, 161 | ], 162 | copyright: `Copyright © ${new Date().getFullYear()} OptimAI Network.`, 163 | }, 164 | metadata: [ 165 | { name: 'twitter:card', content: 'summary_large_image' }, 166 | { name: 'twitter:title', content: 'OptimAI Network Docs' }, 167 | { name: 'twitter:description', content: 'Official documentation for the OptimAI Network.' }, 168 | { name: 'twitter:image', content: 'https://docs.optimai.network/img/social-card.png' }, 169 | 170 | { property: 'og:title', content: 'OptimAI Network Docs' }, 171 | { property: 'og:description', content: 'Official documentation for the OptimAI Network.' }, 172 | { property: 'og:image', content: 'https://docs.optimai.network/img/social-card.png' }, 173 | { property: 'og:url', content: 'https://docs.optimai.network' }, 174 | ], 175 | } satisfies Preset.ThemeConfig, 176 | } 177 | 178 | export default config 179 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "optimai-network-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.7.0", 19 | "@docusaurus/plugin-google-analytics": "^3.7.0", 20 | "@docusaurus/plugin-google-tag-manager": "^3.7.0", 21 | "@docusaurus/preset-classic": "3.7.0", 22 | "@docusaurus/theme-mermaid": "^3.7.0", 23 | "@docusaurus/theme-search-algolia": "^3.7.0", 24 | "@mdx-js/react": "^3.0.0", 25 | "clsx": "^2.0.0", 26 | "docusaurus-plugin-sass": "^0.2.6", 27 | "prism-react-renderer": "^2.3.0", 28 | "react": "^19.0.0", 29 | "react-dom": "^19.0.0", 30 | "react-player": "^2.16.0", 31 | "rehype-katex": "^7.0.1", 32 | "remark-math": "^6.0.0", 33 | "sass": "^1.85.1" 34 | }, 35 | "devDependencies": { 36 | "@docusaurus/module-type-aliases": "3.7.0", 37 | "@docusaurus/tsconfig": "3.7.0", 38 | "@docusaurus/types": "3.7.0", 39 | "typescript": "~5.6.2" 40 | }, 41 | "browserslist": { 42 | "production": [ 43 | ">0.5%", 44 | "not dead", 45 | "not op_mini all" 46 | ], 47 | "development": [ 48 | "last 3 chrome version", 49 | "last 3 firefox version", 50 | "last 5 safari version" 51 | ] 52 | }, 53 | "engines": { 54 | "node": ">=18.0" 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /sidebars.ts: -------------------------------------------------------------------------------- 1 | import type { SidebarsConfig } from '@docusaurus/plugin-content-docs'; 2 | 3 | const defaultSidebars: SidebarsConfig = { 4 | // Default: Automatically generate the sidebar based on the file structure 5 | tutorialSidebar: [{ type: 'autogenerated', dirName: '.' }], 6 | }; 7 | 8 | const sidebars: SidebarsConfig = { 9 | tutorialSidebar: [ 10 | { 11 | type: 'category', 12 | label: 'Overview', 13 | collapsed: true, 14 | items: [{ type: 'autogenerated', dirName: 'overview' }], 15 | }, 16 | { 17 | type: 'doc', 18 | id: 'intro', 19 | }, 20 | { 21 | type: 'doc', 22 | id: 'data-network', // Direct link to a doc 23 | }, 24 | { 25 | type: 'doc', 26 | id: 'architecture', 27 | }, 28 | { 29 | type: 'category', 30 | label: 'OptimAI Node', 31 | collapsed: true, 32 | items: [{ type: 'autogenerated', dirName: 'optimai-node' }], 33 | }, 34 | { 35 | type: 'doc', 36 | id: 'services', 37 | }, 38 | { 39 | type: 'doc', 40 | id: 'optimai-agent', 41 | }, 42 | { 43 | type: 'doc', 44 | id: 'opi-token', 45 | }, 46 | { 47 | type: 'doc', 48 | id: 'roadmap', 49 | }, 50 | { 51 | type: 'doc', 52 | id: 'faqs', 53 | }, 54 | { 55 | type: 'doc', 56 | id: 'litepaper', 57 | }, 58 | { 59 | type: 'category', 60 | label: 'Resources', 61 | collapsed: false, 62 | items: [ 63 | { 64 | type: 'link', 65 | label: 'OptimAI Lite Node - Chrome Extension', 66 | href: 'https://chromewebstore.google.com/detail/optimai-lite-node/njlfcjdojmopagogfpjgcbnpmiknapnd', 67 | }, 68 | { 69 | type: 'link', 70 | label: 'OptimAI Lite Node - Telegram Mini-App', 71 | href: 'https://t.me/OptimAI_Node_Bot', 72 | }, 73 | { 74 | type: 'link', 75 | label: 'OptimAI Whitepaper', 76 | href: 'https://optimai.network/files/OptimAI-Whitepaper-v1.pdf', 77 | }, 78 | ], 79 | }, 80 | ], 81 | }; 82 | 83 | export default sidebars; 84 | -------------------------------------------------------------------------------- /src/components/ImageWithCaption.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export default function ImageWithCaption({ 4 | src, 5 | alt, 6 | caption, 7 | width = "100%", 8 | }: { 9 | src: string; 10 | alt: string; 11 | caption: string; 12 | width?: string; 13 | }) { 14 | return ( 15 |
16 | {alt} 17 |
18 | {caption} 19 |
20 |
21 | ); 22 | } 23 | -------------------------------------------------------------------------------- /src/hooks/useIsomorphicLayoutEffect.ts: -------------------------------------------------------------------------------- 1 | import { useEffect, useLayoutEffect } from 'react' 2 | 3 | export const useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect 4 | -------------------------------------------------------------------------------- /src/hooks/useMediaQuery.ts: -------------------------------------------------------------------------------- 1 | import { useIsomorphicLayoutEffect } from '@site/src/hooks/useIsomorphicLayoutEffect' 2 | import { useState } from 'react' 3 | 4 | type UseMediaQueryOptions = { 5 | defaultValue?: boolean 6 | initializeWithValue?: boolean 7 | } 8 | 9 | const IS_SERVER = typeof window === 'undefined' 10 | 11 | export function useMediaQuery( 12 | query: string, 13 | { defaultValue = false, initializeWithValue = true }: UseMediaQueryOptions = {} 14 | ): boolean { 15 | const getMatches = (query: string): boolean => { 16 | if (IS_SERVER) { 17 | return defaultValue 18 | } 19 | return window.matchMedia(query).matches 20 | } 21 | 22 | const [matches, setMatches] = useState(() => { 23 | if (initializeWithValue) { 24 | return getMatches(query) 25 | } 26 | return defaultValue 27 | }) 28 | 29 | // Handles the change event of the media query. 30 | function handleChange() { 31 | setMatches(getMatches(query)) 32 | } 33 | 34 | useIsomorphicLayoutEffect(() => { 35 | const matchMedia = window.matchMedia(query) 36 | 37 | // Triggered at the first client-side load and if query changes 38 | handleChange() 39 | 40 | // Use deprecated `addListener` and `removeListener` to support Safari < 14 (#135) 41 | if (matchMedia.addListener) { 42 | matchMedia.addListener(handleChange) 43 | } else { 44 | matchMedia.addEventListener('change', handleChange) 45 | } 46 | 47 | return () => { 48 | if (matchMedia.removeListener) { 49 | matchMedia.removeListener(handleChange) 50 | } else { 51 | matchMedia.removeEventListener('change', handleChange) 52 | } 53 | } 54 | }, [query]) 55 | 56 | return matches 57 | } 58 | -------------------------------------------------------------------------------- /src/pages/index.module.css: -------------------------------------------------------------------------------- 1 | .heroBanner { 2 | position: relative; 3 | width: 100%; 4 | height: 100vh; 5 | overflow: hidden; 6 | display: flex; 7 | align-items: center; 8 | justify-content: center; 9 | } 10 | 11 | .videoContainer { 12 | position: absolute; 13 | top: 0; 14 | left: 0; 15 | width: 100%; 16 | height: 100%; 17 | z-index: 0; 18 | } 19 | 20 | .fullscreenVideo { 21 | width: 100%; 22 | height: 100%; 23 | object-fit: cover; 24 | } 25 | 26 | .contentFrame { 27 | position: relative; 28 | z-index: 1; 29 | background: rgba(0, 0, 0, 0.6); 30 | backdrop-filter: blur(8px); /* Adds a blur effect */ 31 | border-radius: 16px; 32 | padding: 3rem 4rem; 33 | max-width: 800px; 34 | text-align: center; 35 | box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3); 36 | } 37 | 38 | .heroTitle { 39 | font-size: 3rem; 40 | font-weight: 600; 41 | color: white; 42 | margin-bottom: 0.5rem; 43 | } 44 | 45 | .heroSubtitle { 46 | font-size: 1.75rem; 47 | font-weight: 400; 48 | color: #a6e22e; 49 | margin-bottom: 1rem; 50 | } 51 | 52 | .heroDescription { 53 | font-size: 1.2rem; 54 | color: white; 55 | margin-bottom: 2rem; 56 | } 57 | 58 | .buttons { 59 | display: flex; 60 | align-items: center; 61 | justify-content: center; 62 | } 63 | 64 | .customButton { 65 | background: rgba(255, 255, 255, 0.2); 66 | border: 1px solid rgba(255, 255, 255, 0.5); 67 | color: white; 68 | padding: 0.8rem 2rem; 69 | border-radius: 12px; 70 | font-size: 1rem; 71 | font-weight: 600; 72 | text-transform: uppercase; 73 | text-decoration: none; 74 | transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease; 75 | } 76 | 77 | .customButton:hover { 78 | background: rgba(255, 255, 255, 0.4); 79 | color: #000; 80 | transform: translateY(-3px); 81 | } 82 | -------------------------------------------------------------------------------- /src/pages/index.tsx: -------------------------------------------------------------------------------- 1 | import type { ReactNode } from 'react'; 2 | import { Redirect } from '@docusaurus/router'; 3 | 4 | export default function Home(): JSX.Element { 5 | return ; 6 | } 7 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /src/styles/admonition.scss: -------------------------------------------------------------------------------- 1 | @use '@site/src/styles/common/color.scss' as *; 2 | @use '@site/src/styles/common/media.scss' as *; 3 | 4 | .alert { 5 | position: relative; 6 | padding: 2rem 2rem 2rem 2.4rem; 7 | border: none; 8 | border-radius: 1.2rem; 9 | overflow: hidden; 10 | color: rgba(white, 0.8); 11 | --border-color: rgba(255, 255, 255, 0.3); 12 | --ifm-heading-line-height: 1.63; 13 | 14 | &::before { 15 | content: ''; 16 | position: absolute; 17 | top: 0; 18 | left: 0; 19 | width: 0.4rem; 20 | height: 100%; 21 | background: var(--border-color); 22 | } 23 | 24 | strong { 25 | color: white; 26 | } 27 | } 28 | 29 | .alert--secondary { 30 | --border-color: rgba(255, 255, 255, 0.3); 31 | background-color: rgba(255, 255, 255, 0.1); 32 | } 33 | 34 | .alert--success { 35 | background-color: rgba($accent, 0.8); 36 | --border-color: linear-gradient(90deg, #f6f655 0%, #5eed87 100%); 37 | } 38 | 39 | .alert--info { 40 | background-color: rgba($background, 0.8); 41 | --border-color: white; 42 | } 43 | 44 | .alert--warning { 45 | background-color: rgba(205, 177, 80, 0.05); 46 | --border-color: #cdb150; 47 | } 48 | 49 | .alert--danger { 50 | background-color: rgba(241, 65, 88, 0.1); 51 | --border-color: #f14158; 52 | } 53 | -------------------------------------------------------------------------------- /src/styles/breadcrumb.scss: -------------------------------------------------------------------------------- 1 | @use './common/color.scss' as *; 2 | @use './common/media.scss' as *; 3 | 4 | .theme-doc-breadcrumbs { 5 | @include xl { 6 | --margin-bottom: 3.2rem !important; 7 | } 8 | } 9 | 10 | .breadcrumbs { 11 | display: flex; 12 | align-items: center; 13 | gap: 1.2rem; 14 | } 15 | 16 | .breadcrumbs__item { 17 | display: inline-flex; 18 | align-items: center; 19 | flex-shrink: 0; 20 | gap: 1.2rem; 21 | } 22 | 23 | .breadcrumbs__item:not(:last-child):after { 24 | background: url('data:image/svg+xml,'); 25 | width: 1.6rem; 26 | height: 1.6rem; 27 | filter: none; 28 | } 29 | 30 | .breadcrumbs__item--home { 31 | .breadcrumbs__link { 32 | padding: 0; 33 | background-color: transparent; 34 | 35 | &:hover { 36 | background-color: transparent !important; 37 | } 38 | } 39 | } 40 | 41 | .breadcrumbs__item--active { 42 | .breadcrumbs__link { 43 | border-color: rgba(white, 0.1); 44 | background-color: rgba($secondary, 0.6); 45 | color: white; 46 | } 47 | } 48 | 49 | .breadcrumbs__link { 50 | border-radius: 5.6rem; 51 | display: flex; 52 | align-items: center; 53 | justify-content: center; 54 | height: 3.6rem; 55 | padding: 0 1.2rem; 56 | font-size: 1.4rem; 57 | line-height: normal; 58 | color: rgba(white, 0.5); 59 | border: 1px solid transparent; 60 | background-color: rgba($secondary, 0.6); 61 | 62 | &:hover { 63 | --ifm-breadcrumb-item-background-active: #{rgba($secondary, 0.8)}; 64 | color: white; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /src/styles/common/color.scss: -------------------------------------------------------------------------------- 1 | $background: #121614; 2 | $secondary: #242926; 3 | $accent: #313532; 4 | $muted-background: #71717a; 5 | $gradient: linear-gradient(90deg, #f6f655 0%, #5eed87 100%); 6 | $radial-05: radial-gradient(119.09% 136.65% at 2.81% 0%, rgba(228, 228, 231, 0.05) 0%, rgba(115, 115, 115, 0.05) 100%); 7 | -------------------------------------------------------------------------------- /src/styles/common/index.scss: -------------------------------------------------------------------------------- 1 | @use './color.scss' as *; 2 | @use './media.scss' as *; 3 | -------------------------------------------------------------------------------- /src/styles/common/media.scss: -------------------------------------------------------------------------------- 1 | @use 'sass:map'; 2 | @use 'sass:string'; 3 | 4 | // Định nghĩa breakpoints với !default để có thể ghi đè nếu cần 5 | $breakpoints: ( 6 | md: 768px, 7 | lg: 997px, 8 | xl: 1280px, 9 | ) !default; 10 | 11 | // Hàm lấy giá trị từ breakpoints 12 | @function get-breakpoint($key) { 13 | @if map.has-key($breakpoints, $key) { 14 | @return map.get($breakpoints, $key); 15 | } 16 | @return $key; // Nếu không tìm thấy, trả về giá trị raw (px, em, rem...) 17 | } 18 | 19 | // Mixin media query nâng cao 20 | @mixin media($queries...) { 21 | $media-query: ''; 22 | 23 | @each $query in $queries { 24 | $operator: string.slice($query, 1, 1); 25 | $value: string.slice($query, 2); 26 | 27 | @if $media-query == '' { 28 | // First condition doesn't need the "and" prefix 29 | @if $operator == '>' { 30 | $media-query: '(min-width: #{get-breakpoint($value)})'; 31 | } @else if $operator == '<' { 32 | $media-query: '(max-width: #{get-breakpoint($value) - 1px})'; 33 | } 34 | } @else { 35 | // Additional conditions need "and" prefix 36 | @if $operator == '>' { 37 | $media-query: '#{$media-query} and (min-width: #{get-breakpoint($value)})'; 38 | } @else if $operator == '<' { 39 | $media-query: '#{$media-query} and (max-width: #{get-breakpoint($value) - 1px})'; 40 | } 41 | } 42 | } 43 | 44 | @media #{$media-query} { 45 | @content; 46 | } 47 | } 48 | 49 | @mixin md { 50 | @include media('>md') { 51 | @content; 52 | } 53 | } 54 | 55 | @mixin lg { 56 | @include media('>lg') { 57 | @content; 58 | } 59 | } 60 | 61 | @mixin xl { 62 | @include media('>xl') { 63 | @content; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/styles/container.scss: -------------------------------------------------------------------------------- 1 | @use './common/color.scss' as *; 2 | @use './common/media.scss' as *; 3 | 4 | .container { 5 | padding: 0rem 2rem; 6 | 7 | @include xl { 8 | padding: 0rem 2.4rem; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/styles/fonts.scss: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap'); 2 | 3 | @font-face { 4 | font-family: 'Actual'; 5 | src: url('/fonts/actual.otf') format('otf'); 6 | } 7 | -------------------------------------------------------------------------------- /src/styles/footer.scss: -------------------------------------------------------------------------------- 1 | @use './common/color.scss' as *; 2 | @use './common/media.scss' as *; 3 | 4 | .footer { 5 | background-color: $background; 6 | padding: 2.4rem 2rem; 7 | position: relative; 8 | 9 | @include xl { 10 | padding: 3.2rem 4rem; 11 | } 12 | } 13 | 14 | .footer__inner { 15 | display: grid; 16 | gap: 2.4rem; 17 | 18 | @include md { 19 | grid-template-columns: 1fr 1fr; 20 | column-gap: 20rem; 21 | } 22 | 23 | @include xl { 24 | grid-template-columns: 1fr auto; 25 | column-gap: 12rem; 26 | } 27 | } 28 | 29 | .footer__logo { 30 | height: 3.2rem; 31 | 32 | @include xl { 33 | height: 4rem; 34 | } 35 | } 36 | 37 | .footer__links { 38 | display: grid; 39 | gap: 4rem; 40 | grid-row-start: span 2; 41 | 42 | @include xl { 43 | grid-template-columns: repeat(3, 18.4rem); 44 | column-gap: 12rem; 45 | } 46 | } 47 | 48 | .footer__col { 49 | margin: 0; 50 | display: flex; 51 | flex-direction: column; 52 | gap: 1.2rem; 53 | } 54 | 55 | .footer__title { 56 | margin: 0; 57 | font-size: 1.6rem; 58 | line-height: 1.5; 59 | color: white; 60 | font-weight: 600; 61 | 62 | @include xl { 63 | font-size: 1.8rem; 64 | } 65 | } 66 | 67 | .footer__items { 68 | display: flex; 69 | flex-direction: column; 70 | gap: 1.2rem; 71 | } 72 | 73 | .footer__link-item { 74 | font-size: 1.6rem; 75 | line-height: 1.5; 76 | font-weight: 400; 77 | width: 100%; 78 | display: flex; 79 | align-items: center; 80 | justify-content: space-between; 81 | 82 | &:hover { 83 | color: #b9f167; 84 | text-decoration: none; 85 | } 86 | 87 | @include xl { 88 | font-size: 1.8rem; 89 | } 90 | } 91 | 92 | .footer__copyright { 93 | font-size: 1.4rem; 94 | line-height: 1.5; 95 | font-weight: 400; 96 | color: white; 97 | opacity: 0.5; 98 | 99 | @include md { 100 | align-content: end; 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /src/styles/index.scss: -------------------------------------------------------------------------------- 1 | @use './variables.scss'; 2 | @use './fonts.scss'; 3 | @use './reset.scss'; 4 | @use './container.scss'; 5 | @use './nav.scss'; 6 | @use './sidebar.scss'; 7 | @use './footer.scss'; 8 | @use './search-modal.scss'; 9 | @use './breadcrumb.scss'; 10 | @use './toc.scss'; 11 | @use './markdown.scss'; 12 | @use './pagination.scss'; 13 | @use './admonition.scss'; 14 | -------------------------------------------------------------------------------- /src/styles/markdown.scss: -------------------------------------------------------------------------------- 1 | @use '@site/src/styles/common/color.scss' as *; 2 | @use '@site/src/styles/common/media.scss' as *; 3 | 4 | .markdown { 5 | --ifm-heading-line-height: 2; 6 | --ifm-leading-desktop: 1.5; 7 | color: rgba(white, 0.8); 8 | line-height: var(--ifm-heading-line-height); 9 | 10 | h1, 11 | h2, 12 | h3, 13 | h4, 14 | h5 { 15 | color: white; 16 | line-height: 1.5; 17 | } 18 | 19 | h1 { 20 | font-size: 2.4rem; 21 | } 22 | 23 | h2 { 24 | font-size: 2rem; 25 | } 26 | 27 | h3 { 28 | font-size: 1.8rem; 29 | } 30 | 31 | p { 32 | font-size: 1.4rem; 33 | } 34 | code { 35 | font-size: 1.4rem; 36 | } 37 | 38 | li + li { 39 | margin-top: 0.6rem; 40 | } 41 | 42 | li { 43 | ul { 44 | margin-top: 0.4rem; 45 | } 46 | } 47 | 48 | p:has(+ h2) { 49 | margin-bottom: 0; 50 | } 51 | 52 | table { 53 | --ifm-table-border-color: rgba(255, 255, 255, 0.08); 54 | border-radius: 0.8rem; 55 | overflow: hidden; 56 | color: white; 57 | 58 | thead { 59 | tr { 60 | background-color: rgba($secondary, 0.6); 61 | } 62 | } 63 | tbody { 64 | tr { 65 | background-color: $accent; 66 | } 67 | } 68 | } 69 | } 70 | 71 | @include xl { 72 | .markdown { 73 | h1 { 74 | font-size: 3.2rem; 75 | } 76 | 77 | h2 { 78 | font-size: 2.8rem; 79 | } 80 | 81 | h3 { 82 | font-size: 2.4rem; 83 | } 84 | 85 | h4 { 86 | font-size: 2rem; 87 | } 88 | 89 | p { 90 | font-size: 1.6rem; 91 | } 92 | 93 | code { 94 | font-size: 1.6rem; 95 | } 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /src/styles/nav.scss: -------------------------------------------------------------------------------- 1 | @use './common/color.scss' as *; 2 | @use './common/media.scss' as *; 3 | 4 | .navbar { 5 | height: var(--ifm-navbar-height); 6 | padding: 0; 7 | background-color: transparent; 8 | } 9 | 10 | .navbar__inner { 11 | height: 100%; 12 | padding: 0 1.6rem; 13 | align-items: center; 14 | backdrop-filter: blur(50px); 15 | background-color: rgba($background, 0.6); 16 | 17 | @include xl { 18 | padding-right: 4rem; 19 | padding-left: 4rem; 20 | } 21 | } 22 | 23 | .navbar__toggle { 24 | margin-right: 1.6rem; 25 | 26 | svg { 27 | width: 2.4rem; 28 | height: 2.4rem; 29 | } 30 | } 31 | 32 | .navbar-sidebar__brand { 33 | padding: 2rem 1.6rem 0.4rem; 34 | } 35 | 36 | .navbar__logo { 37 | height: 2.8rem; 38 | 39 | @include lg { 40 | height: 4rem; 41 | } 42 | } 43 | 44 | .navbar__items--right { 45 | gap: 0.8rem; 46 | } 47 | 48 | .navbar__item { 49 | &.navbar__item--github { 50 | display: block; 51 | width: 12.6rem; 52 | height: 4.4rem; 53 | background-image: $gradient; 54 | color: black; 55 | font-size: 1.6rem; 56 | line-height: 2rem; 57 | font-weight: 500; 58 | border-radius: 0.8rem; 59 | display: flex; 60 | align-items: center; 61 | justify-content: center; 62 | gap: 0.8rem; 63 | order: 1; 64 | box-shadow: 0px -5px 10px 0px rgba(255, 255, 255, 0.3) inset; 65 | 66 | &:hover { 67 | background-image: linear-gradient(0deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.3) 100%), 68 | linear-gradient(90deg, #f6f655 0%, #5eed87 100%); 69 | } 70 | 71 | @include xl { 72 | width: 20rem; 73 | } 74 | } 75 | } 76 | 77 | .navbarSearchContainer_Bca1 { 78 | position: unset !important; 79 | 80 | .DocSearch-Button { 81 | height: 4.4rem; 82 | min-width: 4.4rem; 83 | justify-content: center; 84 | border: 1px solid rgba($accent, 0.8); 85 | background-color: rgba($accent, 0.8); 86 | border-radius: 0.8rem; 87 | transition-property: background-color, border-color; 88 | transition-duration: 0.2s; 89 | transition-timing-function: ease-in-out; 90 | 91 | @include md { 92 | min-width: 20rem; 93 | justify-content: start; 94 | gap: 1.2rem; 95 | padding: 0 1.6rem; 96 | } 97 | 98 | @include xl { 99 | min-width: 40rem; 100 | } 101 | 102 | &:active, 103 | &:focus, 104 | &:hover { 105 | border-color: rgba(white, 0.2); 106 | background-color: rgba($accent, 0.9); 107 | box-shadow: none; 108 | } 109 | } 110 | 111 | .DocSearch-Search-Icon { 112 | width: 2.4rem; 113 | height: 2.4rem; 114 | } 115 | 116 | .DocSearch-Button-Placeholder { 117 | font-size: 1.6rem; 118 | line-height: 1.63; 119 | font-weight: 400; 120 | color: $muted-background; 121 | } 122 | 123 | .DocSearch-Button-Keys { 124 | display: none; 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /src/styles/pagination.scss: -------------------------------------------------------------------------------- 1 | @use './common/color.scss' as *; 2 | @use './common/media.scss' as *; 3 | 4 | .pagination-nav { 5 | gap: 1.2rem; 6 | margin-top: 2.4rem; 7 | min-height: 4.4rem; 8 | } 9 | 10 | .pagination-nav__link { 11 | height: 100%; 12 | display: flex; 13 | flex-direction: column; 14 | align-items: center; 15 | justify-content: center; 16 | gap: 0.4rem; 17 | border-radius: 0.8rem; 18 | border: 0.1rem solid rgba(white, 0.1); 19 | background-color: rgba($accent, 0.1); 20 | box-shadow: 0px 0px 4px 0px rgba(255, 255, 255, 0.12) inset; 21 | 22 | &:hover { 23 | border-color: rgba(white, 0.1); 24 | background-color: rgba($accent, 0.3); 25 | 26 | .pagination-nav__sublabel { 27 | opacity: 1; 28 | } 29 | } 30 | } 31 | 32 | .pagination-nav__sublabel { 33 | display: flex; 34 | align-items: center; 35 | justify-content: center; 36 | gap: 0.4rem; 37 | margin-bottom: 0; 38 | color: white; 39 | opacity: 0.8; 40 | 41 | span { 42 | font-size: 1.4rem; 43 | font-weight: 400; 44 | line-height: 1.5; 45 | } 46 | 47 | svg { 48 | display: block; 49 | transform: translateY(1px); 50 | } 51 | } 52 | 53 | .pagination-nav__label { 54 | display: none; 55 | } 56 | 57 | .pagination-nav__label { 58 | &::after, 59 | &::before { 60 | display: none; 61 | } 62 | 63 | span { 64 | font-size: 1.6rem; 65 | font-weight: 500; 66 | line-height: 1.5; 67 | } 68 | 69 | svg { 70 | display: block; 71 | transform: translateY(1px); 72 | } 73 | } 74 | 75 | @include md { 76 | .pagination-nav__link { 77 | padding: 1rem 1.6rem; 78 | } 79 | 80 | .pagination-nav__link--prev { 81 | align-items: start; 82 | } 83 | 84 | .pagination-nav__link--next { 85 | align-items: end; 86 | } 87 | 88 | .pagination-nav__sublabel { 89 | font-size: 1.4rem; 90 | svg { 91 | display: none; 92 | } 93 | } 94 | 95 | .pagination-nav__label { 96 | display: flex; 97 | align-items: center; 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /src/styles/reset.scss: -------------------------------------------------------------------------------- 1 | html { 2 | background-color: #0f0f0f; 3 | } 4 | 5 | body { 6 | font-size: 1.6rem; 7 | line-height: 1.5; 8 | background-color: #0f0f0f; 9 | } 10 | -------------------------------------------------------------------------------- /src/styles/search-modal.scss: -------------------------------------------------------------------------------- 1 | @use './common/color.scss' as *; 2 | @use './common/media.scss' as *; 3 | 4 | .DocSearch-Container { 5 | --docsearch-modal-background: #{$background}; 6 | --docsearch-muted-color: white; 7 | --docsearch-highlight-color: #5eed87; 8 | --docsearch-hit-height: 6rem; 9 | 10 | background-color: rgba(black, 0.8) !important; 11 | 12 | .DocSearch-SearchBar { 13 | padding-bottom: 0.8rem; 14 | background-color: $background; 15 | border-top-right-radius: 0.8rem; 16 | border-top-left-radius: 0.8rem; 17 | } 18 | 19 | .DocSearch-Modal { 20 | background-color: $background; 21 | box-shadow: none; 22 | } 23 | 24 | .DocSearch-Form { 25 | height: 4.4rem; 26 | background-color: rgba($accent, 0.8); 27 | box-shadow: none; 28 | padding: 0 1.6rem; 29 | border-radius: 0.8rem; 30 | } 31 | 32 | .DocSearch-MagnifierLabel { 33 | color: white; 34 | width: 2.4rem; 35 | height: 2.4rem; 36 | 37 | svg { 38 | width: 2rem; 39 | height: 2rem; 40 | } 41 | } 42 | 43 | .DocSearch-Input { 44 | font-size: 1.6rem; 45 | line-height: 1.63; 46 | font-weight: 400; 47 | color: white; 48 | 49 | &::placeholder { 50 | color: rgba(white, 0.5); 51 | } 52 | } 53 | 54 | .DocSearch-Help { 55 | font-size: 1.4rem; 56 | line-height: 1.63; 57 | color: rgba(white, 0.5); 58 | } 59 | 60 | .DocSearch-Hit { 61 | scroll-margin-top: 6rem; 62 | padding-bottom: 0.8rem; 63 | 64 | a { 65 | border: 0.1rem solid rgba($secondary, 0.6); 66 | background-color: rgba($secondary, 0.6); 67 | border-radius: 0.6rem; 68 | padding-left: 1.2rem; 69 | } 70 | 71 | &[aria-selected='true'] { 72 | a { 73 | background-color: $secondary; 74 | border-color: rgba(white, 0.12); 75 | } 76 | mark { 77 | --docsearch-hit-active-color: #5eed87; 78 | } 79 | } 80 | } 81 | 82 | .DocSearch-Hit-Container, 83 | .DocSearch-Hit-action, 84 | .DocSearch-Hit-icon, 85 | .DocSearch-Hit-Tree { 86 | color: white; 87 | } 88 | 89 | .DocSearch-Hit-Tree { 90 | opacity: 0.1; 91 | } 92 | 93 | .DocSearch-Hit-source { 94 | background-color: $background; 95 | font-size: 1.8rem; 96 | padding: 1.2rem 0 0.8rem; 97 | color: white; 98 | margin: 0; 99 | } 100 | 101 | .DocSearch-Hit-title { 102 | font-size: 1.6rem; 103 | line-height: 1.5; 104 | } 105 | 106 | .DocSearch-Hit-path { 107 | font-size: 1.4rem; 108 | line-height: 1.5; 109 | opacity: 0.8; 110 | } 111 | 112 | .DocSearch-HitsFooter { 113 | a { 114 | border: none; 115 | font-weight: 500; 116 | font-size: 1.6rem; 117 | line-height: 150%; 118 | } 119 | } 120 | 121 | .DocSearch-Footer { 122 | display: none; 123 | } 124 | } 125 | -------------------------------------------------------------------------------- /src/styles/search-page.scss: -------------------------------------------------------------------------------- 1 | @use '@site/src/styles/common/color.scss' as *; 2 | @use '@site/src/styles/common/media.scss' as *; 3 | 4 | .searchQueryColumn_RTkw { 5 | .searchQueryInput_u2C7 { 6 | font-size: 1.6rem; 7 | line-height: 1.63; 8 | font-weight: 400; 9 | color: white; 10 | height: 4.4rem; 11 | background-color: rgba($accent, 0.8); 12 | box-shadow: none; 13 | padding: 0 1.6rem; 14 | border-radius: 0.8rem; 15 | border-width: 1px; 16 | margin-bottom: 0.8rem; 17 | 18 | &::placeholder { 19 | color: rgba(white, 0.5); 20 | } 21 | 22 | &:focus { 23 | border-color: rgba(255, 255, 255, 0.4); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/styles/sidebar.scss: -------------------------------------------------------------------------------- 1 | @use './common/color.scss' as *; 2 | @use './common/media.scss' as *; 3 | 4 | .menu { 5 | padding: 2rem 1.6rem 2rem 1.6rem; 6 | background-color: rgba($secondary, 0.6); 7 | 8 | @include lg { 9 | padding: 2rem 1.6rem 2rem 2.4rem !important; 10 | } 11 | } 12 | 13 | .navbar-sidebar { 14 | background-color: $secondary; 15 | } 16 | 17 | .navbar-sidebar__close { 18 | width: 2.4rem; 19 | height: 2.4rem; 20 | justify-content: center; 21 | align-items: center; 22 | 23 | svg { 24 | width: 1.8rem; 25 | height: 1.8rem; 26 | } 27 | } 28 | 29 | .navbar-sidebar__back { 30 | display: none; 31 | } 32 | 33 | .menu__list-item { 34 | &:not(:first-child) { 35 | margin-top: 0.8rem; 36 | } 37 | 38 | .menu__link { 39 | font-size: 1.6rem; 40 | line-height: 1.5; 41 | font-weight: 400; 42 | color: white !important; 43 | } 44 | 45 | & > { 46 | .menu__link, 47 | .menu__list-item-collapsible { 48 | padding: 0.8rem 1.6rem; 49 | opacity: 0.5; 50 | border-radius: 0.8rem; 51 | border: 0.1rem solid transparent; 52 | transition-property: opacity, background-color, border-color; 53 | transition-duration: 0.3s; 54 | transition-timing-function: ease-in-out; 55 | 56 | &:hover { 57 | opacity: 1; 58 | background-color: rgba($accent, 0.5); 59 | border-color: rgba(white, 0.04); 60 | } 61 | } 62 | 63 | .menu__link--active, 64 | .menu__list-item-collapsible--active { 65 | opacity: 1; 66 | background-color: $accent; 67 | border-color: rgba(white, 0.1); 68 | 69 | &:hover { 70 | background-color: $accent; 71 | border-color: rgba(white, 0.1); 72 | } 73 | } 74 | .menu__list-item-collapsible:has(.menu__link--active) { 75 | opacity: 1; 76 | background-color: $accent; 77 | border-color: rgba(white, 0.1); 78 | } 79 | } 80 | 81 | .menu__list { 82 | position: relative; 83 | padding-left: 2.4rem; 84 | margin: 0; 85 | 86 | &::before { 87 | content: ''; 88 | position: absolute; 89 | display: block; 90 | width: 1px; 91 | height: 100%; 92 | top: 0; 93 | left: 2.4rem; 94 | transform: translateX(-100%); 95 | background-color: rgba(white, 0.2); 96 | } 97 | 98 | .menu__link { 99 | border: none; 100 | background-color: transparent; 101 | } 102 | } 103 | } 104 | 105 | .menu__link--sublist { 106 | padding: 0; 107 | } 108 | 109 | .menu__caret { 110 | &:hover, 111 | &:active { 112 | background-color: transparent; 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /src/styles/toc.scss: -------------------------------------------------------------------------------- 1 | @use './common/color.scss' as *; 2 | @use './common/media.scss' as *; 3 | 4 | .theme-doc-toc-desktop { 5 | .table-of-contents { 6 | width: 100%; 7 | padding: 2rem; 8 | background: $radial-05; 9 | border-radius: 1.2rem; 10 | border: 0.1rem solid rgba($color: white, $alpha: 0.1); 11 | 12 | li { 13 | margin: 0; 14 | position: relative; 15 | 16 | &:not(:first-child) { 17 | margin-top: 1.2rem; 18 | } 19 | 20 | &::before { 21 | content: ''; 22 | position: absolute; 23 | top: 1.1rem; 24 | left: 0; 25 | width: 0.4rem; 26 | height: 1.2rem; 27 | transform: translateY(-50%); 28 | background: #f6f655; 29 | border-radius: 0.4rem; 30 | opacity: 0; 31 | transition: opacity 0.2s ease-in-out; 32 | } 33 | 34 | &:has(> .table-of-contents__link--active) { 35 | &::before { 36 | opacity: 1; 37 | } 38 | } 39 | } 40 | 41 | a { 42 | font-size: 1.4rem; 43 | font-weight: normal; 44 | line-height: 1.5; 45 | color: white; 46 | opacity: 0.5; 47 | transition: opacity 0.2s ease-in-out, color 0.2s ease-in-out, transform 0.2s ease-in-out; 48 | 49 | &:hover { 50 | opacity: 1; 51 | } 52 | } 53 | 54 | ul { 55 | margin-top: 1.2rem; 56 | padding-left: 1.6rem; 57 | } 58 | 59 | .table-of-contents__link--active { 60 | color: #f6f655; 61 | opacity: 1; 62 | transform: translateX(1.2rem); 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/styles/variables.scss: -------------------------------------------------------------------------------- 1 | @use './common/color.scss' as *; 2 | @use './common/media.scss' as *; 3 | 4 | :root { 5 | --ifm-color-primary: white; 6 | --ifm-color-primary-dark: #29784c; 7 | --ifm-color-primary-darker: #277148; 8 | --ifm-color-primary-darkest: #205d3b; 9 | --ifm-color-primary-light: #33925d; 10 | --ifm-color-primary-lighter: #359962; 11 | --ifm-color-primary-lightest: #3cad6e; 12 | --ifm-code-font-size: 160%; 13 | --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1); 14 | --ifm-font-family-base: 'Plus Jakarta Sans', sans-serif; 15 | --ifm-font-size-base: 10px; 16 | --ifm-navbar-height: 6.4rem; 17 | 18 | --ifm-navbar-background-color: #{$secondary}; 19 | --doc-sidebar-width: 36rem !important; 20 | ---ifm-link-color: white; 21 | --docsearch-highlight-color: #{$accent}; 22 | --ifm-h1-font-size: 2.4rem; 23 | 24 | --ifm-font-weight-light: 200; 25 | --ifm-font-weight-normal: 300; 26 | --ifm-font-weight-semibold: 500; 27 | --ifm-font-weight-bold: 600; 28 | } 29 | 30 | @include lg { 31 | :root { 32 | --ifm-navbar-height: 8rem; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/theme/Admonition/Icon/Danger.tsx: -------------------------------------------------------------------------------- 1 | import type { Props } from '@theme/Admonition/Icon/Danger' 2 | import { type ReactNode } from 'react' 3 | 4 | export default function AdmonitionIconDanger(props: Props): ReactNode { 5 | return ( 6 | 7 | 14 | 15 | ) 16 | } 17 | -------------------------------------------------------------------------------- /src/theme/Admonition/Icon/Info.tsx: -------------------------------------------------------------------------------- 1 | import type { Props } from '@theme/Admonition/Icon/Info' 2 | import { type ReactNode } from 'react' 3 | 4 | export default function AdmonitionIconInfo(props: Props): ReactNode { 5 | return ( 6 | 7 | 14 | 15 | ) 16 | } 17 | -------------------------------------------------------------------------------- /src/theme/Admonition/Icon/Note.tsx: -------------------------------------------------------------------------------- 1 | import type { Props } from '@theme/Admonition/Icon/Note' 2 | import { type ReactNode } from 'react' 3 | 4 | export default function AdmonitionIconNote(props: Props): ReactNode { 5 | return ( 6 | 7 | 14 | 15 | ) 16 | } 17 | -------------------------------------------------------------------------------- /src/theme/Admonition/Icon/Tip.tsx: -------------------------------------------------------------------------------- 1 | import type { Props } from '@theme/Admonition/Icon/Tip' 2 | import { type ReactNode } from 'react' 3 | 4 | export default function AdmonitionIconTip(props: Props): ReactNode { 5 | return ( 6 | 7 | 14 | 15 | ) 16 | } 17 | -------------------------------------------------------------------------------- /src/theme/Admonition/Icon/Warning.tsx: -------------------------------------------------------------------------------- 1 | import type { Props } from '@theme/Admonition/Icon/Warning' 2 | import { type ReactNode } from 'react' 3 | 4 | export default function AdmonitionIconCaution(props: Props): ReactNode { 5 | return ( 6 | 7 | 14 | 15 | ) 16 | } 17 | -------------------------------------------------------------------------------- /src/theme/Admonition/Layout/index.tsx: -------------------------------------------------------------------------------- 1 | import { ThemeClassNames } from '@docusaurus/theme-common' 2 | import clsx from 'clsx' 3 | import { type ReactNode } from 'react' 4 | 5 | import type { Props } from '@theme/Admonition/Layout' 6 | 7 | import styles from './styles.module.scss' 8 | 9 | function AdmonitionContainer({ 10 | type, 11 | className, 12 | children, 13 | }: Pick & { children: ReactNode }) { 14 | return ( 15 |
23 | {children} 24 |
25 | ) 26 | } 27 | 28 | function AdmonitionHeading({ icon, title }: Pick) { 29 | return ( 30 |
31 | {icon} 32 | {title} 33 |
34 | ) 35 | } 36 | 37 | function AdmonitionContent({ children }: Pick) { 38 | return children ?
{children}
: null 39 | } 40 | 41 | export default function AdmonitionLayout(props: Props): ReactNode { 42 | const { type, icon, title, children, className } = props 43 | return ( 44 | 45 | {title || icon ? : null} 46 | {children} 47 | 48 | ) 49 | } 50 | -------------------------------------------------------------------------------- /src/theme/Admonition/Layout/styles.module.scss: -------------------------------------------------------------------------------- 1 | .admonition { 2 | margin-bottom: 1.6rem; 3 | } 4 | 5 | .admonitionHeading { 6 | font-size: 1.6rem; 7 | line-height: 150%; 8 | font-weight: 500; 9 | display: flex; 10 | align-items: center; 11 | gap: 0.4rem; 12 | color: white; 13 | // text-transform: uppercase; 14 | } 15 | 16 | .admonitionHeading:not(:last-child) { 17 | margin-bottom: 1.6rem; 18 | } 19 | 20 | .admonitionHeading code { 21 | text-transform: none; 22 | } 23 | 24 | .admonitionIcon svg { 25 | display: block; 26 | height: 2.4rem; 27 | width: 2.4rem; 28 | } 29 | 30 | .admonitionContent > :last-child { 31 | margin-bottom: 0; 32 | } 33 | -------------------------------------------------------------------------------- /src/theme/Admonition/Type/Caution.tsx: -------------------------------------------------------------------------------- 1 | import React, {type ReactNode} from 'react'; 2 | import clsx from 'clsx'; 3 | import Translate from '@docusaurus/Translate'; 4 | import type {Props} from '@theme/Admonition/Type/Caution'; 5 | import AdmonitionLayout from '@theme/Admonition/Layout'; 6 | import IconWarning from '@theme/Admonition/Icon/Warning'; 7 | 8 | const infimaClassName = 'alert alert--warning'; 9 | 10 | const defaultProps = { 11 | icon: , 12 | title: ( 13 | 16 | caution 17 | 18 | ), 19 | }; 20 | 21 | // TODO remove before v4: Caution replaced by Warning 22 | // see https://github.com/facebook/docusaurus/issues/7558 23 | export default function AdmonitionTypeCaution(props: Props): ReactNode { 24 | return ( 25 | 29 | {props.children} 30 | 31 | ); 32 | } 33 | -------------------------------------------------------------------------------- /src/theme/Admonition/Type/Danger.tsx: -------------------------------------------------------------------------------- 1 | import React, {type ReactNode} from 'react'; 2 | import clsx from 'clsx'; 3 | import Translate from '@docusaurus/Translate'; 4 | import type {Props} from '@theme/Admonition/Type/Danger'; 5 | import AdmonitionLayout from '@theme/Admonition/Layout'; 6 | import IconDanger from '@theme/Admonition/Icon/Danger'; 7 | 8 | const infimaClassName = 'alert alert--danger'; 9 | 10 | const defaultProps = { 11 | icon: , 12 | title: ( 13 | 16 | danger 17 | 18 | ), 19 | }; 20 | 21 | export default function AdmonitionTypeDanger(props: Props): ReactNode { 22 | return ( 23 | 27 | {props.children} 28 | 29 | ); 30 | } 31 | -------------------------------------------------------------------------------- /src/theme/Admonition/Type/Info.tsx: -------------------------------------------------------------------------------- 1 | import React, {type ReactNode} from 'react'; 2 | import clsx from 'clsx'; 3 | import Translate from '@docusaurus/Translate'; 4 | import type {Props} from '@theme/Admonition/Type/Info'; 5 | import AdmonitionLayout from '@theme/Admonition/Layout'; 6 | import IconInfo from '@theme/Admonition/Icon/Info'; 7 | 8 | const infimaClassName = 'alert alert--info'; 9 | 10 | const defaultProps = { 11 | icon: , 12 | title: ( 13 | 16 | info 17 | 18 | ), 19 | }; 20 | 21 | export default function AdmonitionTypeInfo(props: Props): ReactNode { 22 | return ( 23 | 27 | {props.children} 28 | 29 | ); 30 | } 31 | -------------------------------------------------------------------------------- /src/theme/Admonition/Type/Note.tsx: -------------------------------------------------------------------------------- 1 | import React, {type ReactNode} from 'react'; 2 | import clsx from 'clsx'; 3 | import Translate from '@docusaurus/Translate'; 4 | import type {Props} from '@theme/Admonition/Type/Note'; 5 | import AdmonitionLayout from '@theme/Admonition/Layout'; 6 | import IconNote from '@theme/Admonition/Icon/Note'; 7 | 8 | const infimaClassName = 'alert alert--secondary'; 9 | 10 | const defaultProps = { 11 | icon: , 12 | title: ( 13 | 16 | note 17 | 18 | ), 19 | }; 20 | 21 | export default function AdmonitionTypeNote(props: Props): ReactNode { 22 | return ( 23 | 27 | {props.children} 28 | 29 | ); 30 | } 31 | -------------------------------------------------------------------------------- /src/theme/Admonition/Type/Tip.tsx: -------------------------------------------------------------------------------- 1 | import React, {type ReactNode} from 'react'; 2 | import clsx from 'clsx'; 3 | import Translate from '@docusaurus/Translate'; 4 | import type {Props} from '@theme/Admonition/Type/Tip'; 5 | import AdmonitionLayout from '@theme/Admonition/Layout'; 6 | import IconTip from '@theme/Admonition/Icon/Tip'; 7 | 8 | const infimaClassName = 'alert alert--success'; 9 | 10 | const defaultProps = { 11 | icon: , 12 | title: ( 13 | 16 | tip 17 | 18 | ), 19 | }; 20 | 21 | export default function AdmonitionTypeTip(props: Props): ReactNode { 22 | return ( 23 | 27 | {props.children} 28 | 29 | ); 30 | } 31 | -------------------------------------------------------------------------------- /src/theme/Admonition/Type/Warning.tsx: -------------------------------------------------------------------------------- 1 | import React, {type ReactNode} from 'react'; 2 | import clsx from 'clsx'; 3 | import Translate from '@docusaurus/Translate'; 4 | import type {Props} from '@theme/Admonition/Type/Warning'; 5 | import AdmonitionLayout from '@theme/Admonition/Layout'; 6 | import IconWarning from '@theme/Admonition/Icon/Warning'; 7 | 8 | const infimaClassName = 'alert alert--warning'; 9 | 10 | const defaultProps = { 11 | icon: , 12 | title: ( 13 | 16 | warning 17 | 18 | ), 19 | }; 20 | 21 | export default function AdmonitionTypeWarning(props: Props): ReactNode { 22 | return ( 23 | 27 | {props.children} 28 | 29 | ); 30 | } 31 | -------------------------------------------------------------------------------- /src/theme/Admonition/Types.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import AdmonitionTypeNote from '@theme/Admonition/Type/Note'; 3 | import AdmonitionTypeTip from '@theme/Admonition/Type/Tip'; 4 | import AdmonitionTypeInfo from '@theme/Admonition/Type/Info'; 5 | import AdmonitionTypeWarning from '@theme/Admonition/Type/Warning'; 6 | import AdmonitionTypeDanger from '@theme/Admonition/Type/Danger'; 7 | import AdmonitionTypeCaution from '@theme/Admonition/Type/Caution'; 8 | import type AdmonitionTypes from '@theme/Admonition/Types'; 9 | 10 | const admonitionTypes: typeof AdmonitionTypes = { 11 | note: AdmonitionTypeNote, 12 | tip: AdmonitionTypeTip, 13 | info: AdmonitionTypeInfo, 14 | warning: AdmonitionTypeWarning, 15 | danger: AdmonitionTypeDanger, 16 | }; 17 | 18 | // Undocumented legacy admonition type aliases 19 | // Provide hardcoded/untranslated retrocompatible label 20 | // See also https://github.com/facebook/docusaurus/issues/7767 21 | const admonitionAliases: typeof AdmonitionTypes = { 22 | secondary: (props) => , 23 | important: (props) => , 24 | success: (props) => , 25 | caution: AdmonitionTypeCaution, 26 | }; 27 | 28 | export default { 29 | ...admonitionTypes, 30 | ...admonitionAliases, 31 | }; 32 | -------------------------------------------------------------------------------- /src/theme/Admonition/index.tsx: -------------------------------------------------------------------------------- 1 | import React, {type ComponentType, type ReactNode} from 'react'; 2 | import {processAdmonitionProps} from '@docusaurus/theme-common'; 3 | import type {Props} from '@theme/Admonition'; 4 | import AdmonitionTypes from '@theme/Admonition/Types'; 5 | 6 | function getAdmonitionTypeComponent(type: string): ComponentType { 7 | const component = AdmonitionTypes[type]; 8 | if (component) { 9 | return component; 10 | } 11 | console.warn( 12 | `No admonition component found for admonition type "${type}". Using Info as fallback.`, 13 | ); 14 | return AdmonitionTypes.info!; 15 | } 16 | 17 | export default function Admonition(unprocessedProps: Props): ReactNode { 18 | const props = processAdmonitionProps(unprocessedProps); 19 | const AdmonitionTypeComponent = getAdmonitionTypeComponent(props.type); 20 | return ; 21 | } 22 | -------------------------------------------------------------------------------- /src/theme/Details/index.tsx: -------------------------------------------------------------------------------- 1 | import { Details as DetailsGeneric } from '@docusaurus/theme-common/Details' 2 | import type { Props } from '@theme/Details' 3 | import clsx from 'clsx' 4 | import { type ReactNode } from 'react' 5 | 6 | import styles from './styles.module.scss' 7 | 8 | // Should we have a custom details/summary comp in Infima instead of reusing 9 | // alert classes? 10 | const InfimaClasses = 'alert alert--info' 11 | 12 | export default function Details({ ...props }: Props): ReactNode { 13 | return 14 | } 15 | -------------------------------------------------------------------------------- /src/theme/Details/styles.module.scss: -------------------------------------------------------------------------------- 1 | @use '@site/src/styles/common/color.scss' as *; 2 | @use '@site/src/styles/common/media.scss' as *; 3 | 4 | .details { 5 | border-radius: 1.2rem; 6 | overflow: hidden; 7 | background-color: rgba(36, 41, 38, 0.6); 8 | border: 0.1rem solid rgba(36, 41, 38, 0.6); 9 | margin-bottom: 1.6rem; 10 | transition: all 0.3s ease; 11 | 12 | &[data-collapsed='false'] { 13 | border-color: rgba(white, 0.1); 14 | background-color: $secondary; 15 | 16 | summary { 17 | &:after { 18 | transform: rotate(0deg); 19 | } 20 | } 21 | } 22 | 23 | summary { 24 | &::before { 25 | display: none; 26 | } 27 | 28 | padding: 2rem; 29 | font-size: 1.6rem; 30 | line-height: 1.5; 31 | font-weight: 400; 32 | color: white; 33 | display: flex; 34 | justify-content: space-between; 35 | align-items: center; 36 | gap: 1.6rem; 37 | 38 | &:after { 39 | content: ''; 40 | display: block; 41 | background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='lucide lucide-chevron-down'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); 42 | width: 2.4rem; 43 | height: 2.4rem; 44 | transform: rotate(180deg); 45 | transition: transform ease 0.3s; 46 | } 47 | } 48 | 49 | summary + div { 50 | div { 51 | margin-top: 0; 52 | padding: 2rem 2rem 1.2rem; 53 | color: white; 54 | p { 55 | font-size: 1.6rem; 56 | } 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/theme/DocBreadcrumbs/Items/Home/index.tsx: -------------------------------------------------------------------------------- 1 | import Link from '@docusaurus/Link' 2 | import { translate } from '@docusaurus/Translate' 3 | import useBaseUrl from '@docusaurus/useBaseUrl' 4 | import IconHome from '@theme/Icon/Home' 5 | import { type ReactNode } from 'react' 6 | 7 | import styles from './styles.module.css' 8 | 9 | export default function HomeBreadcrumbItem(): ReactNode { 10 | const homeHref = useBaseUrl('/') 11 | 12 | return ( 13 |
  • 14 | 23 | 24 | 25 |
  • 26 | ) 27 | } 28 | -------------------------------------------------------------------------------- /src/theme/DocBreadcrumbs/Items/Home/styles.module.css: -------------------------------------------------------------------------------- 1 | .breadcrumbHomeIcon { 2 | width: 2.4rem; 3 | height: 2.4rem; 4 | } 5 | -------------------------------------------------------------------------------- /src/theme/DocBreadcrumbs/index.tsx: -------------------------------------------------------------------------------- 1 | import React, {type ReactNode} from 'react'; 2 | import clsx from 'clsx'; 3 | import {ThemeClassNames} from '@docusaurus/theme-common'; 4 | import {useSidebarBreadcrumbs} from '@docusaurus/plugin-content-docs/client'; 5 | import {useHomePageRoute} from '@docusaurus/theme-common/internal'; 6 | import Link from '@docusaurus/Link'; 7 | import {translate} from '@docusaurus/Translate'; 8 | import HomeBreadcrumbItem from '@theme/DocBreadcrumbs/Items/Home'; 9 | 10 | import styles from './styles.module.css'; 11 | 12 | // TODO move to design system folder 13 | function BreadcrumbsItemLink({ 14 | children, 15 | href, 16 | isLast, 17 | }: { 18 | children: ReactNode; 19 | href: string | undefined; 20 | isLast: boolean; 21 | }): ReactNode { 22 | const className = 'breadcrumbs__link'; 23 | if (isLast) { 24 | return ( 25 | 26 | {children} 27 | 28 | ); 29 | } 30 | return href ? ( 31 | 32 | {children} 33 | 34 | ) : ( 35 | // TODO Google search console doesn't like breadcrumb items without href. 36 | // The schema doesn't seem to require `id` for each `item`, although Google 37 | // insist to infer one, even if it's invalid. Removing `itemProp="item 38 | // name"` for now, since I don't know how to properly fix it. 39 | // See https://github.com/facebook/docusaurus/issues/7241 40 | {children} 41 | ); 42 | } 43 | 44 | // TODO move to design system folder 45 | function BreadcrumbsItem({ 46 | children, 47 | active, 48 | index, 49 | addMicrodata, 50 | }: { 51 | children: ReactNode; 52 | active?: boolean; 53 | index: number; 54 | addMicrodata: boolean; 55 | }): ReactNode { 56 | return ( 57 |
  • 66 | {children} 67 | 68 |
  • 69 | ); 70 | } 71 | 72 | export default function DocBreadcrumbs(): ReactNode { 73 | const breadcrumbs = useSidebarBreadcrumbs(); 74 | const homePageRoute = useHomePageRoute(); 75 | 76 | if (!breadcrumbs) { 77 | return null; 78 | } 79 | 80 | return ( 81 | 116 | ); 117 | } 118 | -------------------------------------------------------------------------------- /src/theme/DocBreadcrumbs/styles.module.css: -------------------------------------------------------------------------------- 1 | .breadcrumbsContainer { 2 | --ifm-breadcrumb-size-multiplier: 0.8; 3 | --margin-bottom: 2.4rem; 4 | margin-bottom: var(--margin-bottom); 5 | } 6 | -------------------------------------------------------------------------------- /src/theme/DocCard/index.tsx: -------------------------------------------------------------------------------- 1 | import isInternalUrl from '@docusaurus/isInternalUrl' 2 | import Link from '@docusaurus/Link' 3 | import { findFirstSidebarItemLink, useDocById } from '@docusaurus/plugin-content-docs/client' 4 | import { usePluralForm } from '@docusaurus/theme-common' 5 | import { translate } from '@docusaurus/Translate' 6 | import clsx from 'clsx' 7 | import { type ReactNode } from 'react' 8 | 9 | import type { PropSidebarItemCategory, PropSidebarItemLink } from '@docusaurus/plugin-content-docs' 10 | import type { Props } from '@theme/DocCard' 11 | import Heading from '@theme/Heading' 12 | 13 | import styles from './styles.module.scss' 14 | 15 | function useCategoryItemsPlural() { 16 | const { selectMessage } = usePluralForm() 17 | return (count: number) => 18 | selectMessage( 19 | count, 20 | translate( 21 | { 22 | message: '1 item|{count} items', 23 | id: 'theme.docs.DocCard.categoryDescription.plurals', 24 | description: 25 | 'The default description for a category card in the generated index about how many items this category includes', 26 | }, 27 | { count } 28 | ) 29 | ) 30 | } 31 | 32 | function CardContainer({ href, children }: { href: string; children: ReactNode }): ReactNode { 33 | return ( 34 | 35 | {children} 36 | 37 | ) 38 | } 39 | 40 | function CardLayout({ 41 | href, 42 | icon, 43 | title, 44 | description, 45 | }: { 46 | href: string 47 | icon: ReactNode 48 | title: string 49 | description?: string 50 | }): ReactNode { 51 | return ( 52 | 53 | 54 | {icon} {title} 55 | 56 | {description && ( 57 |

    58 | {description} 59 |

    60 | )} 61 |
    62 | ) 63 | } 64 | 65 | function CardCategory({ item }: { item: PropSidebarItemCategory }): ReactNode { 66 | const href = findFirstSidebarItemLink(item) 67 | const categoryItemsPlural = useCategoryItemsPlural() 68 | 69 | // Unexpected: categories that don't have a link have been filtered upfront 70 | if (!href) { 71 | return null 72 | } 73 | 74 | return ( 75 | 81 | ) 82 | } 83 | 84 | function CardLink({ item }: { item: PropSidebarItemLink }): ReactNode { 85 | const icon = isInternalUrl(item.href) ? '📄️' : '🔗' 86 | const doc = useDocById(item.docId ?? undefined) 87 | return ( 88 | 89 | ) 90 | } 91 | 92 | export default function DocCard({ item }: Props): ReactNode { 93 | switch (item.type) { 94 | case 'link': 95 | return 96 | case 'category': 97 | return 98 | default: 99 | throw new Error(`unknown item type ${JSON.stringify(item)}`) 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /src/theme/DocCard/styles.module.scss: -------------------------------------------------------------------------------- 1 | @use '@site/src/styles/common/media.scss' as *; 2 | @use '@site/src/styles/common/color.scss' as *; 3 | 4 | .cardContainer { 5 | display: block; 6 | width: 100%; 7 | height: 100%; 8 | border-radius: 1.2rem; 9 | border: 0.1rem solid #{rgba(white, 0.1)}; 10 | transition: all 0.3s ease; 11 | padding: 1.6rem; 12 | background-color: $secondary; 13 | 14 | &:hover { 15 | border-color: rgba(white, 0.5); 16 | text-decoration: none; 17 | } 18 | } 19 | 20 | .cardContainer *:last-child { 21 | margin-bottom: 0; 22 | } 23 | 24 | .cardTitle { 25 | font-size: 1.6rem; 26 | line-height: 1.5; 27 | margin-bottom: 0.4rem; 28 | } 29 | 30 | .cardDescription { 31 | font-size: 1.4rem; 32 | line-height: 1.5; 33 | } 34 | 35 | @include xl { 36 | .container { 37 | padding: 2rem; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/theme/DocCardList/index.tsx: -------------------------------------------------------------------------------- 1 | import { filterDocCardListItems, useCurrentSidebarCategory } from '@docusaurus/plugin-content-docs/client' 2 | import DocCard from '@theme/DocCard' 3 | import type { Props } from '@theme/DocCardList' 4 | import clsx from 'clsx' 5 | import { type ReactNode } from 'react' 6 | import styles from './styles.module.scss' 7 | 8 | function DocCardListForCurrentSidebarCategory({ className }: Props) { 9 | const category = useCurrentSidebarCategory() 10 | return 11 | } 12 | 13 | export default function DocCardList(props: Props): ReactNode { 14 | const { items, className } = props 15 | if (!items) { 16 | return 17 | } 18 | const filteredItems = filterDocCardListItems(items) 19 | return ( 20 |
    21 | {filteredItems.map((item, index) => ( 22 |
    23 | 24 |
    25 | ))} 26 |
    27 | ) 28 | } 29 | -------------------------------------------------------------------------------- /src/theme/DocCardList/styles.module.scss: -------------------------------------------------------------------------------- 1 | @use '@site/src/styles/common/media.scss' as *; 2 | .container { 3 | display: grid; 4 | grid-template-columns: minmax(0, 1fr); 5 | gap: 1.2rem; 6 | } 7 | 8 | .article { 9 | width: 100%; 10 | height: auto; 11 | } 12 | 13 | @include md { 14 | .container { 15 | grid-template-columns: repeat(2, minmax(0, 1fr)); 16 | } 17 | } 18 | 19 | @include xl { 20 | .container { 21 | gap: 1.6rem; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/theme/DocCategoryGeneratedIndexPage/index.tsx: -------------------------------------------------------------------------------- 1 | import { useCurrentSidebarCategory } from '@docusaurus/plugin-content-docs/client' 2 | import { PageMetadata } from '@docusaurus/theme-common' 3 | import useBaseUrl from '@docusaurus/useBaseUrl' 4 | import DocBreadcrumbs from '@theme/DocBreadcrumbs' 5 | import DocCardList from '@theme/DocCardList' 6 | import type { Props } from '@theme/DocCategoryGeneratedIndexPage' 7 | import DocPaginator from '@theme/DocPaginator' 8 | import DocVersionBadge from '@theme/DocVersionBadge' 9 | import DocVersionBanner from '@theme/DocVersionBanner' 10 | import Heading from '@theme/Heading' 11 | import { type ReactNode } from 'react' 12 | 13 | import styles from './styles.module.css' 14 | 15 | function DocCategoryGeneratedIndexPageMetadata({ categoryGeneratedIndex }: Props): ReactNode { 16 | return ( 17 | 24 | ) 25 | } 26 | 27 | function DocCategoryGeneratedIndexPageContent({ categoryGeneratedIndex }: Props): ReactNode { 28 | const category = useCurrentSidebarCategory() 29 | return ( 30 |
    31 | 32 | 33 | 34 |
    35 | 36 | {categoryGeneratedIndex.title} 37 | 38 | {categoryGeneratedIndex.description &&

    {categoryGeneratedIndex.description}

    } 39 |
    40 |
    41 | 42 |
    43 |
    44 | 48 |
    49 |
    50 | ) 51 | } 52 | 53 | export default function DocCategoryGeneratedIndexPage(props: Props): ReactNode { 54 | return ( 55 | <> 56 | 57 | 58 | 59 | ) 60 | } 61 | -------------------------------------------------------------------------------- /src/theme/DocCategoryGeneratedIndexPage/styles.module.css: -------------------------------------------------------------------------------- 1 | @media (min-width: 997px) { 2 | .generatedIndexPage { 3 | max-width: 75% !important; 4 | } 5 | 6 | .list article:nth-last-child(-n + 2) { 7 | margin-bottom: 0 !important; 8 | } 9 | } 10 | 11 | /* Duplicated from .markdown h1 */ 12 | .title { 13 | margin-bottom: 0.8rem; 14 | font-size: 2.4rem; 15 | color: white; 16 | 17 | + p { 18 | font-size: 1.6rem; 19 | color: rgba(white, 0.8); 20 | } 21 | } 22 | 23 | .article, 24 | .footer { 25 | margin-top: 2rem; 26 | } 27 | 28 | .list article:last-child { 29 | margin-bottom: 0 !important; 30 | } 31 | 32 | @include xl { 33 | .title { 34 | font-size: 3.2rem; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/theme/DocItem/Layout/index.tsx: -------------------------------------------------------------------------------- 1 | import { useDoc } from '@docusaurus/plugin-content-docs/client' 2 | import { useWindowSize } from '@docusaurus/theme-common' 3 | import ContentVisibility from '@theme/ContentVisibility' 4 | import DocBreadcrumbs from '@theme/DocBreadcrumbs' 5 | import DocItemContent from '@theme/DocItem/Content' 6 | import DocItemFooter from '@theme/DocItem/Footer' 7 | import type { Props } from '@theme/DocItem/Layout' 8 | import DocItemPaginator from '@theme/DocItem/Paginator' 9 | import DocItemTOCDesktop from '@theme/DocItem/TOC/Desktop' 10 | import DocItemTOCMobile from '@theme/DocItem/TOC/Mobile' 11 | import DocVersionBadge from '@theme/DocVersionBadge' 12 | import DocVersionBanner from '@theme/DocVersionBanner' 13 | import clsx from 'clsx' 14 | import { type ReactNode } from 'react' 15 | 16 | import styles from './styles.module.scss' 17 | 18 | /** 19 | * Decide if the toc should be rendered, on mobile or desktop viewports 20 | */ 21 | function useDocTOC() { 22 | const { frontMatter, toc } = useDoc() 23 | const windowSize = useWindowSize({ desktopBreakpoint: 1280 }) 24 | 25 | const hidden = frontMatter.hide_table_of_contents 26 | const canRender = !hidden && toc.length > 0 27 | 28 | const mobile = canRender ? : undefined 29 | 30 | const desktop = canRender && (windowSize === 'desktop' || windowSize === 'ssr') ? : undefined 31 | 32 | return { 33 | hidden, 34 | mobile, 35 | desktop, 36 | } 37 | } 38 | 39 | export default function DocItemLayout({ children }: Props): ReactNode { 40 | const docTOC = useDocTOC() 41 | const { metadata } = useDoc() 42 | return ( 43 |
    44 |
    45 | 46 | 47 |
    48 |
    49 | 50 | 51 | {docTOC.mobile} 52 | {children} 53 | 54 |
    55 | 56 |
    57 |
    58 | {docTOC.desktop &&
    {docTOC.desktop}
    } 59 |
    60 | ) 61 | } 62 | -------------------------------------------------------------------------------- /src/theme/DocItem/Layout/styles.module.scss: -------------------------------------------------------------------------------- 1 | @use '@site/src/styles/common/media.scss' as *; 2 | 3 | .docItemWrapper { 4 | display: grid; 5 | } 6 | 7 | .docItemMain { 8 | width: 100%; 9 | } 10 | 11 | .docItemContainer header + *, 12 | .docItemContainer article > *:first-child { 13 | margin-top: 0; 14 | } 15 | 16 | @media (min-width: 1281px) { 17 | .docItemWrapper { 18 | grid-template-columns: 1fr 360px; 19 | gap: 3.2rem; 20 | } 21 | } 22 | 23 | @media (min-width: 1440px) { 24 | .docItemWrapper { 25 | gap: 4rem; 26 | } 27 | } 28 | 29 | @media (min-width: 1700px) { 30 | .docItemWrapper { 31 | gap: 5.2rem; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/theme/DocItem/TOC/Mobile/index.tsx: -------------------------------------------------------------------------------- 1 | import React, {type ReactNode} from 'react'; 2 | import clsx from 'clsx'; 3 | import {ThemeClassNames} from '@docusaurus/theme-common'; 4 | import {useDoc} from '@docusaurus/plugin-content-docs/client'; 5 | 6 | import TOCCollapsible from '@theme/TOCCollapsible'; 7 | 8 | import styles from './styles.module.css'; 9 | 10 | export default function DocItemTOCMobile(): ReactNode { 11 | const {toc, frontMatter} = useDoc(); 12 | return ( 13 | 19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /src/theme/DocItem/TOC/Mobile/styles.module.css: -------------------------------------------------------------------------------- 1 | @media (min-width: 1281px) { 2 | /* Prevent hydration FOUC, as the mobile TOC needs to be server-rendered */ 3 | .tocMobile { 4 | display: none; 5 | } 6 | } 7 | 8 | @media print { 9 | .tocMobile { 10 | display: none; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/theme/DocPaginator/index.tsx: -------------------------------------------------------------------------------- 1 | import Translate, { translate } from '@docusaurus/Translate' 2 | import type { Props } from '@theme/DocPaginator' 3 | import PaginatorNavLink from '@theme/PaginatorNavLink' 4 | import { type ReactNode } from 'react' 5 | 6 | export default function DocPaginator(props: Props): ReactNode { 7 | const { previous, next } = props 8 | return ( 9 | 39 | ) 40 | } 41 | -------------------------------------------------------------------------------- /src/theme/DocRoot/Layout/Main/index.tsx: -------------------------------------------------------------------------------- 1 | import { useDocsSidebar } from '@docusaurus/plugin-content-docs/client' 2 | import type { Props } from '@theme/DocRoot/Layout/Main' 3 | import clsx from 'clsx' 4 | import { type ReactNode } from 'react' 5 | 6 | import styles from './styles.module.scss' 7 | 8 | export default function DocRootLayoutMain({ hiddenSidebarContainer, children }: Props): ReactNode { 9 | const sidebar = useDocsSidebar() 10 | return ( 11 |
    14 |
    15 |
    {children}
    16 |
    17 | ) 18 | } 19 | -------------------------------------------------------------------------------- /src/theme/DocRoot/Layout/Main/styles.module.scss: -------------------------------------------------------------------------------- 1 | @use '@site/src/styles/common/media' as *; 2 | 3 | .docMainContainer { 4 | display: flex; 5 | width: 100%; 6 | position: relative; 7 | } 8 | 9 | .docBackground { 10 | position: fixed; 11 | top: var(--ifm-navbar-height); 12 | left: var(--doc-sidebar-width); 13 | width: calc(100vw - var(--doc-sidebar-width)); 14 | height: calc(100vh - var(--ifm-navbar-height)); 15 | opacity: 0.5; 16 | background: linear-gradient(0deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.4) 100%), 17 | linear-gradient( 18 | 138deg, 19 | rgba(90, 92, 10, 0.01) -22.01%, 20 | rgba(113, 115, 13, 0.15) 10.21%, 21 | rgba(94, 138, 133, 0.2) 39.44%, 22 | rgba(12, 14, 11, 0.5) 111.64% 23 | ), 24 | radial-gradient(105.48% 59.33% at -6.41% 111.39%, rgba(246, 246, 85, 0.1) 0%, rgba(246, 246, 85, 0) 100%), 25 | radial-gradient(108.78% 60.14% at 102.97% -4.95%, rgba(94, 237, 135, 0.1) 0%, rgba(94, 237, 135, 0) 100%); 26 | } 27 | 28 | .docItemWrapper { 29 | width: 100%; 30 | max-width: 1440px; 31 | margin: 0 auto; 32 | padding: 1.6rem; 33 | position: relative; 34 | } 35 | 36 | @media (min-width: 997px) { 37 | .docMainContainer { 38 | flex-grow: 1; 39 | max-width: calc(100% - var(--doc-sidebar-width)); 40 | } 41 | 42 | .docMainContainerEnhanced { 43 | max-width: calc(100% - var(--doc-sidebar-hidden-width)); 44 | } 45 | 46 | .docItemWrapper { 47 | padding: 1.6rem 2.4rem; 48 | } 49 | } 50 | 51 | @media (min-width: 1281px) { 52 | .docItemWrapper { 53 | padding: 2.4rem 4rem; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/theme/Footer/Copyright/index.tsx: -------------------------------------------------------------------------------- 1 | import type { Props } from '@theme/Footer/Copyright' 2 | import { type ReactNode } from 'react' 3 | 4 | export default function FooterCopyright({ copyright }: Props): ReactNode { 5 | return ( 6 |
    11 | ) 12 | } 13 | -------------------------------------------------------------------------------- /src/theme/Footer/Layout/index.tsx: -------------------------------------------------------------------------------- 1 | import type { Props } from '@theme/Footer/Layout' 2 | import { type ReactNode } from 'react' 3 | 4 | export default function FooterLayout({ style, links, logo, copyright }: Props): ReactNode { 5 | return ( 6 |
    7 |
    8 |
    {logo}
    9 | {links} 10 | {copyright} 11 |
    12 |
    13 | ) 14 | } 15 | -------------------------------------------------------------------------------- /src/theme/Footer/LinkItem/index.tsx: -------------------------------------------------------------------------------- 1 | import React, {type ReactNode} from 'react'; 2 | import clsx from 'clsx'; 3 | import Link from '@docusaurus/Link'; 4 | import useBaseUrl from '@docusaurus/useBaseUrl'; 5 | import isInternalUrl from '@docusaurus/isInternalUrl'; 6 | import IconExternalLink from '@theme/Icon/ExternalLink'; 7 | import type {Props} from '@theme/Footer/LinkItem'; 8 | 9 | export default function FooterLinkItem({item}: Props): ReactNode { 10 | const {to, href, label, prependBaseUrlToHref, className, ...props} = item; 11 | const toUrl = useBaseUrl(to); 12 | const normalizedHref = useBaseUrl(href, {forcePrependBaseUrl: true}); 13 | 14 | return ( 15 | 25 | {label} 26 | {href && !isInternalUrl(href) && } 27 | 28 | ); 29 | } 30 | -------------------------------------------------------------------------------- /src/theme/Footer/Links/MultiColumn/index.tsx: -------------------------------------------------------------------------------- 1 | import LinkItem from '@theme/Footer/LinkItem' 2 | import type { Props } from '@theme/Footer/Links/MultiColumn' 3 | import clsx from 'clsx' 4 | import { type ReactNode } from 'react' 5 | 6 | type ColumnType = Props['columns'][number] 7 | type ColumnItemType = ColumnType['items'][number] 8 | 9 | function ColumnLinkItem({ item }: { item: ColumnItemType }) { 10 | return item.html ? ( 11 |
  • 17 | ) : ( 18 |
  • 19 | 20 |
  • 21 | ) 22 | } 23 | 24 | function Column({ column }: { column: ColumnType }) { 25 | return ( 26 |
    27 |
    {column.title}
    28 |
      29 | {column.items.map((item, i) => ( 30 | 31 | ))} 32 |
    33 |
    34 | ) 35 | } 36 | 37 | export default function FooterLinksMultiColumn({ columns }: Props): ReactNode { 38 | return ( 39 |
    40 | {columns.map((column, i) => ( 41 | 42 | ))} 43 |
    44 | ) 45 | } 46 | -------------------------------------------------------------------------------- /src/theme/Footer/Links/Simple/index.tsx: -------------------------------------------------------------------------------- 1 | import React, {type ReactNode} from 'react'; 2 | import clsx from 'clsx'; 3 | import LinkItem from '@theme/Footer/LinkItem'; 4 | import type {Props} from '@theme/Footer/Links/Simple'; 5 | 6 | function Separator() { 7 | return ·; 8 | } 9 | 10 | function SimpleLinkItem({item}: {item: Props['links'][number]}) { 11 | return item.html ? ( 12 | 18 | ) : ( 19 | 20 | ); 21 | } 22 | 23 | export default function FooterLinksSimple({links}: Props): ReactNode { 24 | return ( 25 |
    26 |
    27 | {links.map((item, i) => ( 28 | 29 | 30 | {links.length !== i + 1 && } 31 | 32 | ))} 33 |
    34 |
    35 | ); 36 | } 37 | -------------------------------------------------------------------------------- /src/theme/Footer/Links/index.tsx: -------------------------------------------------------------------------------- 1 | import React, {type ReactNode} from 'react'; 2 | 3 | import {isMultiColumnFooterLinks} from '@docusaurus/theme-common'; 4 | import FooterLinksMultiColumn from '@theme/Footer/Links/MultiColumn'; 5 | import FooterLinksSimple from '@theme/Footer/Links/Simple'; 6 | import type {Props} from '@theme/Footer/Links'; 7 | 8 | export default function FooterLinks({links}: Props): ReactNode { 9 | return isMultiColumnFooterLinks(links) ? ( 10 | 11 | ) : ( 12 | 13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /src/theme/Footer/Logo/index.tsx: -------------------------------------------------------------------------------- 1 | import Link from '@docusaurus/Link' 2 | import { useBaseUrlUtils } from '@docusaurus/useBaseUrl' 3 | import type { Props } from '@theme/Footer/Logo' 4 | import ThemedImage from '@theme/ThemedImage' 5 | import clsx from 'clsx' 6 | import { type ReactNode } from 'react' 7 | 8 | import styles from './styles.module.css' 9 | 10 | function LogoImage({ logo }: Props) { 11 | const { withBaseUrl } = useBaseUrlUtils() 12 | const sources = { 13 | light: withBaseUrl(logo.src), 14 | dark: withBaseUrl(logo.srcDark ?? logo.src), 15 | } 16 | return ( 17 | 25 | ) 26 | } 27 | 28 | export default function FooterLogo({ logo }: Props): ReactNode { 29 | return logo.href ? ( 30 | 31 | 32 | 33 | ) : ( 34 | 35 | ) 36 | } 37 | -------------------------------------------------------------------------------- /src/theme/Footer/Logo/styles.module.css: -------------------------------------------------------------------------------- 1 | .footerLogoLink { 2 | } 3 | -------------------------------------------------------------------------------- /src/theme/Footer/Logo/styles.module.scss: -------------------------------------------------------------------------------- 1 | .footerLogoLink { 2 | } 3 | -------------------------------------------------------------------------------- /src/theme/Footer/index.tsx: -------------------------------------------------------------------------------- 1 | import React, { type ReactNode } from 'react' 2 | 3 | import { useThemeConfig } from '@docusaurus/theme-common' 4 | import FooterCopyright from '@theme/Footer/Copyright' 5 | import FooterLayout from '@theme/Footer/Layout' 6 | import FooterLinks from '@theme/Footer/Links' 7 | import FooterLogo from '@theme/Footer/Logo' 8 | 9 | function Footer(): ReactNode { 10 | const { footer } = useThemeConfig() 11 | if (!footer) { 12 | return null 13 | } 14 | const { copyright, links, logo, style } = footer 15 | 16 | return ( 17 | 0 && } 20 | logo={logo && } 21 | copyright={copyright && } 22 | /> 23 | ) 24 | } 25 | 26 | export default React.memo(Footer) 27 | -------------------------------------------------------------------------------- /src/theme/Icon/ExternalLink/index.tsx: -------------------------------------------------------------------------------- 1 | import type { Props } from '@theme/Icon/ExternalLink' 2 | import { type ReactNode } from 'react' 3 | 4 | import styles from './styles.module.css' 5 | 6 | export default function IconExternalLink({ width = 18, height = 18 }: Props): ReactNode { 7 | return ( 8 | 31 | ) 32 | } 33 | -------------------------------------------------------------------------------- /src/theme/Icon/ExternalLink/styles.module.css: -------------------------------------------------------------------------------- 1 | .iconExternalLink { 2 | margin-left: 0.3rem; 3 | } 4 | -------------------------------------------------------------------------------- /src/theme/Icon/Home/index.tsx: -------------------------------------------------------------------------------- 1 | import type { Props } from '@theme/Icon/Home' 2 | import { type ReactNode } from 'react' 3 | 4 | export default function IconHome(props: Props): ReactNode { 5 | return ( 6 | 7 | 14 | 15 | ) 16 | } 17 | -------------------------------------------------------------------------------- /src/theme/Logo/index.tsx: -------------------------------------------------------------------------------- 1 | import Link from '@docusaurus/Link' 2 | import { useThemeConfig } from '@docusaurus/theme-common' 3 | import useBaseUrl from '@docusaurus/useBaseUrl' 4 | import { useMediaQuery } from '@site/src/hooks/useMediaQuery' 5 | import type { Props } from '@theme/Logo' 6 | import { type ReactNode } from 'react' 7 | 8 | function LogoThemedImage() { 9 | const isMobile = useMediaQuery('(max-width: 768px)') 10 | 11 | const mobileLogo = useBaseUrl('/img/branding/pi.svg') 12 | const desktopLogo = useBaseUrl('/img/branding/optimai-documentation-logo.svg') 13 | const source = isMobile ? mobileLogo : desktopLogo 14 | 15 | return OptimAI Documentation Logo 16 | } 17 | 18 | export default function Logo(props: Props): ReactNode { 19 | const { 20 | navbar: { logo }, 21 | } = useThemeConfig() 22 | 23 | const { imageClassName, titleClassName, ...propsRest } = props 24 | const logoLink = useBaseUrl(logo?.href || '/') 25 | 26 | return ( 27 | 28 | 29 | 30 | ) 31 | } 32 | -------------------------------------------------------------------------------- /src/theme/PaginatorNavLink/index.tsx: -------------------------------------------------------------------------------- 1 | import Link from '@docusaurus/Link' 2 | import type { Props } from '@theme/PaginatorNavLink' 3 | import clsx from 'clsx' 4 | import { type ReactNode } from 'react' 5 | 6 | export default function PaginatorNavLink(props: Props): ReactNode { 7 | const { permalink, title, subLabel, isNext } = props 8 | return ( 9 | 13 | {subLabel && ( 14 |
    15 | {!isNext && ( 16 | 27 | 28 | 29 | 30 | )} 31 | {subLabel} 32 | {isNext && ( 33 | 44 | 45 | 46 | 47 | )} 48 |
    49 | )} 50 |
    51 | {!isNext && ( 52 | 63 | 64 | 65 | 66 | )} 67 | {title} 68 | {isNext && ( 69 | 80 | 81 | 82 | 83 | )} 84 |
    85 | 86 | ) 87 | } 88 | -------------------------------------------------------------------------------- /src/theme/SearchPage/styles.module.scss: -------------------------------------------------------------------------------- 1 | @use '@site/src/styles/common/color.scss' as *; 2 | @use '@site/src/styles/common/media.scss' as *; 3 | 4 | .searchQueryInput, 5 | .searchVersionInput { 6 | width: 100%; 7 | font-size: 1.6rem; 8 | line-height: 1.63; 9 | font-weight: 400; 10 | color: white; 11 | height: 4.4rem; 12 | background-color: rgba($accent, 0.8); 13 | box-shadow: none; 14 | padding: 0 1.6rem; 15 | border-radius: 0.8rem; 16 | border: 1px solid rgba(255, 255, 255, 0.1); 17 | margin-bottom: 0.8rem; 18 | } 19 | 20 | .searchQueryInput:focus, 21 | .searchVersionInput:focus { 22 | border-color: rgba(255, 255, 255, 0.4); 23 | outline: none; 24 | } 25 | 26 | .searchQueryInput::placeholder { 27 | color: rgba(white, 0.5); 28 | } 29 | 30 | .searchResultsColumn { 31 | font-size: 1.6rem; 32 | color: rgba(white, 0.5); 33 | margin-bottom: 2.4rem; 34 | } 35 | 36 | .algoliaLogo { 37 | max-width: 150px; 38 | } 39 | 40 | .algoliaLogoPathFill { 41 | fill: var(--ifm-font-color-base); 42 | } 43 | .searchLogoColumn { 44 | display: none; 45 | } 46 | 47 | .searchResultItem { 48 | width: 100%; 49 | overflow: hidden; 50 | padding: 2rem 0; 51 | border-bottom: 1px solid rgba(255, 255, 255, 0.1); 52 | 53 | ul { 54 | gap: 0.4rem !important; 55 | } 56 | 57 | li { 58 | color: rgba(white, 0.5); 59 | font-size: 1.6rem; 60 | line-height: 1.5; 61 | font-weight: 300; 62 | gap: 0.4rem; 63 | &:after { 64 | margin: 0 !important; 65 | transform: translateY(1px); 66 | } 67 | } 68 | } 69 | 70 | .searchResultItemHeading { 71 | font-weight: 500; 72 | font-size: 2rem; 73 | line-height: 1.5; 74 | margin-bottom: 0; 75 | 76 | a { 77 | &:hover { 78 | // text-decoration: none; 79 | text-underline-offset: 2px; 80 | } 81 | } 82 | } 83 | 84 | .searchResultItemPath { 85 | font-size: 0.8rem; 86 | color: var(--ifm-color-content-secondary); 87 | --ifm-breadcrumb-separator-size-multiplier: 1; 88 | } 89 | 90 | .searchResultItemSummary { 91 | margin: 0.5rem 0 0; 92 | color: rgba(white, 0.5); 93 | font-style: italic; 94 | } 95 | 96 | @media only screen and (max-width: 996px) { 97 | .searchQueryColumn { 98 | max-width: 60% !important; 99 | } 100 | 101 | .searchVersionColumn { 102 | max-width: 40% !important; 103 | } 104 | 105 | .searchResultsColumn { 106 | max-width: 60% !important; 107 | } 108 | 109 | .searchLogoColumn { 110 | display: none; 111 | max-width: 40% !important; 112 | padding-left: 0 !important; 113 | } 114 | } 115 | 116 | @media screen and (max-width: 576px) { 117 | .searchQueryColumn { 118 | max-width: 100% !important; 119 | } 120 | 121 | .searchVersionColumn { 122 | max-width: 100% !important; 123 | padding-left: var(--ifm-spacing-horizontal) !important; 124 | } 125 | } 126 | 127 | .loadingSpinner { 128 | width: 3rem; 129 | height: 3rem; 130 | border: 0.4em solid #eee; 131 | border-top-color: var(--ifm-color-primary); 132 | border-radius: 50%; 133 | animation: loading-spin 1s linear infinite; 134 | margin: 0 auto; 135 | } 136 | 137 | @keyframes loading-spin { 138 | 100% { 139 | transform: rotate(360deg); 140 | } 141 | } 142 | 143 | .loader { 144 | margin-top: 2rem; 145 | } 146 | 147 | :global(.search-result-match) { 148 | // background: var(--Gradient, linear-gradient(90deg, #f6f655 0%, #5eed87 100%)); 149 | // background-clip: text; 150 | // -webkit-background-clip: text; 151 | // -webkit-text-fill-color: transparent; 152 | color: #5eed87; 153 | } 154 | -------------------------------------------------------------------------------- /src/theme/TOC/index.tsx: -------------------------------------------------------------------------------- 1 | import React, {type ReactNode} from 'react'; 2 | import clsx from 'clsx'; 3 | import TOCItems from '@theme/TOCItems'; 4 | import type {Props} from '@theme/TOC'; 5 | 6 | import styles from './styles.module.css'; 7 | 8 | // Using a custom className 9 | // This prevents TOCInline/TOCCollapsible getting highlighted by mistake 10 | const LINK_CLASS_NAME = 'table-of-contents__link toc-highlight'; 11 | const LINK_ACTIVE_CLASS_NAME = 'table-of-contents__link--active'; 12 | 13 | export default function TOC({className, ...props}: Props): ReactNode { 14 | return ( 15 |
    16 | 21 |
    22 | ); 23 | } 24 | -------------------------------------------------------------------------------- /src/theme/TOC/styles.module.css: -------------------------------------------------------------------------------- 1 | .tableOfContents { 2 | max-height: calc(100vh - (var(--ifm-navbar-height) + 4.8rem)); 3 | overflow-y: auto; 4 | position: sticky; 5 | top: calc(var(--ifm-navbar-height) + 2.4rem); 6 | } 7 | 8 | @media (max-width: 996px) { 9 | .tableOfContents { 10 | display: none; 11 | } 12 | 13 | .docItemContainer { 14 | padding: 0 0.3rem; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/theme/TOCCollapsible/CollapseButton/index.tsx: -------------------------------------------------------------------------------- 1 | import Translate from '@docusaurus/Translate' 2 | import type { Props } from '@theme/TOCCollapsible/CollapseButton' 3 | import clsx from 'clsx' 4 | import { type ReactNode } from 'react' 5 | 6 | import styles from './styles.module.scss' 7 | 8 | export default function TOCCollapsibleCollapseButton({ collapsed, ...props }: Props): ReactNode { 9 | return ( 10 | 43 | ) 44 | } 45 | -------------------------------------------------------------------------------- /src/theme/TOCCollapsible/CollapseButton/styles.module.scss: -------------------------------------------------------------------------------- 1 | .tocCollapsibleButton { 2 | display: flex; 3 | align-items: center; 4 | justify-content: space-between; 5 | gap: 1rem; 6 | padding: 1rem 1.2rem; 7 | width: 100%; 8 | 9 | span { 10 | font-size: 1.6rem; 11 | line-height: normal; 12 | font-weight: 500; 13 | } 14 | 15 | svg { 16 | transition: transform 0.2s ease-in-out; 17 | } 18 | } 19 | 20 | .tocCollapsibleButtonExpanded { 21 | svg { 22 | transform: rotate(180deg); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/theme/TOCCollapsible/index.tsx: -------------------------------------------------------------------------------- 1 | import { Collapsible, useCollapsible } from '@docusaurus/theme-common' 2 | import type { Props } from '@theme/TOCCollapsible' 3 | import CollapseButton from '@theme/TOCCollapsible/CollapseButton' 4 | import TOCItems from '@theme/TOCItems' 5 | import clsx from 'clsx' 6 | import { type ReactNode } from 'react' 7 | 8 | import styles from './styles.module.scss' 9 | 10 | export default function TOCCollapsible({ toc, className, minHeadingLevel, maxHeadingLevel }: Props): ReactNode { 11 | const { collapsed, toggleCollapsed } = useCollapsible({ 12 | initialState: true, 13 | }) 14 | return ( 15 |
    16 | 17 | 18 | 19 | 20 |
    21 | ) 22 | } 23 | -------------------------------------------------------------------------------- /src/theme/TOCCollapsible/styles.module.scss: -------------------------------------------------------------------------------- 1 | @use '@site/src/styles/common/color.scss' as *; 2 | 3 | .tocCollapsible { 4 | background-color: rgba($secondary, 0.6); 5 | border: 1px solid rgba($secondary, 0.6); 6 | border-radius: 0.8rem; 7 | overflow: hidden; 8 | margin-bottom: 2rem; 9 | } 10 | 11 | .tocCollapsibleExpanded { 12 | border-color: rgba(white, 0.1); 13 | } 14 | 15 | .tocCollapsibleContent > ul { 16 | border-left: none; 17 | border-top: 1px solid rgba(white, 0.1); 18 | padding: 1.2rem 1.6rem 1rem; 19 | display: flex; 20 | flex-direction: column; 21 | gap: 1.2rem; 22 | } 23 | 24 | .tocCollapsibleContent ul li { 25 | margin: 0; 26 | font-size: 1.4rem; 27 | line-height: 1.63; 28 | color: white; 29 | 30 | ul { 31 | margin-top: 1.2rem; 32 | display: flex; 33 | flex-direction: column; 34 | gap: 1.2rem; 35 | padding-left: 1.6rem; 36 | } 37 | } 38 | 39 | .tocCollapsibleContent a { 40 | display: block; 41 | &:hover { 42 | color: #f6f655; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /static/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OptimaiNetwork/docs/ec3924aaab0eaef4bedacd57679c2af1db04233f/static/.nojekyll -------------------------------------------------------------------------------- /static/fonts/actual.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OptimaiNetwork/docs/ec3924aaab0eaef4bedacd57679c2af1db04233f/static/fonts/actual.otf -------------------------------------------------------------------------------- /static/img/branding/optimai-documentation-logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 11 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /static/img/branding/pi.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /static/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OptimaiNetwork/docs/ec3924aaab0eaef4bedacd57679c2af1db04233f/static/img/favicon.ico -------------------------------------------------------------------------------- /static/img/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /static/img/optimai-logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /static/img/social-card.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OptimaiNetwork/docs/ec3924aaab0eaef4bedacd57679c2af1db04233f/static/img/social-card.jpeg -------------------------------------------------------------------------------- /static/img/social-card.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OptimaiNetwork/docs/ec3924aaab0eaef4bedacd57679c2af1db04233f/static/img/social-card.png -------------------------------------------------------------------------------- /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 | "types": ["docusaurus-plugin-sass"] 7 | }, 8 | "exclude": [".docusaurus", "build"] 9 | } 10 | --------------------------------------------------------------------------------