Giter Club home page Giter Club logo

shelter's Introduction

Shelter

Shelter is a web application designed to help users find and book properties. It provides a wide range of properties for lease and purchase, ensuring there's something for everyone. The project is built using the MERN stack (MongoDB, Express.js, React, Node.js).

Table of Contents

Features

  • User authentication and authorization
  • Property listing with detailed information
  • Booking functionality for logged-in users
  • Responsive and visually appealing UI
  • Role-based access control

Tech Stack

  • Frontend: React, React Router, Axios
  • Backend: Node.js, Express.js
  • Database: MongoDB, Cloudinary (for image storage)
  • Authentication: JSON Web Tokens (JWT)
  • Styling: CSS, Animations

Prerequisites

Before you begin, ensure you have met the following requirements:

  • Node.js and npm installed
  • MongoDB instance running
  • A Cloudinary account for storing property images

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/shelter.git
    cd shelter
    
  2. Install dependencies: cd backend npm install

  3. Set up environment variables: Create a .env file in the backend directory and add the following variables:

MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name
CLOUDINARY_API_KEY=your_cloudinary_api_key
CLOUDINARY_API_SECRET=your_cloudinary_api_secret

Start the backend server

node server.js

Frontend Setup

Navigate to the frontend directory:

cd ../frontend
npm install
npm start

Usage

. Open your browser and navigate to http://localhost:3000. . Register a new user or log in with an existing account. . Browse the available properties. . View property details by clicking on a property card. . Book a property by filling out the booking form.

Routes

Backend Routes

Auth Routes

POST /api/auth/register - Register a new user POST /api/auth/login - Log in a user Property Routes

GET /api/properties - Get all properties GET /api/properties/:id - Get a property by ID POST /api/properties - Create a new property (admin only) PUT /api/properties/:id - Update a property (admin only) DELETE /api/properties/:id - Delete a property (admin only)

Booking Routes

POST /api/bookings/property/:id - Book a property

Frontend Routes

/ - Landing page /login - Login page /register - Registration page /properties - Property listing page /property/:id - Property detail page

Contributing

We welcome contributions to Shelter! To contribute, follow these steps:

Fork the repository. Create a new branch (git checkout -b feature/your-feature-name). Make your changes. Commit your changes (git commit -m 'Add some feature'). Push to the branch (git push origin feature/your-feature-name). Open a pull request. @Yuntech (www.github.com/Yuntech1)

shelter's People

Contributors

marve018 avatar dadovenonye avatar yuntech1 avatar trust447 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.