Skip to content
This repository has been archived by the owner on Sep 21, 2024. It is now read-only.

The university project for TJV in CTU FIT

Notifications You must be signed in to change notification settings

matej-parizek/Social-Network-Server

Repository files navigation

Semestral Work - Server (Social Network)

Overview

This project involves a server for a social network application, featuring functionalities for managing user posts, including complex operations such as co-authorship. Users can create posts and set other users as co-authors. When a post is created with a co-author, the post is also created for the co-author with added text. The condition for setting a co-author is that the users must follow each other.

Additional Query: Calculate the total number of likes for posts where the user is set as a co-author. (The text will include "coauthor: username".)

schema

Server Information

This server is designed for a social network application and uses Docker for data management. The database is configured in application.properties with create-drop, meaning data will be deleted after each restart. Authorization is implemented but only at the server-client level; it is not secure, which is sufficient for the application's intended functionality.

REST API Documentation

Quick Overview:

api-user

api-post

api-comment

api-authorization

Running the Application

Required Applications

Requirements

  • JVM
  • Gradle
  • Docker

Starting the API

  1. Start Docker containers:

    docker-compose up -d
  2. Load images into Docker for the insert script (for images):

    docker cp ./src/main/resources/images/img1 social_network_server-postgres-1:/docker-entrypoint-initdb.d/
    docker cp ./src/main/resources/images/img2 social_network_server-postgres-1:/docker-entrypoint-initdb.d/
    docker cp ./src/main/resources/images/img3 social_network_server-postgres-1:/docker-entrypoint-initdb.d/
    docker cp ./src/main/resources/images/img4 social_network_server-postgres-1:/docker-entrypoint-initdb.d/
    docker cp ./src/main/resources/images/img5 social_network_server-postgres-1:/docker-entrypoint-initdb.d/
  3. Run the application:

    ./gradlew bootRun

Running the Client

  1. Start the client application:
    ./gradlew bootRun

URLs

About

The university project for TJV in CTU FIT

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages