Welcome to the Canopy project! This guide will help you set up your development environment and understand the project structure.
- Frontend: Next.js 15 (App Router), React, Tailwind CSS
- Authentication: Supabase Auth (Email + Xaman Wallet Support)
- Database: PostgreSQL (via Supabase), Prisma ORM
- Blockchain: XRPL Ledger (Testnet),
xrpl.js - AI Oracle Backend: Python (FastAPI), Scikit-learn
- Wallet Integration: Xaman (Xumm) SDK
- Node.js 18+
- pnpm (recommended)
- Docker (optional, if you want local DB)
- Python 3.9+ (for the AI Oracle backend)
- Git
-
Clone the repository:
git clone https://github.com/your-org/canopy.git cd canopy -
Install dependencies:
pnpm install
-
Environment Setup: Duplicate
.env.exampleto.envand fill in the required variables (Supabase, XRPL seeds, Xumm credentials).cp .env.example .env
-
Database Setup: Sync the Prisma schema with your database.
pnpm prisma migrate dev
-
Run the Development Server:
pnpm dev
Open http://localhost:3000 to view the app.
src/
├── app/ # Next.js App Router pages and API routes
│ ├── actions/ # Server Actions (Backend Logic)
│ ├── admin/ # System Admin Portal
│ ├── dashboard/ # Farmer Dashboard
│ └── ...
├── components/ # Reusable React components
├── lib/ # Utilities and Libraries
│ ├── xrpl/ # XRPL interaction logic (Escrow, NFT)
│ └── ...
└── prisma/ # Database schema and migrations
-
XRPL Verification Scripts: located in
scripts/. Usetsxto run them.npx tsx scripts/verify-phase1.ts
- We use TypeScript for type safety.
- Follow the "Soft Tech" design system (see
design.md). - Use Server Actions for data mutations.
Thank you for contributing!