Crowd-Estate is a blockchain-based crowdfunding platform for real estate projects, built on Solana using Anchor. The platform allows users to invest in fractional property ownership, track their investments, and participate in governance through proposals and voting.
- Fractional Property Ownership: Tokenized real estate properties, allowing users to invest in fractions of a property.
- Property Investment: Users can invest in properties using USDC and receive tokens representing their ownership.
- Dividend Distribution: Investors can claim dividends based on their property ownership.
- Governance: Investors can create and vote on proposals, such as minting additional tokens or changing the property administrator.
- Secure Withdrawals: Investors can withdraw their investments, returning their tokens and receiving USDC.
- Property Closure: Administrators can close properties after all tokens are burned or withdrawn.
- Blockchain: Solana, Anchor
- Backend: Node.js, TypeScript, Express.js
- Database: Supabase
- Cache: Redis
- Frontend: Next.js, React, Tailwind CSS
- Others: Axios, React Context, Solana Wallet Adapter
- Implement smart contracts for:
- Tokenization of real estate properties
- Handling and tracking investments
- Implement efficient state management using Solana's account model
- Use Program Derived Addresses (PDAs) appropriately for account management
- Develop API endpoints for:
- User management (registration, login, profile updates)
- Property CRUD operations (create, read, update, delete properties)
- Investment tracking and management
- Fetching all users with their investments
- Implement robust error handling and logging
- Ensure proper data validation and sanitization
- Integrate API with Solana blockchain for transaction processing
- Design an efficient schema for storing:
- User profiles
- Property details (e.g., property name, price, tokens available)
- Investment records (tracking user investments)
- Create a responsive and intuitive user interface
- Implement the following pages/components:
- Home Page with featured properties
- Property Listing Page displaying all properties
- Property Detail Page with investment options
- User Dashboard to track investments and returns
- Implement proper state management using React Context
- Implement smart contracts for:
- Dividend distribution
- Governance and voting system
- Ensure proper access control and security measures in smart contracts
- Develop API endpoints for:
- Creation and voting of governance proposals
- Implement caching mechanisms to improve performance
- Design schema for storing governance proposals and votes
- Implement proper indexing to optimize query performance
- Utilize Supabase's real-time features for live updates where appropriate
- Property listing page with search and filter functionality
- Governance page for viewing and voting on proposals
- Admin panel for property and user management
- Implement UI for managing users and properties
- Implement a secondary market for trading property tokens
- Add real-time notifications for investment updates and governance activities
- Integrate with external APIs for property valuation data
- Implement multi-language support for a global audience
- Add comprehensive analytics and reporting features
- Correct implementation of smart contracts using Solana and Anchor
- Efficient use of Solana's features, including PDAs and account management
- Security considerations and access control in smart contract development
git clone https://github.com/marcelofeitoza/crowd-estate.git
cd crowd-estate
Create a .env
file inside the app/server/
directory and add the following variables:
SUPABASE_URL=<your_supabase_url>
SUPABASE_KEY=<your_supabase_jwt_key>
PORT=5500
ADM=<keypair_bytes>
REDIS_URL=redis://redis:6379
Variable Descriptions:
SUPABASE_URL
: URL of your Supabase instance.SUPABASE_KEY
: JWT key for accessing Supabase.PORT
: Port on which the backend server will run.ADM
: Array of bytes representing the administrative keypair.REDIS_URL
: Connection URL for Redis (set toredis://redis:6379
for Docker, orlocalhost:6379
if running Redis locally).
Create a .env.local
file inside the app/client/
directory and add the following variables:
NEXT_PUBLIC_ADM="<keypair_bytes>"
NEXT_PUBLIC_API_URL="http://localhost:5500"
Variable Descriptions:
NEXT_PUBLIC_ADM
: Administrative keypair used in the frontend.NEXT_PUBLIC_API_URL
: URL of the backend API (set tohttp://localhost:5500
for local development).
Note: Ensure that .env
and .env.local
files are listed in .gitignore
to prevent sensitive information from being committed to version control.
cd app/server
yarn install
cd app/client
yarn install
From the root of the project, execute:
anchor build
From the root of the project, execute:
anchor test
To deploy the program to a Solana cluster (e.g., Devnet), execute:
anchor deploy --provider.cluster devnet # Ensure you have enough SOL to pay for the deployment
cd app/server
yarn start # Make sure Supabase is set up and Redis is running- with Docker or locally
cd app/client
yarn start
To simplify running the application, you can use Docker. Follow the steps below:
From the root of the project, execute:
cd app/server
docker compose up --build -d
To check if the services are running correctly, execute:
docker compose ps
- SUPABASE_URL: URL of your Supabase instance.
- SUPABASE_KEY: JWT key for accessing Supabase.
- PORT: Port on which the backend server will run.
- ADM: Array of bytes representing the administrative keypair.
- REDIS_URL: Connection URL for Redis (
redis://redis:6379
for Docker).
- NEXT_PUBLIC_ADM: Administrative keypair used in the frontend.
- NEXT_PUBLIC_API_URL: URL of the backend API (
http://localhost:5500
for local development).
Note: Do not include .env
and .env.local
files in version control. They are already listed in .gitignore
in each directory.
- Register / Login:
- Access the registration page to create a new account or log in if you already have one.
- Connect Solana Wallet:
- Use a compatible wallet (such as Phantom) to connect to the platform.
- Invest in Properties:
- Browse available properties and invest in fractions using USDC.
- Manage Investments:
- Access the user dashboard to track your investments, claim dividends, and participate in governance.
- Participate in Governance:
- Create and vote on proposals to influence platform decisions.
- Admin Panel (Landlords):
- Landlords can view all users and their investments, manage properties, distribute dividends, and close properties.
To run the project's tests, navigate to the root directory and execute:
anchor test
This project is licensed under the MIT License.