Skip to content

ekhtiar-uddin/BasaFinder-Client

Repository files navigation

RentMode - Property Rental Management Platform

RentMode Logo

A modern, full-stack property rental management platform built with Next.js, TypeScript, and Tailwind CSS

Next.js TypeScript Tailwind CSS React Redux Toolkit

Live Demo β€’ Report Bug β€’ Request Feature


πŸ“‹ Table of Contents


🏠 Overview

RentMode is a comprehensive property rental management platform that connects landlords, tenants, and administrators through a modern web application. The platform features a multi-role user system with role-based access control, interactive property search with map integration, and a complete property management workflow.

Key Highlights

  • Multi-Role System: Admin, Landlord, and Tenant roles with specific permissions
  • Interactive Property Search: Advanced filtering with map integration
  • Real-time Applications: Property application system with status tracking
  • Modern UI/UX: Built with Tailwind CSS and Radix UI components
  • Responsive Design: Mobile-first approach with modern design patterns
  • State Management: Redux Toolkit with persistence
  • Type Safety: Full TypeScript implementation

✨ Features

πŸ” Authentication & Authorization

  • JWT-based authentication with refresh tokens
  • Role-based access control (Admin, Landlord, Tenant)
  • Secure password hashing with bcrypt
  • Google reCAPTCHA integration
  • Protected routes with middleware

🏘️ Property Management

  • Landlords: Create, edit, delete property listings
  • Tenants: Browse, search, and apply to properties
  • Admins: Oversee all listings and user management
  • Image upload with FilePond integration
  • Property details with amenities and location data

πŸ” Advanced Search & Discovery

  • Interactive map integration (Mapbox/MapLibre)
  • Advanced filtering (price, location, bedrooms, amenities)
  • Real-time search results
  • Property comparison tools
  • Location-based property discovery

πŸ“± User Dashboards

  • Landlord Dashboard: Property management, application handling
  • Tenant Dashboard: Application tracking, payment management
  • Admin Dashboard: User management, platform oversight
  • Real-time notifications and status updates

πŸ’³ Payment Integration

  • Payment processing for property applications
  • Secure payment gateway integration
  • Transaction history and receipts
  • Payment status tracking

πŸ› οΈ Tech Stack

Frontend

State Management

Maps & Visualization

Development Tools

  • Package Manager: npm/yarn
  • Linting: ESLint with Next.js config
  • Build Tool: Turbopack (Next.js 15)
  • Deployment: Vercel

Additional Libraries


πŸ“‹ Prerequisites

Before running this project, ensure you have the following installed:

  • Node.js (v18.0.0 or higher)
  • npm (v9.0.0 or higher) or yarn (v1.22.0 or higher)
  • Git (for version control)

Recommended Development Environment

  • VS Code with TypeScript extensions
  • Chrome DevTools for debugging
  • Postman or Insomnia for API testing

πŸš€ Installation

1. Clone the Repository

git clone https://github.com/your-username/basafinder-client.git
cd basafinder-client

2. Install Dependencies

# Using npm
npm install

# Or using yarn
yarn install

3. Environment Setup

Create a .env.local file in the root directory:

# Copy the example environment file
cp .env.example .env.local

4. Start Development Server

# Using npm
npm run dev

# Or using yarn
yarn dev

The application will be available at http://localhost:3000


πŸ”§ Environment Variables

Create a .env.local file in the root directory with the following variables:

# API Configuration
NEXT_PUBLIC_BASE_API=http://localhost:5000/api/v1

# Google reCAPTCHA
NEXT_PUBLIC_RECAPTCHA_CLIENT_KEY=your_recaptcha_client_key
NEXT_PUBLIC_RECAPTCHA_SERVER_KEY=your_recaptcha_server_key

# Geocoding API (OpenCage or Google Maps)
NEXT_PUBLIC_GEOCODING_API_KEY=your_geocoding_api_key

# Optional: Custom port
PORT=3000

Environment Variables Explained

Variable Description Required
NEXT_PUBLIC_BASE_API Backend API base URL βœ…
NEXT_PUBLIC_RECAPTCHA_CLIENT_KEY Google reCAPTCHA client key βœ…
NEXT_PUBLIC_RECAPTCHA_SERVER_KEY Google reCAPTCHA server key βœ…
NEXT_PUBLIC_GEOCODING_API_KEY Geocoding service API key βœ…
PORT Custom port for development ❌

πŸ“– Usage

🏠 Public Access

  1. Homepage: Browse featured properties and platform information
  2. Property Search: Use advanced filters to find properties
  3. Property Details: View comprehensive property information
  4. Registration: Create account as Tenant or Landlord

πŸ‘€ Tenant Features

  1. Browse Properties: Search and filter available rentals
  2. Apply to Properties: Submit rental applications
  3. Track Applications: Monitor application status
  4. Make Payments: Complete payments for approved applications
  5. View Contact Info: Access landlord contact after approval

🏒 Landlord Features

  1. Create Listings: Add new property listings with details
  2. Manage Properties: Edit and delete existing listings
  3. Review Applications: View and respond to tenant applications
  4. Approve/Reject: Manage application status
  5. Share Contact: Provide contact information after approval

πŸ‘¨β€πŸ’Ό Admin Features

  1. User Management: View and manage all users
  2. Property Oversight: Monitor all property listings
  3. Platform Management: Ensure compliance and quality
  4. Analytics: View platform statistics and reports

πŸ” Authentication

Default Admin Credentials

  • Email: admin@gmail.com
  • Password: 12345678

⚠️ Security Note: Change default admin credentials in production


πŸ“ Project Structure

src/
β”œβ”€β”€ app/                          # Next.js App Router
β”‚   β”œβ”€β”€ (WithCommonLayout)/       # Public pages layout
β”‚   β”œβ”€β”€ (WithDashboardLayout)/    # Dashboard pages layout
β”‚   β”œβ”€β”€ search/                   # Property search functionality
β”‚   β”œβ”€β”€ login/                    # Authentication pages
β”‚   └── layout.tsx               # Root layout
β”œβ”€β”€ components/                   # Reusable components
β”‚   β”œβ”€β”€ modules/                 # Feature-specific components
β”‚   β”œβ”€β”€ ui/                      # UI component library
β”‚   └── shared/                  # Shared components
β”œβ”€β”€ services/                     # API service layer
β”‚   β”œβ”€β”€ AuthService/             # Authentication services
β”‚   β”œβ”€β”€ Product/                 # Property management
β”‚   └── Application/             # Application handling
β”œβ”€β”€ redux/                       # State management
β”‚   β”œβ”€β”€ features/               # Redux slices
β”‚   └── store.ts                # Store configuration
β”œβ”€β”€ types/                       # TypeScript type definitions
β”œβ”€β”€ lib/                         # Utility functions
β”œβ”€β”€ constants/                   # Application constants
└── providers/                   # React context providers

Key Directories

  • src/app/: Next.js App Router pages and layouts
  • src/components/: Reusable React components
  • src/services/: API integration and data fetching
  • src/redux/: Global state management
  • src/types/: TypeScript type definitions
  • public/: Static assets and images

πŸ”Œ API Integration

The application integrates with a backend API for data management. Key API endpoints include:

Authentication

  • POST /auth/register - User registration
  • POST /auth/login - User authentication
  • POST /auth/refresh-token - Token refresh
  • POST /auth/change-password - Password change

Properties

  • GET /property - List properties with filters
  • POST /property - Create new property
  • PUT /property/:id - Update property
  • DELETE /property/:id - Delete property

Applications

  • POST /application/create-application - Submit application
  • GET /application - List applications
  • PUT /application/:id - Update application status

Users

  • GET /user - Get user profile
  • PUT /user/edit-profile - Update profile
  • PUT /user/:id/status - Update user status

πŸš€ Deployment

Vercel (Recommended)

  1. Connect Repository: Link your GitHub repository to Vercel
  2. Configure Environment: Add environment variables in Vercel dashboard
  3. Deploy: Automatic deployment on push to main branch
# Install Vercel CLI
npm i -g vercel

# Deploy
vercel

Manual Deployment

# Build the application
npm run build

# Start production server
npm start

Environment Variables for Production

Ensure all required environment variables are set in your deployment platform:

  • NEXT_PUBLIC_BASE_API
  • NEXT_PUBLIC_RECAPTCHA_CLIENT_KEY
  • NEXT_PUBLIC_RECAPTCHA_SERVER_KEY
  • NEXT_PUBLIC_GEOCODING_API_KEY

🀝 Contributing

We welcome contributions! Please follow these steps:

1. Fork the Repository

git clone https://github.com/your-username/basafinder-client.git
cd basafinder-client

2. Create a Feature Branch

git checkout -b feature/your-feature-name

3. Make Your Changes

  • Follow the existing code style
  • Add TypeScript types for new features
  • Update documentation as needed
  • Test your changes thoroughly

4. Commit and Push

git add .
git commit -m "feat: add your feature description"
git push origin feature/your-feature-name

5. Create a Pull Request

  • Provide a clear description of your changes
  • Include screenshots for UI changes
  • Reference any related issues

Development Guidelines

  • Code Style: Follow ESLint configuration
  • TypeScript: Use strict type checking
  • Components: Use functional components with hooks
  • State Management: Use Redux Toolkit for global state
  • Testing: Add tests for new features

πŸ“ Available Scripts

# Development
npm run dev          # Start development server with Turbopack
npm run build        # Build for production
npm run start        # Start production server
npm run lint         # Run ESLint

# Git operations (custom script)
npm run commit       # Add, commit, and push changes

πŸ› Troubleshooting

Common Issues

  1. Port Already in Use

    # Kill process on port 3000
    npx kill-port 3000
  2. Environment Variables Not Loading

    • Ensure .env.local file exists in root directory
    • Restart development server after adding variables
  3. TypeScript Errors

    # Clear TypeScript cache
    rm -rf .next
    npm run dev
  4. Dependencies Issues

    # Clear node_modules and reinstall
    rm -rf node_modules package-lock.json
    npm install

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments


πŸ“ž Support


Made with ❀️ by the RentMode Team

GitHub stars GitHub forks GitHub issues

About

A full-stack rental platform connecting landlords, tenants, and an admin. Landlords manage listings; tenants search, request, and pay rent upon approval, with contact details shared.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages