Skip to content

This is the Spring Boot backend of the Group Finder System — a RESTful API that helps university students create, join, and manage project groups with secure JWT authentication and role-based access (Member, Leader, Admin).

Notifications You must be signed in to change notification settings

ModithaM/Group_Finder_API

Repository files navigation

Group Finder API

This is the Spring Boot backend of the Group Finder System — a RESTful API that helps university students create, join, and manage project groups with secure JWT authentication and role-based access (Member, Leader, Admin).

🧱 Tech Stack

  • Backend: Java Spring Boot
  • Security: Spring Security, JWT
  • Database: MySQL
  • ORM: Hibernate (JPA)
  • Build Tool: Maven

📋 Project Overview

Group Finder API is designed to facilitate group formation and management for university students. The system implements:

  • Secure user authentication using JWT
  • Role-based authorization (Member, Leader, Admin)
  • Project creation, joining and management functionalities
  • RESTful API architecture

🚀 Getting Started

Prerequisites

  • Java JDK 11 or higher
  • Maven
  • MySQL
  • Docker (optional, for containerized deployment)
  • IDE (IntelliJ IDEA, Eclipse, or VS Code recommended)

Environment Setup

  1. Clone the repository:

    git clone https://github.com/ModithaM/Group_Finder_API.git
    cd Group_Finder_API
  2. Create your environment configuration:

    cp sample.env .env
  3. Open the .env file and configure the following:

    # DB Configuration
    DB_URL=jdbc:mysql://localhost:3306/your_database_name
    DB_USER=your_database_username
    DB_PASSWORD=your_database_password
    DB_DRIVER=com.mysql.cj.jdbc.Driver
    
    # JWT Configuration
    JWT_SECRET=your_secret_key_here
    JWT_EXPIRATION=86400000

    Make sure to replace the placeholder values with your actual configuration.

Running with IDE

  1. Import the project into your IDE as a Maven project
  2. Run mvn clean install to install dependencies
  3. Run the application from your IDE (locate the main class and run it)

Running with Maven

  1. Build the project:

    mvn clean package
  2. Run the application:

    java -jar target/group-finder-api.jar

Running with Docker Compose

  1. Start the application with MySQL:

    docker-compose up -d
  2. To stop the application:

    docker-compose down

🔒 Security

The API uses JWT (JSON Web Tokens) for authentication. Include the JWT token in the Authorization header for protected endpoints:

Authorization: Bearer your_jwt_token

🛠️ Development

Project Structure

group-finder-api/
├── src/
│   ├── main/
│   │   ├── java/
│   │   │   └── com/groupfinder/
│   │   │       ├── config/       # Configuration classes
│   │   │       ├── controller/   # REST controllers
│   │   │       ├── dto/          # Data Transfer Objects
│   │   │       ├── exception/    # Custom exceptions
│   │   │       ├── model/        # Entity classes
│   │   │       ├── repository/   # JPA repositories
│   │   │       ├── security/     # Security configuration
│   │   │       ├── service/      # Business logic
│   │   │       └── util/         # Utility classes
│   │   └── resources/
│   │       └── application.properties
│   └── test/                     # Unit and integration tests
├── .env                          # Environment variables
├── docker-compose.yml            # Docker Compose configuration
├── Dockerfile                    # Docker configuration
└── pom.xml                       # Maven dependencies

About

This is the Spring Boot backend of the Group Finder System — a RESTful API that helps university students create, join, and manage project groups with secure JWT authentication and role-based access (Member, Leader, Admin).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published