Skip to content

mr-majed7/AcadLink

Repository files navigation

AcadLink AcadLink

Java Spring Boot Spring Data JPA MySQL Redis JWT Swagger Maven SonarCloud JUnit5 Mockito

Academic Resource Discovery and Management Made Easy

AcadLink is a modern academic collaboration platform that enables students to share and manage educational materials while connecting with peers.
Quick Start »

Features · Database Design · API Docs

SonarCloud Analysis

Quality Gate Status Maintainability Rating Reliability Rating Security Rating Bugs Code Smells Coverage

📑 Table of Contents

Key Features

  • Secure user authentication and profile management
  • Material upload and organization with privacy controls
  • Folder-based content management
  • Peer collaboration and material sharing
  • Advanced search capabilities for materials and users
  • Email verification system with OTP functionality

Technical Stack

Backend

  • Java Version: 21
  • Framework: Spring Boot 3.4.1
  • Security: Spring Security with JWT
  • Database: MySQL 8
  • Cache: Redis (for OTP verification)
  • Documentation: Swagger/OpenAPI
  • Testing: JUnit 5, Mockito
  • Code Quality: SonarQube, JaCoCo

Key Dependencies

  • Spring Boot Starter Web
  • Spring Boot Starter Data JPA
  • Spring Boot Starter Security
  • Spring Boot Starter Mail
  • Spring Boot Starter Data Redis
  • JWT for authentication
  • Lombok for code reduction
  • Vavr for functional programming
  • SpringDoc for API documentation

Security Features

  • JWT-based authentication
  • Stateless security model
  • CSRF protection (disabled for JWT API)
  • Password encryption using BCrypt
  • Secure file storage
  • Privacy controls for materials and folders
  • Email verification with time-limited OTP codes

Database Design

The database schema is designed to efficiently manage users, materials, folders, and peer relationships. Here's a visual representation of our database structure:

Database Schema

Key Entities

  • Users: Stores user profiles and authentication details
  • Folders: Manages folder hierarchy and privacy settings
  • Materials: Handles material metadata and storage paths
  • Peer Relationships: Tracks peer connections and request status

API Documentation

AcadLink provides comprehensive API documentation with the following features:

Interactive Documentation

  • Swagger UI: Available at /v1 when the application is running
  • Markdown Documentation: Complete API reference in Markdown format

API Sections

The API is organized into the following sections:

  1. Public Endpoints (Sign Up, Sign In, Username Check)
  2. Email Verification (OTP verification and resend functionality)
  3. Profile Management (User profile operations)
  4. Folder Management (Create, update, and manage folders)
  5. Materials Management (Upload, update, and organize materials)
  6. Find Materials (Search and discover materials)
  7. Peer Management (Connect with other users)

Documentation Files

  • Interactive API Docs: Complete API reference with examples
  • Swagger Specification: swagger.json - OpenAPI 3.1.0 specification
  • Database Schema: acadlink_schema.sql - Complete database structure

API Interface Preview

Here are some screenshots of our API interface and documentation:

  1. Swagger UI - API List (1) Swagger UI - API List 1

  2. Swagger UI - API List (2) Swagger UI - API List 2

  3. API Request Example API Request Example

  4. API Response Example API Response Example

Getting Started

Prerequisites

  • Java 21 or later
  • Maven
  • MySQL 8
  • Redis 6 or later

Setup Instructions

  1. Clone the repository

    git clone https://github.com/mr-majed7/AcadLink.git
    cd AcadLink/backend/acadlink
  2. Configure the application

    • Copy example_application.yml from the root directory to src/main/resources/application.yml
    • Update the configuration values in application.yml with your environment-specific settings
    • Make sure to set proper values for:
      • Database credentials
      • Redis connection settings
      • Email settings
      • JWT secret
      • Storage path
      • Sonar token (if using SonarQube)
  3. Start Redis Server

    # On Ubuntu/Debian
    sudo systemctl start redis-server
    
    # On macOS with Homebrew
    brew services start redis
    
    # On Windows
    redis-server
  4. Build and Run

    mvn clean install
    mvn spring-boot:run

Project Structure

backend/
  acadlink/
    src/
      main/
        java/com/majed/acadlink/
        resources/
      test/
        java/com/majed/acadlink/
    pom.xml
  • java/com/majed/acadlink/: Source code (API, service, domain, config, etc.)
  • resources/: Configuration files (application.yml)
  • test/java/com/majed/acadlink/: Test cases
  • pom.xml: Maven build file

Testing and Quality

  • Comprehensive unit testing with JUnit 5
  • Mockito for mocking dependencies
  • SonarQube integration for code quality
  • JaCoCo for code coverage reporting
  • Automated test execution with Maven

Code Quality

AcadLink uses SonarCloud for continuous code quality monitoring. The project's code quality is automatically analyzed on every push to the main branch, ensuring:

  • Code quality metrics
  • Code coverage tracking
  • Code smells detection
  • Security vulnerability scanning

You can view the detailed analysis on our SonarCloud dashboard.

Author

Majedul Islam
Backend Developer | CS Undergrad
GitHubLinkedIn
Interesed in backend systems, Java/Spring Boot.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages