Skip to content

πŸš€ Hozn - Real Estate Fullstack is a Website complete real estate platform built with React, Next.js, TypeScript, Express, and PostgreSQL.

License

Notifications You must be signed in to change notification settings

AHMAD-JX/Hozn-RealEstate-Fullstack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Hozn - Real Estate πŸ‘πŸš€

GitHub repo size GitHub stars GitHub forks GitHub license React Next.js TypeScript Node.js Express.js Sequelize PostgreSQL JWT Tailwind CSS Sass Git GitHub

🌟 Overview

Hozn - Real Estate is a Full-Stack real estate website built with React, Next.js, TypeScript, and a Node.js (Express) backend. The platform allows users to browse, list, and manage properties seamlessly.

🎯 Features

  • πŸ”₯ Modern UI/UX with smooth animations

  • 🏠 Property listing & management

  • 🏠 **BUY & Sell Property listing **

  • πŸ”’ User authentication (Signup/Login)

  • πŸ“Š Admin Dashboard for managing users & listings

  • πŸ“‘ Backend API built with Express & Sequelize

  • 🎨 Fully Responsive on all devices

    Backend:

  • Authentication & Authorization (JWT-based login/signup)

  • Profile Management (Edit user details)

  • Real Estate Listings (Add, update, delete properties)

  • Buying & Selling API

  • Database Management with PostgreSQL & Sequelize

πŸ“Έ Screenshots

🏠 Home Page

Home

🏑 Property Listing

Properties

πŸ› οΈ Dashboard

Dashboard

πŸ› οΈ Tech Stack

🌐 Frontend

  • React.js (Framework: Next.js)
  • TypeScript
  • Tailwind CSS & CSS (for styling)
  • SCSS
  • Framer Motion (for animations)
  • Three.js
  • Axios (for API calls)

πŸ–₯️ Backend (real-estate-backend)

  • Node.js (Runtime)
  • Express.js (Framework)
  • Sequelize (ORM for PostgreSQL/MySQL)
  • JWT (JSON Web Token) (for authentication)
  • bcrypt.js (for password hashing)
  • Multer (for handling file uploads)

πŸ“‚ Project Structure

Hozn-RealEstate-Fullstack/Hozn-RealEstate
β”œβ”€β”€ Hozn-RealEstate/  # React + Next.js frontend
β”‚   β”œβ”€β”€ .next/
β”‚   β”œβ”€β”€ node_modules/
β”‚   β”œβ”€β”€ public/
β”‚   └── src/
|       β”œβ”€β”€ app/
β”‚       β”œβ”€β”€ components/
β”‚       β”œβ”€β”€ data/
|       β”œβ”€β”€ hooks/
β”‚       β”œβ”€β”€ layouts/
β”‚       β”œβ”€β”€ models/
β”‚       β”œβ”€β”€ redux/
β”‚       β”œβ”€β”€ styles/
β”‚       β”œβ”€β”€ types/
β”‚       └── utils/
β”‚
β”œβ”€β”€ real-estate-backend/  # Node.js Express.js backend
β”‚   β”œβ”€β”€ config/
β”‚   β”œβ”€β”€ migrations/
β”‚   β”œβ”€β”€ models/
β”‚   β”œβ”€β”€ node_modules/
β”‚   β”œβ”€β”€ seeders/
β”‚   └── src/
|       β”œβ”€β”€ config/
β”‚       β”œβ”€β”€ controllers/
β”‚       β”œβ”€β”€ middleware/
|       β”œβ”€β”€ models/
β”‚       β”œβ”€β”€ routes/
β”‚       β”œβ”€β”€ models/
β”‚       β”œβ”€β”€ app.ts
β”‚       β”œβ”€β”€ custom.d.ts
β”‚       └── server.ts
β”‚
└── README.md

βš™οΈ Installation & Setup

1️⃣ Install Node.js and npm

Ensure you have Node.js and npm installed. If not, install it from: πŸ‘‰ Download Node.js

Check installation:

node -v
npm -v

2️⃣ Install PostgreSQL Database

Download and install PostgreSQL: πŸ‘‰ Download PostgreSQL

After installation, create a new database:

psql -U postgres
CREATE DATABASE real-estate-backend;

3️⃣ Clone the Repository

git clone https://github.com/AHMAD-JX/Hozn-RealEstate-Fullstack.git
cd Hozn-RealEstate-Fullstack

2️⃣ Install dependencies:

# Install frontend dependencies
cd Hozn-RealEstate
npm install

# Install backend dependencies
cd ../real-estate-backend
npm install

3️⃣ Setup environment variables:

Frontend (.env.local):

NEXT_PUBLIC_API_URL=http://localhost:5000/api

Backend (.env):

PORT=5000
DATABASE_URL=postgres://user:password@localhost:5432/realestate
JWT_SECRET=your_jwt_secret

4️⃣ Run the project:

# Start backend server
cd real-estate-backend
npm run dev

# Start frontend
cd ../hozn-frontend

npx ts-node src/server.ts
or
npm run dev

πŸ› οΈ API Endpoints

Method Endpoint Description
POST /api/signup User Signup
POST /api/login User Login
GET /api/profile Get User Profile
PUT /api/profile/edit Edit User Profile
POST /api/property/add Add New Property
GET /api/property/list List Properties
POST /api/property/buy Buy Property
DELETE /api/property/sell Sell Property

πŸ“Œ Example API Request (Add Property):

curl -X POST "http://localhost:5000/api/properties" \
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer YOUR_TOKEN" \
     -d '{"title":"Luxury Villa", "price":250000, "location":"Cairo", "description":"Spacious 3-bedroom villa"}'

πŸ“‘ API Endpoints

🏠 Authentication (Auth Routes)

Method Endpoint Description
POST /signup Register a new user
POST /login Authenticate user

πŸ“„ Profile Routes

Method Endpoint Description
GET /profile Fetch user profile
PUT /profile Update user profile

🏠 Properties Routes

Method Endpoint Description
GET /properties Fetch all properties
POST /properties Add a new property
PUT /properties/:id Update property details
DELETE /properties/:id Delete a property

πŸ’‘ Example API Request (Update Profile)

fetch('http://localhost:5000/api/profile', {
    method: 'PUT',
    headers: {
        'Content-Type': 'application/json',
        'Authorization': `Bearer YOUR_TOKEN`
    },
    body: JSON.stringify({
        firstName: "John",
        lastName: "Doe",
        phoneNumber: "123456789",
        about: "Real estate expert."
    })
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));

✨ Contributing

Feel free to fork the repository and create a pull request! 😊

πŸ“œ License

This project is licensed under the MIT License.

πŸš€ HOZN - Real Estate | Built with ❀️ by AHMAD-JX

Releases

No releases published

Packages

No packages published