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.
- 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.
- React: Frontend library for building user interfaces.
- Bootstrap: CSS framework for styling.
- React Router: For client-side routing.
- Axios: For making HTTP requests.
- 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.
- Node.js (v14 or higher recommended)
- MongoDB (Local or Atlas connection string)
-
Clone the repository:
git clone <repository-url> cd jaigajomi
-
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 ..
-
Environment Configuration: Create a
.envfile in theserverdirectory with the following variables:PORT=5000 MONGO_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret_key CORS_ORIGIN=http://localhost:3000
You can run both the client and server concurrently from the root directory:
npm run devOr 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)
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
-
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).