Skip to content

AsifJishan/JaigaJomi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JaigaJomi

JaigaJomi is a full-stack web application for managing and listing properties. It allows users to browse properties for rent or sale, and authenticated users can list their own properties with details and images.

Features

  • User Authentication: Secure user registration and login using JWT.
  • Property Listings: Browse available properties with details like price, location, size, and type (Rent/Sale).
  • Property Management: Authenticated users can add, edit, and delete their property listings.
  • Image Uploads: Support for uploading property images.
  • Responsive Design: Built with React and Bootstrap for a mobile-friendly interface.
  • Security: Implements Helmet, Rate Limiting, and CORS for backend security.

Tech Stack

Client

  • React: Frontend library for building user interfaces.
  • Bootstrap: CSS framework for styling.
  • React Router: For client-side routing.
  • Axios: For making HTTP requests.

Server

  • Node.js & Express: Backend runtime and framework.
  • MongoDB & Mongoose: Database and object modeling.
  • JWT (JSON Web Tokens): For secure authentication.
  • Multer: For handling file uploads.

Getting Started

Prerequisites

  • Node.js (v14 or higher recommended)
  • MongoDB (Local or Atlas connection string)

Installation

  1. Clone the repository:

    git clone <repository-url>
    cd jaigajomi
  2. Install dependencies: This project is set up as a monorepo. You can install dependencies for both client and server from the root, or individually.

    # Install root dependencies
    npm install
    
    # Install server dependencies
    cd server
    npm install
    cd ..
    
    # Install client dependencies
    cd client
    npm install
    cd ..
  3. Environment Configuration: Create a .env file in the server directory with the following variables:

    PORT=5000
    MONGO_URI=your_mongodb_connection_string
    JWT_SECRET=your_jwt_secret_key
    CORS_ORIGIN=http://localhost:3000

Running the Application

You can run both the client and server concurrently from the root directory:

npm run dev

Or run them separately:

  • Server: npm run dev:server (Runs on port 5000 by default)
  • Client: npm run dev:client (Runs on port 3000 by default)

Project Structure

jaigajomi/
├── client/                 # React Frontend
│   ├── public/
│   └── src/
│       ├── components/     # React Components
│       └── ...
├── server/                 # Express Backend
│   ├── controllers/        # Route controllers
│   ├── middleware/         # Custom middleware (auth, etc.)
│   ├── models/             # Mongoose models
│   ├── routes/             # API routes
│   ├── uploads/            # Uploaded images directory
│   └── server.js           # Entry point
└── package.json            # Root scripts and dependencies

API Endpoints

  • Auth

    • POST /api/auth/register: Register a new user.
    • POST /api/auth/login: Login user.
  • Properties

    • GET /api/properties: Get all properties.
    • POST /api/properties: Add a new property (Auth required).
    • PUT /api/properties/:id: Update a property (Auth required).
    • DELETE /api/properties/:id: Delete a property (Auth required).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors