Skip to content

MarcoFontana48/Social-Network

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

codecov

Social Network

Explore the report »\

Table of Contents

About the Project

The project is developed and maintained by:

Abstract

The current market includes several social networks, each differentiated primarily by the type of post that users can publish. This project aims to create the backbone of a generic social network, from which it would be possible to specialize into a fully-fledged application by identifying a particular type of post or adding distinctive features.

Built With

Infrastructure

  • Docker
  • Kafka

Kotlin Microservices

  • Kotlin
  • Vertx
  • Jackson
  • Mockito
  • Kover
  • Ktlint
  • MySQL Connector
  • JUnit

Typescript Microservices

  • NodeJS
  • Typescript
  • Express
  • MySQL2
  • Jest
  • Mongoose

Versioning

  • Conventional Commits
  • Semantic Versioning

CI-CD

  • Gradle
  • Docker Hub
  • GitHub Actions

Stack MEVN

Getting Started

Prerequisites

  • Docker

Installation

  1. Clone the repository
$ git clone https://github.com/GiacomoRomagnoli/Social-Network.git
  1. Navigate to folder
$ cd Social-Network
  1. Create two files in which store db passwords
$ echo -n <password> > db-password.txt
$ echo -n <root-password> > db-root-password.txt
  1. Run the deployment command
$ docker compose up

Note: Some microservices include docker-compose files to demonstrate how to deploy a single microservice. The steps to execute are similar to those described above, except for the directory in which you need to navigate. In order to build the images and run the docker-compose files of 'user-service' and 'friendship-service' follow those steps:

  1. move to the directory of the microservice
  2. run the gradle task 'shadowJar'
  3. run the following docker build command (user-service):
$ docker build -t social-network-user-service -f Dockerfile .

or (friendship-service):

$ docker build -t social-network-friendship-service -f Dockerfile .
  1. now you can run the docker-compose file:
$ docker-compose up -d

Note: About 'content-service', if required, in order to build the service it is necessary to first run gradle task 'compileTypescript' in order to install the necessary dependencies and avoid errors. Since the docker-compose file only runs the database using an image from docker hub, it is only needed to run the command:

$ docker-compose up -d 

Usage

It is suggested (although not necessary) to login as 'test@gmail.com', because in file 'main.ts' of 'content-service' there is a test function that sends friendship request events to that user every 2 minutes, so that it is possible to simulate many users sending requests to the same user and see how the frontend reacts to events and sees their posts in its feed.

About

Implementation of a generic social-network

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published