How guiartbp/hackathon-qitech works
Project type and purpose
• This is a full-stack P2P finance platform.
• Frontend: Next.js + Tailwind UI layers under web/src/app/(frontend) and React components in web/src/components.
• Backend: Next.js API routes under web/src/app/(backend)/api plus standalone routes in web/src/app/api.
• Data layer: PostgreSQL via Prisma (Supabase).
• External services: Stripe Connect (OAuth, webhooks), Blockchain/EVM (Solidity & Hardhat), BetterAuth, AWS KMS, Python ML engine.
File structure
• Root folders:
• web/ : the monorepo’s Next.js app (UI + serverless functions).
• bruno/: Bruno API specification & mocks (used for API contract testing).
• Scripts & config: Prisma migrations in web/prisma, Hardhat under web/contracts & web/ignition, deployment scripts in web/scripts, tests in web/tests.
• Architectural patterns:
• Hybrid Next.js with separate (backend) folder for API logic & (frontend) for UI.
• Service layer under web/src/app/(backend)/services, schema definitions under web/src/app/(backend)/schemas.
• Microservice: Python FastAPI scoring engine runs separately.
• Smart contracts managed by Hardhat + TypeChain, deployed via scripts.
• Config and infra files:
• .env.example for env vars, hardhat.config.ts, pnpm-workspace.yaml, Docker/AWS KMS references in README.
README for additional insights
• Describes high-level workflow: user auth (BetterAuth), Stripe data ingestion, ML score, on-chain contract creation, dynamic payments via Stripe, audit via webhooks.
• Stacks: Next.js + Node.js for API, Python + Scikit-learn for ML, Solidity for on-chain, PostgreSQL/Prisma, Stripe Connect + OAuth, BetterAuth, Docker + AWS KMS.
Don’t overthink—capture all distinct components
• Static assets & public routes (public folder) as part of FE.
• Test mocks (Bruno) if illustrating CI/integration tests.