diff --git a/.env.local b/.env.local new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/.env.local @@ -0,0 +1 @@ + diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..a547bf36 --- /dev/null +++ b/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/App.tsx b/App.tsx new file mode 100644 index 00000000..867b0a3a --- /dev/null +++ b/App.tsx @@ -0,0 +1,230 @@ + +import React, { useState, useEffect } from 'react'; +import { motion, AnimatePresence } from 'framer-motion'; +import { AppView } from './types'; +import Navbar from './components/Navbar'; +import Landing from './components/Landing'; +import Dashboard from './components/Dashboard'; +import Marketplace from './components/Marketplace'; +import TechSpec from './components/TechSpec'; +import Auth from './components/Auth'; +import ProfileSettings from './components/ProfileSettings'; +import Contribution from './components/Contribution'; +import Documentation from './components/Documentation'; +import Governance from './components/Governance'; +import { ShieldCheck, Lock, CheckCircle2, X, ExternalLink } from 'lucide-react'; + +const App: React.FC = () => { + const [view, setView] = useState(AppView.LANDING); + const [isScrolled, setIsScrolled] = useState(false); + const [isLoggedIn, setIsLoggedIn] = useState(false); + const [showSecurityAudit, setShowSecurityAudit] = useState(false); + const [docInitialSection, setDocInitialSection] = useState(undefined); + + useEffect(() => { + const handleScroll = () => { + setIsScrolled(window.scrollY > 20); + }; + window.addEventListener('scroll', handleScroll); + + const session = localStorage.getItem('bazaar_session'); + if (session) { + setIsLoggedIn(true); + } + + return () => window.removeEventListener('scroll', handleScroll); + }, []); + + const handleLogout = () => { + localStorage.removeItem('bazaar_session'); + setIsLoggedIn(false); + setView(AppView.LANDING); + }; + + const handleSecurityClick = () => { + setDocInitialSection('privacy-zkp'); + setView(AppView.DOCUMENTATION); + setShowSecurityAudit(true); + }; + + const renderView = () => { + switch (view) { + case AppView.LANDING: + return ( + + setView(AppView.DASHBOARD)} + onOpenDoc={() => setView(AppView.DOCUMENTATION)} + /> + + ); + case AppView.DASHBOARD: + return ; + case AppView.MARKETPLACE: + return ; + case AppView.CONTRIBUTION: + return ; + case AppView.SPECIFICATION: + return ; + case AppView.SETTINGS: + return ; + case AppView.GOVERNANCE: + return ; + case AppView.DOCUMENTATION: + return ( + + setView(AppView.LANDING)} + initialSection={docInitialSection} + /> + + ); + default: + return setView(AppView.DASHBOARD)} onOpenDoc={() => setView(AppView.DOCUMENTATION)} />; + } + }; + + if (!isLoggedIn) { + return ( + + setIsLoggedIn(true)} /> + + ); + } + + return ( +
+ + + + {showSecurityAudit && ( + + + + +
+
+ +
+
+

Security Audit Suite

+
+ All Systems Operational +
+
+
+ +
+

> Initializing AVM Opcode Scan...

+

> ec_pairing_check: [VERIFIED]

+

> ec_add: [VERIFIED]

+

> ec_scalar_mul: [VERIFIED]

+

> Auditing Smart Signature 'Bazaar_Main_v1.0'...

+

> Reentrancy Guard: ACTIVE

+

> Overflow Protection: AVM NATIVE

+

> BN254 Curve Verification Key: 0x82...F91A

+

> Scan complete. 0 vulnerabilities found.

+
+ +
+
+
Audit Firm
+
Algorand Foundation Security
+
+
+
Last Full Audit
+
24 Oct 2026
+
+
+
+
+ )} +
+ +
+ + {renderView()} + +
+ +
+
+
+
+
+ + Bazaar.ai + +
+

+ The foundational liquidity layer for private, trustless AI compute. Built on Algorand for the next generation of sovereign intelligence. +

+
+ + Verified Algorand Ecosystem Partner +
+
+ +
+

Protocol

+
    +
  • +
  • +
  • +
  • +
+
+ + + + +
+
+

Β© 2026 Training Bazaar Protocol. Powered by Algorand AVM.

+
+ Status: Operational + Mainnet-v1.0.4-Bazaar +
+
+
+
+ ); +}; + +export default App; diff --git a/README.md b/README.md index d4b159ef..4a8b7ea6 100644 --- a/README.md +++ b/README.md @@ -1,148 +1 @@ -# Algorand-dApp-Quick-Start-Template-TypeScript - -This is a full-stack starter template for quickly building and testing Web3 ideas on Algorand. It includes: - -- Wallet connection -- Send ALGO or USDC payments -- NFT minting (IPFS metadata via Pinata) -- Asset (ASA) creation -- Smart contract interaction demo - -Use this template to kickstart your project, prototype ideas, and showcase a working proof-of-concept. - -## 🌟 How To Get Started Instructions - -### **Fork the Repo:** - -To create your own copy of this repository: - -a. **Go to the GitHub Repository:** - - Navigate to the main page which is the current one your on. - -b. **Click the "Fork" Button:** - - In the top-right corner of the page, click the **Fork** button. This will create a copy of the repository under your GitHub account. Feel free to hit the ⭐️ aswell so you can find the Algorand-dApp-Quick-Start-Template-Typescript repo easily! - -c. **Wait for the Forking Process to Complete:** - - GitHub will take a few moments to create the fork. Once complete, you’ll be redirected to your newly created fork. - - -https://github.com/user-attachments/assets/92e746e1-3143-4769-8a5a-1339e4bd7a14 - - -## πŸš€ Start with Codespaces -This is the fastest way to get up and running! - -1. **Create a Codespace:** - - - Click the green "Code" button at the top right of your forked repo. - - Select "Create codespace on main". - - Once your Codespace is fully loaded, you are ready to go. - - Run the set up command below in your terminal it should only take a few mins. - - ```bash - bash setup.sh - ``` - -2. **While in Codespace:** - - - After you successfully ran the setup in your terminal then enter your workspace. Like seen in the picture below! - - image - -3. **While in Workspace: ⚠️ Important Environment Setup** - - **1. Network Settings (Frontend) 🌐** - - This setup is required to get the webpage running and connected to the correct Algorand network. - - Path: `QuickStartTemplate/projects/QuickStartTemplate-frontend` - - Steps: - - Locate the file `.env.template` in the path above. - - Create a new file named `.env` in the same folder as the path above. - - Copy all contents from `.env.template` - - Paste into your new .env file. - - **2. NFT Minting (Pinata) πŸ–ΌοΈ** - - This setup is required only if you plan to use the NFT Minting functionality. - - Path: `QuickStartTemplate-contracts/nft_mint_server` - - Steps: - - Locate the file `.env.template` in the path above. - - Copy all the contents of `.env.template`. - - Create a new file named `.env` in the same folder. - - Paste the copied content into your `.env`. - - Follow the instructions inside `.env.template` to generate your **Pinata API Key** and **Secret Key**, and replace the placeholders in your new `.env` file. - -## Final Step: Run the project! - > πŸ’‘ **Note:** You can stay in the **root directory** of the project when running the command. - > (This is usually the folder automatically opened when entering the Workspace, so you don’t need to move elsewhere.) - - Once your `.env` files are ready (Expecially the Network one), run the command below to start the project: - - ```bash - npm run dev - ``` - - After running the command, open the localhost URL shown in your terminal. - - **Important: Set Visibility** - You’ll likely see a pop-up in the bottom-right corner. Click Set public to make the server accessible. - OR **manually go to the Ports section, right-click the 3001 port, and set its visibility to Public.** - - image - -## The Entire Process in a 2 min video: - -Check out this demonstration video of the entire process above if you prefer a visual walkthrough. -You can find it on Google Drive here: https://drive.google.com/file/d/183j8jtXsYzDEmVw-FxGTVvwAhPBh5SRy/view?usp=sharing - -## Pro Tip! -GitHub Codespaces is included with free accounts but comes with a monthly limit of 60 hours. - -To avoid losing your progress, be sure to **commit your changes regularly** β€” just like shown in the video demo below β€” so your updates are saved to your forked repository. - -https://github.com/user-attachments/assets/dd452ea1-3070-4718-af34-bea978e208ab - - -## Project Structure Simplified - -**Front-end Files** -- `projects/QuickStartTemplate-frontend/src/` β€” Frontend Webpage files -- `projects/QuickStartTemplate-frontend/src/Home.tsx` - Homepage (you can design this page) -- `projects/QuickStartTemplate-frontend/src/App.tsx` β€” Main app layout and routing -- `projects/QuickStartTemplate-frontend/src/components/Transact.tsx` β€” Simple transfer ALGO & USDC, Opt-In and Atomic Transfer Logic -- `projects/QuickStartTemplate-frontend/src/components/NFTmint.tsx` β€” Simple NFT minting interface -- `projects/QuickStartTemplate-frontend/src/components/Tokenmint.tsx` β€” Simple token (ASA) minting interface -- `projects/QuickStartTemplate-frontend/src/components/AppCalls.tsx` β€” Smart contract interaction demo - -**Back-end Files** -- `projects/QuickStartTemplate-contracts/smart_contracts/hello_world/contract.algo.ts` β€” Example TypeScript smart contract (Default AlgoKit Hello World) -- `projects/QuickStartTemplate-contracts/nft_mint_server/` β€” Backend server for NFT minting (contains `.env.template` and where you create your own `.env`) - - -## Bonus Resources & Reference Guide - -Need more help? See the Algorand-dApp-Quick-Start-Template Reference Guide for step-by-step instructions, AI prompts, and troubleshooting tips: - -[View the guide](https://docs.google.com/document/d/1f_ysbtFOLKM_Tjvey7VCcGYsAzOmyEVmsdC5si936wc/edit?usp=sharing) - -Below are videos on: -- How to connect to Testnet on Pera -- How to use the Algo Dispenser -- How to use the USDC Dispenser - -**How to connext to testnet on Pera Wallet** - -https://github.com/user-attachments/assets/31df8135-119e-4529-9539-4943de979719 - -**How to use the Algo Dispenser** - -https://github.com/user-attachments/assets/643cae10-4673-4b68-8e95-4a3f16fbba60 - -**How to use the USDC Dispenser** - -https://github.com/user-attachments/assets/a76e90fa-97f4-44f8-a7e8-a8ccabd24398 - +The Training Bazaar AI marketplace Algorand project invloves developers the ability to rent AI models or AI agents from the marketplace with Algorand coins and the second feature of the project invloves A reward system where the user can mine Algorand coins and withdraw the Algo rewards directly to his pera wallet. diff --git a/constants.tsx b/constants.tsx new file mode 100644 index 00000000..36df1fd1 --- /dev/null +++ b/constants.tsx @@ -0,0 +1,67 @@ + +import React from 'react'; + +export const COLORS = { + primary: '#00D1FF', + secondary: '#7000FF', + accent: '#FF00E5', + bg: '#020617', + card: '#0f172a', +}; + +export const ALGORAND_ICON = ( + + + +); + +export const MODELS: any[] = [ + { + id: 'm1', + name: 'NeuralSense NLP-7B', + type: 'Language Model', + accuracy: 94.2, + rentalPrice: 0.5, + provider: 'AlgoLabs_Alpha', + description: 'Specialized for sentiment analysis in decentralized finance contexts.' + }, + { + id: 'm2', + name: 'VisionSecure V2', + type: 'Computer Vision', + accuracy: 89.8, + rentalPrice: 1.2, + provider: 'PrivateCompute_DAO', + description: 'Edge-optimized object detection with ZK-verified training integrity.' + }, + { + id: 'm3', + name: 'MarketPredict Pro', + type: 'Time Series', + accuracy: 76.5, + rentalPrice: 0.8, + provider: 'QuantVault', + description: 'High-frequency market trend analysis based on private on-chain signals.' + } +]; + +export const CAMPAIGNS: any[] = [ + { + id: 'c1', + title: 'Medical Imaging Privacy Set', + reward: '2.5 ALGO / batch', + type: 'Data Contribution', + status: 'Active', + progress: 64, + provers: 1240 + }, + { + id: 'c2', + title: 'LLM Reinforcement Learning', + reward: '0.8 ALGO / GFLOPS', + type: 'Compute Provisioning', + status: 'Active', + progress: 42, + provers: 582 + } +]; diff --git a/index.html b/index.html new file mode 100644 index 00000000..1f8aadb8 --- /dev/null +++ b/index.html @@ -0,0 +1,80 @@ + + + + + + + Training Bazaar | Algorand Decentralized AI + + + + + + + +
+
+ + + diff --git a/index.tsx b/index.tsx new file mode 100644 index 00000000..aaa0c6e4 --- /dev/null +++ b/index.tsx @@ -0,0 +1,16 @@ + +import React from 'react'; +import ReactDOM from 'react-dom/client'; +import App from './App'; + +const rootElement = document.getElementById('root'); +if (!rootElement) { + throw new Error("Could not find root element to mount to"); +} + +const root = ReactDOM.createRoot(rootElement); +root.render( + + + +); diff --git a/metadata.json b/metadata.json new file mode 100644 index 00000000..836c4814 --- /dev/null +++ b/metadata.json @@ -0,0 +1,5 @@ +{ + "name": "Training Bazaar - Decentralized AI Marketplace 2026 new", + "description": "A high-performance dApp concept for private AI model training on the Algorand blockchain using Zero-Knowledge Proofs.", + "requestFramePermissions": [] +} \ No newline at end of file diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index 93decc74..01a70211 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -1,5 +1,5 @@ { - "name": "Algorand-dApp-Quick-Start-Template-TypeScript", + "name": "Algo-training-bazaar", "lockfileVersion": 3, "requires": true, "packages": { diff --git a/package-lock.json b/package-lock.json index 505b9886..3e3b40a9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "Algorand-dApp-Quick-Start-Template-TypeScript", + "name": "Algo-training-bazaar", "lockfileVersion": 3, "requires": true, "packages": { diff --git a/package.json b/package.json index 3f18962f..9ac29c2f 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,24 @@ { - "devDependencies": { - "@algorandfoundation/algokit-client-generator": "^6.0.0", - "concurrently": "^9.2.1" + "name": "training-bazaar---decentralized-ai-marketplace-2026-new", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview" }, "dependencies": { - "react-icons": "^5.5.0" + "react": "^19.2.3", + "react-dom": "^19.2.3", + "recharts": "^3.6.0", + "framer-motion": "^11.11.17", + "lucide-react": "^0.460.0" + }, + "devDependencies": { + "@types/node": "^22.14.0", + "@vitejs/plugin-react": "^5.0.0", + "typescript": "~5.8.2", + "vite": "^6.2.0" } } diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000..2c6eed55 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,29 @@ +{ + "compilerOptions": { + "target": "ES2022", + "experimentalDecorators": true, + "useDefineForClassFields": false, + "module": "ESNext", + "lib": [ + "ES2022", + "DOM", + "DOM.Iterable" + ], + "skipLibCheck": true, + "types": [ + "node" + ], + "moduleResolution": "bundler", + "isolatedModules": true, + "moduleDetection": "force", + "allowJs": true, + "jsx": "react-jsx", + "paths": { + "@/*": [ + "./*" + ] + }, + "allowImportingTsExtensions": true, + "noEmit": true + } +} \ No newline at end of file diff --git a/types.ts b/types.ts new file mode 100644 index 00000000..903b85be --- /dev/null +++ b/types.ts @@ -0,0 +1,28 @@ + +export enum AppView { + LANDING = 'LANDING', + DASHBOARD = 'DASHBOARD', + MARKETPLACE = 'MARKETPLACE', + SPECIFICATION = 'SPECIFICATION', + SETTINGS = 'SETTINGS', + CONTRIBUTION = 'CONTRIBUTION', + DOCUMENTATION = 'DOCUMENTATION', + GOVERNANCE = 'GOVERNANCE', +} + +export interface ModelAsset { + id: string; + name: string; + type: string; + accuracy: number; + rentalPrice: number; + provider: string; + description: string; +} + +export interface NetworkStats { + activeNodes: number; + totalCompute: string; + totalRewards: string; + dailyTransactions: number; +} diff --git a/vite.config.ts b/vite.config.ts new file mode 100644 index 00000000..ee5fb8d2 --- /dev/null +++ b/vite.config.ts @@ -0,0 +1,23 @@ +import path from 'path'; +import { defineConfig, loadEnv } from 'vite'; +import react from '@vitejs/plugin-react'; + +export default defineConfig(({ mode }) => { + const env = loadEnv(mode, '.', ''); + return { + server: { + port: 3000, + host: '0.0.0.0', + }, + plugins: [react()], + define: { + 'process.env.API_KEY': JSON.stringify(env.GEMINI_API_KEY), + 'process.env.GEMINI_API_KEY': JSON.stringify(env.GEMINI_API_KEY) + }, + resolve: { + alias: { + '@': path.resolve(__dirname, '.'), + } + } + }; +});