How kirtygupta/investrix works
Project type and purpose
• This is a full-stack web application (“Investrix”) whose goal is to match investors and SMEs, facilitate AI-powered document verification, and execute a bidding/payments system on the Aptos blockchain.
• The frontend is built in Next.js/React with TailwindCSS. There’s a backend service (Python/Express/GraphQL style), Firebase for auth & data, Gemini AI integration for KYC/document checks, and an Aptos Move module under payment/.
File structure
• Top level:
• .env.example, .gitignore, README.md – global configs.
• frontend/ – Next.js app, API routes (src/app/api/edgestore), UI components, page routes under src/app/dashboard, login, signup.
• backend/ – single service in app.py with dependencies in requirements.txt.
• payment/ – Aptos Move smart contract module.
• Patterns & responsibilities:
• Frontend follows Next.js App Router (server and client components, API routes).
• Backend likely exposes GraphQL/REST endpoints for business logic not handled by Next.js APIs.
• Firebase config and NextAuth reside in frontend/src/app/... and clientProviders.tsx.
• The Move module in payment/sources implements on-chain bidding logic.
README for architectural clues
• Confirms tech stack: Next.js (frontend), Node/Express/GraphQL (backend), Firebase (DB & Auth), Gemini API (AI service), Aptos blockchain (payments).
• Describes authentication, matching engine, bidding, verification, and transaction recording steps.
a. Main components
• User’s Browser / Client (React UI)
• Next.js Frontend (Pages + API routes)
• Backend Service (app.py – business logic & GraphQL/REST)
• Firebase (Authentication, Firestore/Realtime DB)
• Gemini AI Service (external API)
• Aptos Blockchain (Move Module)
b. Relationships & interactions
• Browser ↔ Next.js: SSR/CSR pages, client calls to Next.js API routes.
• Next.js API routes ↔ Backend: internal HTTP/GraphQL calls for matchmaking & bidding orchestration.
• Backend ↔ Firebase: read/write user data, profiles, bid history.
• Backend ↔ Gemini API: document verification requests & results.
• Backend ↔ Aptos Node / Payment Module: submit on-chain transactions for bids/funding.
c. Architectural patterns & principles
• Layered architecture: Presentation (Next.js), Application (API, backend), Data (Firebase, blockchain).
• Separation of concerns: Authentication & real-time data in Firebase, heavy logic in backend, UI in frontend.
• Extensibility points: Next.js API routes for edge handling, backend plugins for new AI services, Move contracts for new payment flows.
d. Key technologies
• Next.js App Router, TailwindCSS, React components
• Firebase SDK & NextAuth
• Python/Express/GraphQL in backend/app.py
• Gemini AI (external REST API)
• Aptos Move (payment/sources/MyPaymentModule.move)