π Decentralized Real Estate Infrastructure | Backend API for blockchain-powered property transactions
PropChain Backend is a production-grade server-side infrastructure that enables the tokenization and trading of real estate assets through blockchain technology. Our API provides the core services needed to build decentralized real estate platforms, including smart contract integration, secure transaction processing, and comprehensive property management capabilities.
Built with enterprise-grade technologies, this backend serves as the foundation for Web3 real estate applications, enabling developers to create platforms where physical properties can be represented as digital assets and traded seamlessly using cryptocurrency.
- π Asset Tokenization: Transform physical real estate properties into tradable NFTs with legal compliance
- π° Crypto Transaction Processing: Secure, multi-chain cryptocurrency payment processing
- π Smart Contract Integration: Pre-built contracts for property ownership, transfers, and escrow
- π Property Management APIs: Complete CRUD operations for real estate listings and metadata
- π Web3 Authentication: Wallet-based user authentication with role-based access control
- πΎ Enterprise Data Storage: Scalable PostgreSQL database with migration support
- π Multi-Chain Support: Ethereum, Polygon, and BSC network compatibility
- π Real-Time Analytics: Property valuation trends and market insights
- π Search & Discovery: Advanced filtering and geospatial property search
- π± Mobile-Ready API: RESTful endpoints optimized for mobile applications
- π‘οΈ Security First: Built-in rate limiting, input validation, and audit logging
This backend is designed for:
- Real Estate Tech Companies building blockchain-based property platforms
- Property Investment Firms seeking fractional ownership solutions
- Blockchain Developers creating DeFi real estate applications
- Real Estate Agencies modernizing their transaction infrastructure
- FinTech Startups integrating real estate into their crypto ecosystems
Ensure you have the following installed:
- Node.js v18+ (LTS recommended)
- npm or yarn package manager
- PostgreSQL v14+
- Rust toolchain (for smart contract compilation)
- Git version control
# 1. Clone the repository
git clone https://github.com/MettaChain/PropChain-BackEnd.git
cd PropChain-BackEnd
# 2. Install dependencies
npm install
# 3. Set up environment variables
cp .env.example .env
# Edit .env with your configuration
# 4. Initialize database
createdb propchain
npm run migrate
# 5. Start development server
npm run devThe API will be available at http://localhost:3000 with interactive Swagger docs at http://localhost:3000/api.
npm run dev # Start development server with hot reload
npm run start:dev # Start with debug logging
npm run test:watch # Run tests in watch modenpm run build # Compile TypeScript to JavaScript
npm start # Start production server
npm run health # Health check endpointnpm test # Run unit tests
npm run test:integration # Run integration tests
npm run test:e2e # Run end-to-end tests
npm run test:coverage # Generate coverage report
npm run test:contracts # Test smart contractsnpm run compile:contracts # Compile Rust/Solidity contracts
npm run deploy:testnet # Deploy to testnet
npm run deploy:mainnet # Deploy to mainnet
npm run verify:contracts # Verify on Etherscan- Ethereum (Mainnet, Sepolia Testnet)
- Polygon (Mainnet, Mumbai Testnet)
- Binance Smart Chain (Mainnet, Testnet)
- Local Development (Hardhat Network)
# Database
DATABASE_URL=postgresql://user:pass@localhost:5432/propchain
# Blockchain
BLOCKCHAIN_NETWORK=sepolia
RPC_URL=https://sepolia.infura.io/v3/YOUR_PROJECT_ID
PRIVATE_KEY=your_private_key_here
# Security
JWT_SECRET=your_jwt_secret_key
API_KEY=your_api_key
# Services
REDIS_URL=redis://localhost:6379
WEB3_STORAGE_TOKEN=your_web3_storage_token- π API Reference - Complete REST API documentation with examples
- π Smart Contracts - Contract interfaces and integration guides
- π Deployment Guide - Production deployment best practices
- ποΈ Architecture - System design and technical architecture
PropChain-BackEnd/
βββ π src/
β βββ π controllers/ # API route handlers and request processing
β βββ π services/ # Business logic and external service integrations
β βββ π models/ # Database models and schemas (Prisma)
β βββ π middleware/ # Authentication, validation, and error handling
β βββ π utils/ # Helper functions and utilities
β βββ π config/ # Configuration management
β βββ π types/ # TypeScript type definitions
βββ π contracts/ # Smart contracts (Rust/Solidity)
βββ π migrations/ # Database migration files
βββ π tests/ # Unit, integration, and E2E tests
βββ π docs/ # Comprehensive documentation
βββ π scripts/ # Build, deployment, and utility scripts
βββ π .github/ # CI/CD workflows and issue templates
βββ π docker/ # Docker configuration files
- π€ Contributing Guide - How to contribute effectively
- π Code of Conduct - Community guidelines and standards
- π Issue Templates - Standardized issue reporting
- π‘ Feature Requests - Feature proposal template
- π Frontend Application - Client-side React/Next.js application
- π Security Audits - Third-party security audit reports
- π Performance Metrics - Benchmarks and optimization guides
- π Tutorials - Step-by-step integration tutorials
- π Framework: NestJS (Node.js/TypeScript) - Enterprise-grade application framework
- ποΈ Database: PostgreSQL v14+ with Prisma ORM - Type-safe database access
- π Caching: Redis - High-performance caching and session storage
- π Message Queue: Bull Queue - Background job processing
- βοΈ Networks: Ethereum, Polygon, BSC - Multi-chain compatibility
- π Web3 Library: ethers.js - Modern Ethereum JavaScript library
- π Smart Contracts: Solidity (EVM) + Rust (Solana) - Cross-platform contracts
- π Wallet Integration: MetaMask, WalletConnect - Multi-wallet support
- π§ͺ Testing: Jest + Supertest - Comprehensive testing suite
- π API Docs: Swagger/OpenAPI 3.0 - Interactive API documentation
- π³ Containerization: Docker + Docker Compose - Consistent deployments
- π CI/CD: GitHub Actions - Automated testing and deployment
- π Monitoring: Prometheus + Grafana - Performance metrics and alerts
- π Authentication: JWT + Web3 signatures - Secure user verification
- π‘οΈ Security: Helmet, CORS, Rate Limiting - Production-grade security
- π Validation: class-validator - Request data validation
- π Auditing: Comprehensive audit logging for compliance
This project is licensed under the MIT License - see the LICENSE file for complete details.
- π Report Issues: GitHub Issues
- π§ Email Support: support@propchain.io
- π Documentation: docs.propchain.io
We welcome contributions! Please read our Contributing Guide to get started.
Quick contribution steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
β Star this repository if it helped you!
Made with β€οΈ by the PropChain Team