Skip to content

Backend of a web application built with Flask, offering RESTful APIs for managing announcements, messages, users, and administration tasks.

Notifications You must be signed in to change notification settings

MarouaneBenbetka/Real-Estate-Website-Backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 

Repository files navigation

IMMO Website Backend

Overview

This is the backend of a realstate web application built using Flask, a Python web framework. The API manages announcements, user messages, user data, and administration tasks. The backend uses MySQL as the database management system (DBMS) and SQLAlchemy as the ORM (Object-Relational Mapping).

Announce Routes

Get All Announcements

GET /ok

Retrieves a list of all announcements.

Get Announcement Details

GET /<annonceId>

Retrieves details of a specific announcement identified by annonceId.

Add Announcement

POST /

Adds a new announcement. Requires authentication.

Delete Announcement

DELETE /<annonceId>

Deletes a specific announcement identified by annonceId. Requires authentication.

Search for Announcement

GET /search

Searches for announcements.

Get Announcement Types

GET /types

Retrieves a list of announcement types.

My Announcements Routes

Get User Announcements

GET /

Retrieves announcements associated with the authenticated user. Requires authentication.

Message Routes

Get All Messages

GET /

Retrieves all messages for the authenticated user. Requires authentication.

Get Unseen Messages Count

GET /unseen

Retrieves the count of unseen messages for the authenticated user. Requires authentication.

View Message

PUT /view

Marks a message as viewed. Requires authentication.

Send Message

POST /

Sends a new message. Requires authentication.

User Routes

Get All Users

GET /

Retrieves a list of all users.

Login

POST /

Logs in a user.

Fill User Data

PUT /user

Fills in user data. Requires authentication.

Check User Validity

GET /<userId>

Checks if the user is valid based on address presence. Requires authentication.

Admin Routes

Scrap Announcements

GET /scrap

Scrapes announcements data. Admin access required.

Get Website Stats

GET /stats

Retrieves website statistics. Admin access required.

Installation

  1. Clone the repository.
  2. Install dependencies using pip install -r requirements.txt.
  3. Set up the MySQL database and update the configuration in config.py.
  4. Run the application using python app.py.

Contributing

Feel free to contribute to the development of this web application backend. Create a fork of the repository, make your changes, and submit a pull request.

About

Backend of a web application built with Flask, offering RESTful APIs for managing announcements, messages, users, and administration tasks.

Topics

Resources

Stars

Watchers

Forks

Languages