The project is developed and maintained by:
- Giacomo Romagnoli - giacomo.romagnoli4@studio.unibo.it
- Marco Fontana - marco.fontana17@studio.unibo.it
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.
- Docker
- Kafka
- Kotlin
- Vertx
- Jackson
- Mockito
- Kover
- Ktlint
- MySQL Connector
- JUnit
- NodeJS
- Typescript
- Express
- MySQL2
- Jest
- Mongoose
- Conventional Commits
- Semantic Versioning
- Gradle
- Docker Hub
- GitHub Actions
- Docker
- Clone the repository
$ git clone https://github.com/GiacomoRomagnoli/Social-Network.git
- Navigate to folder
$ cd Social-Network
- Create two files in which store db passwords
$ echo -n <password> > db-password.txt
$ echo -n <root-password> > db-root-password.txt
- 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:
- move to the directory of the microservice
- run the gradle task 'shadowJar'
- 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 .
- 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
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.