/map_book_friending_app

Friending app that can match you with your potential friends based on your book taste. Developed as a part of MAP course, Innopolis University, F21.

Primary LanguageTypeScript

Book friending app

Context

Friending app that can match you with your potential friends based on your book taste. Application uses the features of your favorite books to find the people with most similar taste. Developed as a part of MAP course, Innopolis University, F21.

Also you can try our telegram bot written with the same functionality. Bot's repo is here. The bot is available here.

Team

Project stack

  • Backend - Python, FastApi, MongoDB
  • Frontend - React
  • ML - Pytorch, Sklearn, HuggingFace
  • CI\CD - Docker, Github Actions, AWS, Jenkins

Branching policy

Gitflow

Снимок экрана 2021-11-01 в 20 57 08

Workflow organization

All user stories are written in form of issues (see issues template). And divided on the sub-tasks that are assigned for one or more person. Each issue is also assigned to milestone and has due date. For project management we use github project board with all the issues (subtasks of user stories) as tasks. The form of the project dashbord is a simple Kanban board.

User Documentation

For finding new friends based on your book taste you should:

  1. Go to http://3.120.99.44:3000/login
  2. Register and provide your contact info:

Снимок экрана 2021-11-22 в 18 23 09

Or log in if you already used our service:

Снимок экрана 2021-11-22 в 18 23 36

  1. Then you can start by choosing your favorite books - press the button "search" and write the name of you favorite book in the search window:

1

2

Also, you can add your own book in the database if you can not find it on the site by search. You just need to add the following information about it:

2

  1. Now you would be able to see the books in your profile:

2

  1. Then, to find new friends press the button "search user" and application will provide you top-5 similar users to you.

2

Technical documentation

Component diagram

Снимок экрана 2021-12-10 в 15 36 27

API documentation

API documentation (Swagger) is available at:

http://{YOUR_BACKEND_HOST}/docs

Deployment (CI\CD)

Technologies such as Docker, Github-Actions, AWS are used for deployment. For the backend and frontend of the project a Dockerfile exists. With its help, it is easy to launch individual parts of the project. With the help of docker-compose.yml there is no problem to run full project quickly. In our project all commits to main and dev-ops branches activates github actions script. It runs test stage, and if everything is okay, than it deploys the updated application to AWS server.

How to run

Preparation:

echo "YOUR_MONGODB_URL" >> backend/database_url
echo "REACT_APP_API_DOMAIN=http://{YOUR_HOST}:{PORT}/" >> frontend/.env
Run only backend
cd backend
docker build . --file Dockerfile -t backend && docker run backend
Run only frontend
cd frontend
docker build . --file Dockerfile -t frontend && docker run frontend
Run whole project
docker-compose -f docker-compose.yml up --build -d

How to use:

Frontend default at:

http://127.0.0.1:3000

Backend default at:

http://127.0.0.1:8000

Tests

Tests are implemented as a stage of pipeline in CI\CD. With the help of pytest, the main functionality, such as authorization, adding books, searching is analyzed.

Tests running

cd project
python3 -m venv .
pip install -r backend/requirements.txt
pytest

Sprint reports

Sprint 1 results

Sprint 2 results

Done with all planned tasks

  • Done with US2 As a user I want to add my favorite book to APP library MUST #4
  • Done with US3 As a user, I want to search for my favorite book in the APP library MUST #14
  • Done with US16 As a developer I want to have CI/CD MUST #49

Sprint 3 results

Done with all planned tasks

Sprint 4 results

How to proceed with this project

Futher step to make complete this project is adding a chat (US8 As a user I want to write messages to other users MUST #25) to provide users possibilty to communicate. Now this project performs as an good MVP, but of course future additional features and better UI/UX could be nice things to have.