Skip to content

arjsabbir88/FindRoomeMate-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🏠 RoomSync Server - Roommate Finder Backend

This is the backend server for RoomSync, a Roommate Finder application. It is built using Express.js and MongoDB, and supports Firebase Authentication.


⚙️ Tech Stack

  • Node.js
  • Express.js
  • MongoDB (Atlas)
  • Firebase Authentication
  • dotenv
  • CORS

🔐 Features

  • Firebase-based User Authentication
  • RESTful API for Roommate Listings
  • Add, Update, Delete, and Get Listings
  • Like System with Count
  • Filter Listings by User Email
  • Secure API Error Handling
  • MongoDB Atlas Integration

📁 Project Structure

├── server.js # Express server & routes
├── .env # Environment variables (not included in git)
├── package.json
└── README.md

Ports

port=3000 DB_USER=your_mongodb_user DB_PASS=your_mongodb_password


🚀 How to Run

# 1. Install dependencies
npm install

# 2. Start the server
node server.js
nodemon server.js

📡 API Endpoints

Method Endpoint Description
GET /roommates-listing Get 6 available listings
GET /browse-listings Get all listings
GET /browse-listings/details/:id Get single listing by ID
GET /my-listing?email=user@example.com Get listings by user email
POST /roommates-listing Add new listing
DELETE /my-listing/:id Delete listing by ID
PUT /my-listing/:id Update listing by ID
PATCH /details/:id/like Like a listing from details route
PATCH /browse-listings/details/:id/like Like a listing from browse route
GET /roommates-listing/:id Get details of a listing

📌 Notes

MongoDB connection is kept open for better performance.
You can secure sensitive routes later with Firebase token verification.
You may implement additional routes for admin operations.

✍️ Author

Tariqul Islam Kahn | arjsabbir88
GitHub: https://github.com/arjsabbir88

About

This is the backend server for RoomSync, a Roommate Finder application. It is built using Express.js and MongoDB, and supports Firebase Authentication.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors