<<<<<<< HEAD
Complete Real-World Asset tokenization platform with React frontend and Node.js backend
proptoken-iitkgp/
βββ frontend/ # React + TypeScript + Vite
β βββ src/
β β βββ api/ # Backend API client
β β βββ components/ # React components
β β βββ pages/ # Page components
β β βββ context/ # React context
β βββ public/ # Static assets
β βββ package.json
β βββ vite.config.ts
β
βββ backend/ # Node.js + Express
β βββ routes/ # API endpoints
β βββ services/ # Business logic
β βββ middleware/ # Auth middleware
β βββ cron/ # Scheduled jobs
β βββ contracts/ # Smart contracts
β βββ migrations/ # Database migrations
β βββ server.js # Main server
β βββ package.json
β
βββ .gitignore
βββ README.md
=======
A comprehensive Real-World Asset (RWA) tokenization platform featuring autonomous verification, legal automation, compliant security tokens, and secondary market trading.
This platform consists of 5 major layers:
- Asset submission interface
- Investor dashboard (portfolio, holdings)
- Issuer dashboard (token management, NAV updates)
- Secondary market trading (order book, limit orders)
- DeFi hub (lending, borrowing, collateral)
- Oracle evidence vault (satellite imagery, registries)
- Multi-oracle verification system
- Agent-Based Modeling (ABM) for fraud detection
- Consensus engine for eligibility scoring
- Legal workflow orchestration
- NEW: GraphQL API for market data
AssetRegistry.sol- Immutable asset fingerprintsRWASecurityToken.sol- ERC-3643 compliant security tokensAsyncRedemptionController.sol- ERC-7540 redemption logicTokenFactory.sol- Automated token deployment
- Satellite imagery verification (OpenStreetMap/Yandex)
- Computer vision analysis (mocked for free tier)
- Corporate registry validation (MCA)
- Merkle proof generation & ECDSA signing
- On-chain attestation publishing
- Token transfer indexing
- NAV update tracking
- Holder balance management
- Trade history aggregation
partner/main
- Node.js 18+ <<<<<<< HEAD
- PostgreSQL 14+
- Git
git clone https://github.com/hoursgotviral-dev/proptoken.iitkgphack.git
cd proptoken.iitkgphackcd backend
npm install
# Configure environment
cp .env.example .env
# Edit .env with your database credentials
# Start backend
npm start
# Backend runs on http://localhost:3003cd ../frontend
npm install
# Start frontend
npm run dev
# Frontend runs on http://localhost:5173- β React + TypeScript + Vite
- β Modern UI with Tailwind CSS
- β Role-based dashboards (CLIENT/BUILDER)
- β Real-time activity feed
- β Token portfolio management
- β Wallet integration ready
- β RESTful API with Express
- β JWT authentication
- β PostgreSQL database
- β Blockchain integration (Base Sepolia)
- β Activity tracking
- β Automated yield distribution
- β Smart contracts (ERC1155)
POST /auth/register- Register userPOST /auth/login- Login
GET /assets- List all assetsPOST /assets- Create asset (BUILDER)GET /assets/my-assets- Builder's assetsGET /assets/my-tokens- Client's tokensPOST /assets/:id/tokenize- Mint tokensPOST /assets/:id/buy- Purchase tokens
POST /swap- Swap tokensPOST /collateral/lock- Lock collateral
GET /dashboard- User metricsGET /activity/feed- Activity feedGET /activity/my-activity- User activity
PORT=3003
DATABASE_URL=postgresql://user:pass@localhost:5432/onblock
JWT_SECRET=your_secret_key
# Optional - for real blockchain
PRIVATE_KEY=0x...
RWA_CONTRACT_ADDRESS=0x...VITE_API_URL=http://localhost:3003
VITE_APP_NAME=PropTokencd backend
npm test
# Or run demo
cmd /c demo.batcd frontend
npm run test- React 19
- TypeScript
- Vite
- Tailwind CSS
- React Router
- Node.js
- Express
- PostgreSQL
- JWT
- Ethers.js
- Solidity
- Hardhat
- OpenZeppelin
- Base Sepolia
cd backend
# Deploy to your preferred platform
# Heroku, Railway, Render, etc.cd frontend
npm run build
# Deploy dist/ folder to Vercel, Netlify, etc.Built for IIT KGP Hackathon 2026
MIT License
π’ Frontend: READY
π’ Backend: OPERATIONAL
π’ Database: CONNECTED
π’ Blockchain: ACTIVE
Full Stack Ready β
- Go 1.21+
- Foundry (for smart contracts)
# 1. Install dependencies
npm install
cd proptoken-autonomous/backend && npm install --legacy-peer-deps
cd ../../oracle-network && go mod download
cd ../subgraph && npm install
# 2. Start all services (see STARTUP.md for details)
# Terminal 1: Frontend
npm run dev
# Terminal 2: Autonomous Backend
cd proptoken-autonomous/backend && npm start
# Terminal 3: Oracle Network
cd oracle-network && go run cmd/oracle/main.go
# Terminal 4: Local Blockchain (optional)
anvil --port 8545- Step 1: Legacy backend with wallet management
- Step 2: Autonomous verification pipeline
- Oracle Truth Layer (satellite, vision, registry)
- ABM-based fraud detection
- Consensus scoring
- Legal workflow automation
- Step 3: On-chain tokenization
- Asset registry with cryptographic proofs
- ERC-3643 security tokens
- Async redemption (ERC-7540)
- Foundry test suite
- Step 4: Oracle & Verification Layer
- Go-based oracle network
- Free-tier data sources (mocked APIs)
- Merkle tree generation
- Blockchain integration
- Step 5: Application & Market Layer
- Investor & issuer dashboards
- Secondary market trading (order book)
- DeFi integrations (lending, borrowing)
- GraphQL API backend
- The Graph subgraph
- Step 6: Integration & Deployment
- Production deployment
- Real KYC/payment integrations
- WebSocket real-time updates
proptoken2/
βββ pages/ # Frontend pages
β βββ InvestorDashboard.tsx # Portfolio & holdings
β βββ IssuerDashboard.tsx # Token management
β βββ TokenDetail.tsx # NAV charts & details
β βββ TradingPage.tsx # Order book & trading
β βββ DeFiPage.tsx # Lending & borrowing
βββ components/ # React components
βββ src/ # Legacy backend (Express)
βββ proptoken-autonomous/
β βββ backend/ # NestJS autonomous verification
β β βββ src/market/ # GraphQL API
β βββ contracts/ # Foundry smart contracts
βββ oracle-network/ # Go oracle service
β βββ cmd/ # Main entry point
β βββ internal/ # Core logic
β βββ pkg/ # Shared types
βββ subgraph/ # The Graph indexing
β βββ schema.graphql # Entity definitions
β βββ subgraph.yaml # Deployment config
β βββ src/mapping.ts # Event handlers
βββ valid_assets.json # Real Gurugram asset data
βββ STARTUP.md # Detailed startup guide
- ERC-3643: Identity-based transfers with KYC/AML compliance
- Role-Based Access Control: Admin, Minter, Compliance, Oracle roles
- Merkle Proofs: Cryptographic verification of off-chain data
- ECDSA Signatures: Oracle attestations signed with private keys
- Order Book Compliance: KYC checks before trade execution
The platform uses real coordinates for 5 major commercial properties in Gurugram:
- DLF Cyber Hub
- One Horizon Center
- Ambience Mall
- Worldmark Gurugram
- Candor TechSpace
Satellite imagery is fetched from Yandex Static Maps API.
cd proptoken-autonomous/contracts
forge testcd oracle-network
go test ./...Navigate to http://localhost:3001/graphql for GraphQL Playground
| Layer | Technology |
|---|---|
| Frontend | React, Vite, TypeScript, Chart.js |
| Backend | NestJS, Express, GraphQL, Apollo |
| Smart Contracts | Solidity 0.8.20, Foundry |
| Oracle | Go 1.21+, go-ethereum |
| Indexing | The Graph Protocol |
| Blockchain | Base/Arbitrum (L2), Anvil (local) |
| Data Sources | OpenStreetMap, Yandex Maps |
Zero-cost implementation using:
- Free satellite imagery (OpenStreetMap, Yandex)
- Mocked computer vision (simulated scores)
- Mocked registry APIs
- Local blockchain (Anvil)
- Mock lending/borrowing protocols
For production, estimated costs: ~$220/month for real API integrations.
- Sign up & complete KYC (mocked)
- Browse available tokens at
/fractional - View token details with NAV chart at
/tokens/:address - Buy tokens at current NAV (primary market)
- Trade on secondary market at
/market/:address - Lend tokens for yield at
/defi - Monitor portfolio at
/investor
- Submit asset for verification at
/autonomous/submit - Wait for oracle verification
- Review consensus score
- Deploy token via
TokenFactory - Manage token at
/issuer - Update NAV periodically
- Monitor investor activity
query {
tokens {
address
name
symbol
navPerToken
holders
apy
}
orderBook(tokenAddress: "0x5FbDB...") {
bids { price amount }
asks { price amount }
}
recentTrades(tokenAddress: "0x5FbDB...") {
price
amount
timestamp
}
}POST /submission/submit- Submit asset for verificationGET /submission/:id- Get submission statusGET /oracle/verify/:id- Trigger oracle verificationGET /consensus/:id- Get consensus score
MIT
This is a demonstration project showcasing the full stack of RWA tokenization. For production use:
- Replace mocked integrations with real APIs
- Deploy subgraph to The Graph hosted service
- Integrate real KYC provider (Onfido/Persona)
- Add payment processing (Stripe/Circle)
- Implement WebSocket for real-time updates
- Deploy to production blockchain (Base/Arbitrum)
Built with β€οΈ for the future of Real-World Asset tokenization
partner/main