Skip to content

Likeat is a restaurant review platform built with Spring Boot (JWT authentication) and React (Vite). It supports user roles, secure API access, and a fair ranking system for unbiased ratings.

License

Notifications You must be signed in to change notification settings

aggsakellariou/Secure-Likeat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Likeat - Restaurant Evaluation Platform

Likeat is a web application designed to allow users to manage, evaluate, and review restaurants. Built with a Java Spring Boot backend and a React (Vite) frontend, the platform ensures a smooth and secure user experience.

Restaurant owners can manage their listings, customers can leave reviews, and admins oversee operations. A fair ranking algorithm ensures unbiased restaurant ratings.

Features

  • Authentication & Authorization: Secure login using Spring Security & JWT.
  • Restaurant Management: Owners can register, edit, and delete their restaurants.
  • User Roles: Supports customers, restaurant owners, and admins.
  • Restaurant Reviews: Customers can leave reviews and rate restaurants.
  • Fair Ranking Algorithm: Ensures unbiased and fair restaurant ratings.
  • Secure API Endpoints: Protected with role-based access control (RBAC).
  • Modern UI: React (Vite) ensures a fast and responsive user experience.

Requirements

Backend (Spring Boot)

  • Java 11 or higher
  • Maven 3.6.0+
  • Spring Boot (with Spring Security & JWT)
  • MySQL

Frontend (React + Vite)

  • Node.js 14.x or higher
  • npm 6.x or higher
  • React Router for navigation

Installation

Backend Setup

  1. Clone this repository:

    git clone https://github.com/aggsakellariou/Secure-Likeat.git
  2. Navigate to the backend directory:

    cd Likeat/backend-likeat
  3. Configure your database and JWT settings in application.yml:

    spring:
      datasource:
        url: jdbc:mysql://localhost:3306/likeat
        username: your-username
        password: your-password
    application:
      security:
        jwt:
          secret: your-secret-key
          expiration: 86400000  # 1 day in milliseconds
  4. Build the project using Maven:

    mvn clean install
  5. Run the backend:

    mvn spring-boot:run

Frontend Setup

  1. Navigate to the frontend directory:

    cd Likeat/frontend-likeat
  2. Install dependencies:

    npm install
  3. Start the development server:

    npm run dev

Authentication & Usage

  1. Access the backend API at http://localhost:8443.

  2. Access the frontend at http://localhost:5173.

  3. Register or log in to receive a JWT token.

  4. Include the JWT token in the Authorization header for protected API requests:

    Authorization: Bearer your-jwt-token
  5. User Roles:

    • Customers: Browse restaurants, leave reviews.
    • Restaurant Owners: Manage restaurant listings.
    • Admins: Manage users and approve restaurants.

Tech Stack

  • Backend: Java, Spring Boot, Spring Security, JWT, Hibernate, MySQL
  • Frontend: React, Vite, Axios, Bootstrap CSS
  • Deployment: Docker, Render

About

Likeat is a restaurant review platform built with Spring Boot (JWT authentication) and React (Vite). It supports user roles, secure API access, and a fair ranking system for unbiased ratings.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •