A full-stack application for fractional ownership of raw land through blockchain technology, built with Next.js frontend and NestJS backend.
- Node.js 18+ and pnpm
- Docker and Docker Compose (optional)
- Phantom Wallet browser extension
cd apps/api
cp .env.example .envEdit .env with your values:
# Database
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/deedify
# Solana
HELIUS_RPC_URL=https://devnet.helius-rpc.com/?api-key=11d1056e-2fdc-43bc-a985-c649236d3af1
ANCHOR_PROVIDER_URL=https://devnet.helius-rpc.com/?api-key=11d1056e-2fdc-43bc-a985-c649236d3af1
# App
JWT_SECRET=your_jwt_secret_change_me
PORT=4000
USE_MOCK_ESCROW=truecd frontend
cp .env.example .env.localEdit .env.local:
NEXT_PUBLIC_API_BASE_URL=http://localhost:4000
NEXT_PUBLIC_SOLANA_RPC=https://devnet.helius-rpc.com/?api-key=11d1056e-2fdc-43bc-a985-c649236d3af1# Start PostgreSQL and Redis
docker-compose -f docker/docker-compose.yml up -dInstall PostgreSQL locally and update DATABASE_URL in .env
# Install dependencies (from root)
pnpm install
# Backend setup
cd apps/api
pnpm prisma migrate dev
pnpm prisma db seed
# Start backend (from apps/api)
pnpm dev
# Start frontend (from frontend)
cd ../../frontend
pnpm dev- Frontend: http://localhost:3000
- Backend API: http://localhost:4000
- API Documentation: http://localhost:4000/docs
- Go to http://localhost:3000
- Click "Register" and create an account
- Login with your credentials
- Install Phantom wallet extension
- Create/import a wallet
- Click "Connect Wallet" in the app
- Approve the connection
- Go to "Listings" page
- Click on any property to view details
- Enter number of shares to purchase
- Click "Purchase Shares"
- Complete the mock transaction
- Go to "My Holdings" page
- See your purchased land shares
- Track your investment performance
deedify/
βββ frontend/ # Next.js frontend
β βββ app/ # App router pages
β βββ components/ # React components
β βββ lib/ # API client & utilities
β βββ types/ # TypeScript types
βββ apps/api/ # NestJS backend
β βββ src/
β β βββ auth/ # Authentication
β β βββ listings/ # Land listings
β β βββ orders/ # Purchase orders
β β βββ holdings/ # User holdings
β β βββ marketplace/ # Trading
β β βββ ...
β βββ prisma/ # Database schema & migrations
βββ docker/ # Docker configuration
POST /auth/register- Register userPOST /auth/login- Login userGET /auth/profile- Get user profile
GET /listings- Get all listingsGET /listings/public- Get public listingsGET /listings/:id- Get listing details
POST /orders- Create purchase orderPOST /orders/:id/pay- Process paymentGET /orders- Get user orders
GET /holdings- Get user holdings
- User authentication (register/login)
- Phantom wallet integration
- Land listing browsing
- Fractional share purchasing (mock)
- Holdings tracking
- Responsive UI with Tailwind CSS
- Solana transaction processing (USE_MOCK_ESCROW=true)
- Payment processing
- NFT minting
- Real Solana/Anchor integration
- NFT collection & fractional minting
- Governance voting system
- Revenue distribution
- KYC verification
- Property valuation AI
- JWT tokens for API authentication
- CORS enabled for localhost:3000
- Input validation with Zod schemas
- SQL injection prevention with Prisma
- Wallet signature verification (TODO)
# Check if PostgreSQL is running
docker ps | grep postgres
# Reset database
cd apps/api
pnpm prisma migrate reset --force
pnpm prisma db seedcd frontend
rm -rf .next node_modules
pnpm install
pnpm dev- Ensure Phantom wallet is installed
- Check browser console for errors
- Try refreshing the page
- Backend: Add controller, service, repository
- Frontend: Add pages, components, API calls
- Update types and validation schemas
- Test the integration
cd apps/api
pnpm prisma migrate dev --name your_migration_name
pnpm prisma generate# Backend
NODE_ENV=production
DATABASE_URL=your_production_db_url
JWT_SECRET=your_secure_jwt_secret
USE_MOCK_ESCROW=false
# Frontend
NEXT_PUBLIC_API_BASE_URL=https://your-api-domain.com# Build and run with docker-compose
docker-compose -f docker/docker-compose.prod.yml up -d- Swagger UI: http://localhost:4000/docs
- Postman Collection: Available in
/docs/postman-collection.json - OpenAPI Spec: Available at
/docs/openapi.json
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
For issues and questions:
- Check the troubleshooting section
- Review the API documentation
- Create an issue on GitHub
Happy coding! π