Access to the website here -> Sharelive
Sharelive is a web application oriented to the search and publication of room rental ads. The platform stands out for its intuitive and easy-to-navigate interface, allowing users to filter their searches by various criteria such as price, size, location, among others.
Sharelive's main objective is to help students, workers and anyone who needs to move home to find a room for rent quickly and easily. Sharelive seeks to simplify the process of searching and posting room listings, providing an accessible and efficient platform for both renters and landlords.
Project is created with:
|
FRONTEND |
BACKEND |
TOOLS |
|
|
|
- Node.js and npm installed
- MySQL installed and configured
To clone and run this applicaion, you'll need Git and Node.js (which comes with npm) installed on you computer.
Next you will have to create a MongoDB Atlas database and copy the Cluster's URL
This is an example of what the MongoDB URL would look like
- Copy the URL to the ENV file on
/backend/.env.development
mongodb+srv://<username>:<password>@cluster0.off3wjd.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0
Clone the repository and start the project
# Clone this repository
$ git clone https://github.com/jmcamposdev/sharelive.git
# Go into the repository
$ cd sharelive
# Install dependencies on the Server and Client
$ cd frontend && npm i --force
$ cd ../backend && npm i
# Run the app
$ npm run dev // On the Client and Server
integralProjectIZV/
│
├── frontend/
│ ├── public/
│ │ └── ... (React public files)
│ ├── src/
│ │ ├── assets/
│ │ │ ├── img/
│ │ │ ├── logos/
│ │ │ ├── vectors/
│ │ │ └── lottifiles/
│ │ ├── components/
│ │ │ ├── commons/
│ │ │ └── ... (React components)
│ │ ├── pages/
│ │ │ └── ... (React pages)
│ │ ├── constants/
│ │ ├── context/ (Custom Context)
│ │ ├── hooks/ (Custom Hooks)
│ │ ├── css/
│ │ ├── data/ (Mock Data)
│ │ ├── fonts/ (All Fonts)
│ │ ├── services/ (Backend Connections)
│ │ ├── utils/ (Global Functions)
│ │ ├── App.js
│ │ └── index.js
│ │
│ ├── .gitignore
│ ├── .env.development
│ ├── .env.production
│ ├── package.json
│ └── README.md
│
├── backend/
│ ├── database/
│ ├── faker/ (Generate Fake Data)
│ ├── listeners/
│ │ └── ... (Socket.io connections)
│ ├── middlewares/
│ │ └── ... (Node.js middlewares)
│ ├── controllers/
│ │ └── ... (Node.js controllers)
│ ├── models/
│ │ └── ... (Database models)
│ ├── routes/
│ │ └── ... (Express routes)
│ ├── index.js
│ │
│ ├── .gitignore
│ ├── package.json
│ └── README.md
│
├── .gitignore
├── package.json
├── README.md
└── ...Welcome to the Sharelive RESTful API. This API provides access to the management of all available resources.
The API will only be accessible from the web, access from outside the url https://sharelive.jmcampos.dev is prohibited for security reasons. In localhost you can make requests from outside the web.
To access certain resources, authentication is required. Be sure to include the x-access-token header with a valid token in the relevant requests.
POST /auth/signin: Sign in a user. Returns aJSONobject with the user's data and a token. Requires aJSONobject with the user's data.POST /auth/signup: Sign up a new user. Returns aJSONobject with the new user's data and a token. Requires aJSONobject with the user's data.
GET /messages/:from/:to: Get all messages between two users. Returns aJSONarray of messages sorted by creation date. Each message includes_id,fromSelf(a boolean indicating if the message is from the requesting user),message, andcreatedAt.POST /messages: Create a new message. Returns aJSONobject with the new message's data. Requires aJSONobject withfrom(sender ID),to(recipient ID), andmessage(message content).
GET /reviews/:id: Get all reviews for a user. Returns aJSONarray of reviews. Requires the user ID as a URL parameter.POST /reviews: Create a new review. Returns aJSONobject with the new review's data. Requires aJSONobject withownerId,assignedId,reviewRate, andreviewContent.PUT /reviews/:id: Update a review by ID. Returns aJSONobject with the updated review's data. Requires aJSONobject withownerId,ownerName,ownerAvatar,reviewRate,reviewContent,helpful, andnotHelpful.DELETE /reviews/:id: Delete a review by ID. Returns aJSONobject with a success message. Requires the review ID as a URL parameter.
GET /rooms: Get all rooms. Returns aJSONarray of all rooms.GET /rooms/:id: Get a room by ID. Returns aJSONobject with the room's data.POST /rooms: Create a new room. Returns aJSONobject with the new room's data. Requires aJSONobject with the room's data.PUT /rooms/:id: Update a room by ID. Returns aJSONobject with the updated room's data. Requires aJSONobject with the room's data.DELETE /rooms/:id: Delete a room by ID. Returns aJSONobject with the deleted room's data.POST /rooms/:id/images: Upload images for a room. Returns aJSONarray of the uploaded images' URLs. Requires aform-dataobject with the images.DELETE /rooms/:id/images: Delete images for a room. Returns aJSONobject with a success message. Requires aJSONobject with the images' URLs to delete.GET /rooms/:id/visits: Increment and get the visit count for a room. Returns aJSONobject with the updated visit count.
GET /users: Get all users. Returns aJSONarray of all users.GET /users/:id: Get a user by ID. Returns aJSONobject with the user's data.POST /users: Create a new user. Returns aJSONobject with the new user's data. Requires aJSONobject with the user's data.PUT /users/:id: Update a user by ID. Returns aJSONobject with the updated user's data. Requires aJSONobject with the user's data.DELETE /users/:id: Delete a user by ID. Returns aJSONobject with the deleted user's data.POST /users/:id/avatar: Upload an avatar for a user. Returns aJSONobject with the user's data, including the new avatar URL. Requires aform-dataobject with the avatar image.PUT /users/:id/password: Change a user's password. Returns aJSONobject with the updated user's data. Requires aJSONobject with the current and new passwords.GET /users/:id/rooms: Get all rooms created by a user. Returns aJSONarray of the user's rooms.GET /users/:id/favourite-rooms: Get all favourite rooms of a user. Returns aJSONarray of the user's favourite rooms.POST /users/:id/favourite-rooms: Toggle a favourite room for a user. Returns aJSONobject with the updated user's data. Requires aJSONobject with the room ID.GET /users/contacts: Get the contact list of the current user. Returns aJSONarray of the user's contacts.POST /users/:id/contacts: Add a user to the contact list. Returns aJSONobject with the updated user's data. Requires aJSONobject with the contact ID.DELETE /users/contacts/:contactId: Delete a user from the contact list. Returns aJSONobject with the updated user's data.
GET /statistics/rooms: Get statistics about rooms. Returns aJSONobject with the total number of rooms, total visits to rooms, and total number of rooms marked as favorites.GET /statistics/reviews: Get statistics about reviews. Returns aJSONobject with the total number of reviews and the average review rate.GET /statistics/weekly: Get weekly statistics. Returns aJSONobject with the number of new users, new rooms, and new reviews for the past week.GET /statistics/activities/:limit?: Get activity logs. Returns aJSONarray of activity logs, limited by the optionallimitparameter.
- View rooms: Browse through available rooms.
- Filter rooms: Filter rooms by price range, number of bedrooms, bathrooms, structure type, square meters, and amenities such as microwave, refrigerator, dishwasher, etc.
- Sort results: Sort room listings by newest, lowest price, or highest price.
- Change room layout: Switch between grid and list view for room listings.
- View room details: Access detailed information and photos of each room.
- Save favorites: Save favorite rooms for future reference.
- Share rooms: Share room listings via WhatsApp, Facebook, and Twitter.
- Message room owner: Communicate with room owners through the integrated messaging system connected via socket.
- View street scores: Check street scores for walking, driving, and cycling.
- View owner profile: Explore the profile of room owners, including their posted rooms and reviews.
- Message owner: Send messages to room owners directly from their profile.
- View owner's published rooms: Access a list of all rooms published by a specific owner.
- View owner's reviews: Read reviews received by a room owner, and sort them as per preference.
- Write reviews: Write reviews for rooms and vote on existing reviews (requires login).
- Login/Register: Log in or register to access features such as the dashboard, room creation, room management, profile modification, and message viewing.
- Dashboard: Access a personalized dashboard to manage rooms, view reviews, modify profile, and check received messages.
- Dark/Light mode switch: Toggle between light and dark mode for better readability.
- View rooms: Browse through available rooms.
- Filter rooms: Filter rooms by price range, number of bedrooms, bathrooms, structure type, square meters, and amenities such as microwave, refrigerator, dishwasher, etc.
- Sort results: Sort room listings by newest, lowest price, or highest price.
- Change room layout: Switch between grid and list view for room listings.
- View room details: Access detailed information and photos of each room.
- Save favorites: Save favorite rooms for future reference.
- Share rooms: Share room listings via WhatsApp, Facebook, and Twitter.
- Message room owner: Communicate with room owners through the integrated messaging system connected via socket.
- View street scores: Check street scores for walking, driving, and cycling.
- View owner profile: Explore the profile of room owners, including their posted rooms and reviews.
- Message owner: Send messages to room owners directly from their profile.
- View owner's published rooms: Access a list of all rooms published by a specific owner.
- View owner's reviews: Read reviews received by a room owner, and sort them as per preference.
- Write reviews: Write reviews for rooms and vote on existing reviews (requires login).
- Login/Register: Log in or register to access features such as the dashboard, room creation, room management, profile modification, and message viewing.
- Dashboard: Access a personalized dashboard to manage rooms, view reviews, modify profile, and check received messages.
- Dark/Light mode switch: Toggle between light and dark mode for better readability.
- Manage users: View and administer all users, including changing their role to administrator or user, modifying any user's details, and deleting users.
- Manage rooms: Edit, create, and delete any room listing.
- Edit profile: Modify the admin's profile information.
This project is under the MIT License - see the LICENSE file for details.
Campos Trujillo, José María - jmcamposdev
Hernandez Palma ,Carlos - carloshpdev
Bernal Barrionuevo, Carlos - caberbar
We appreciate the collaboration of IES Zaidín-Vergeles in this project.
















