Property Hive is a comprehensive real estate platform backend API built with Django REST Framework. The platform enables property companies to list properties, manage customers, handle transactions, and provides a complete property management solution.
Live API: Property Hive API API Documentation: Postman Collection
- User Management: Customer and Company registration/authentication
- Property Management: CRUD operations for properties with images and documents
- Transaction Processing: Payment handling and invoice generation
- KYC Verification: Document upload and verification system
- Rating System: Property and company ratings
- Profile Management: Company profiles with social media integration
- Email Verification: Secure email verification system
- JWT Authentication: Token-based authentication with refresh tokens
- Framework: Django 5.1.1 + Django REST Framework 3.15.2
- Database: PostgreSQL (with psycopg2-binary)
- Authentication: JWT (djangorestframework-simplejwt)
- File Storage: Django Media Files
- Email: SMTP with Gmail
- Deployment: Vercel (configured)
- Other: CORS headers, Whitenoise for static files
Before setting up the project locally, ensure you have the following installed:
- Python (>=3.8)
- PostgreSQL (or your preferred database)
- pip (Python package manager)
- Git
- Clone the repository:
git clone https://github.com/your-username/property-hive-backend.git
cd property-hive-backend
- Create and activate virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Set up environment variables:
Create a
.env
file in the root directory:
SECRET_KEY=your_secret_key_here
DEBUG=True
DATABASE_URL=postgresql://username:password@localhost:5432/property_hive_db
- Database setup:
python manage.py makemigrations
python manage.py migrate
python manage.py createsuperuser
- Run the development server:
python manage.py runserver
The API will be available at http://localhost:8000/
POST /api/v1/login/
- JWT Token generationPOST /api/v1/login/company
- Company loginPOST /api/v1/login/customer
- Customer loginPOST /api/v1/register/company/
- Company registrationPOST /api/v1/register/customer
- Customer registrationPOST /api/v1/forgot-password/
- Password reset requestPOST /api/v1/reset-password/
- Password resetPOST /api/v1/send-verification-email/
- Send verification emailPOST /api/v1/verify-email/
- Email verification
GET /api/v1/profile/
- User profile
- Company management endpoints
- Transaction processing endpoints
- Property CRUD operations
- Media file handling
property_hive/
├── api/v1/
│ ├── common/ # Shared models (User, Property, etc.)
│ ├── custom_auth/ # Authentication views and URLs
│ ├── company/ # Company-specific functionality
│ └── transaction/ # Transaction management
├── property_hive/ # Django project settings
├── media/ # User uploaded files
├── requirements.txt # Python dependencies
├── manage.py # Django management script
└── vercel.json # Vercel deployment config
Variable | Description | Required |
---|---|---|
SECRET_KEY |
Django secret key | Yes |
DEBUG |
Debug mode (True/False) | No |
DATABASE_URL |
PostgreSQL connection string | Yes |
The project is configured for deployment on Vercel with the included vercel.json
configuration.
- Install Vercel CLI:
npm i -g vercel
- Deploy:
vercel --prod
- Set environment variables in Vercel dashboard
- main -> Production branch (protected)
- dev -> Development branch (create PRs here)
- Fork and clone:
git clone https://github.com/your-username/property-hive-backend.git
cd property-hive-backend
- Set up development environment:
git remote add origin https://github.com/your-username/property-hive-backend.git
git pull origin dev
- Create feature branch:
git checkout -b PH-001/feat/your-feature-name
- Make changes and commit:
git add .
git commit -m "feat: add your feature description"
- Push and create PR:
git pull origin dev # Check for conflicts
git push -u origin PH-001/feat/your-feature-name
- Create Pull Request to
dev
branch
Type | Description |
---|---|
feat |
New feature |
fix |
Bug fix |
docs |
Documentation changes |
style |
Code style changes |
refactor |
Code refactoring |
test |
Adding/updating tests |
chore |
Maintenance tasks |
Sample Commits:
feat: add property image upload functionality
fix: resolve authentication token expiry issue
docs: update API endpoint documentation
Run tests with:
python manage.py test
This project is licensed under the MIT License.
For support, email: support@propertyhive.com.ng