Repository with Backend code for InnoTutor project. It is written on Java/Spring.

Related tags

Spring Boot Backend
Overview

Backend

dark_logo

LicenseHits-of-Code


Developers: Daniil Livitn, Roman Soldatov

Contents

This is the repository with Backend code for the InnoTutor project. The backend is designed as REST API, so you need the frontend part to access it. Alternatively, you can use Postman or Swagger. The main description of the project is available here

Requirements

Technical Stack:

For this open-source project, we used the simplest registration way via Google Firebase

  • as a website user, you need to have a Google account
  • as a developer, who is going to host this project version, you need to get your own Google credentials.

In case of using this project in Innopolis University we'll change authentication to innopolis email login page.

Stakeholders and their roles 👤

  • Backend Development Team
    • Developer 1 – Backend developer. Implement the backend on Java/Spring which interacts with the PostgreSQL database.
    • Developer 2 – Backend developer. Implement the backend on Java/Spring which returns the result to the frontend via REST API.
    • Developer 3 – Backend developer. Write tests for the Backend.
      Stake: Development process

API

There is documentation with all requests which backend supports. You can read about API documentation here

Database

We use Docker and PostgreSQL for the database. Here is the database diagram

  • If you want to import our database, you can use restore.sql file with empty tables.
  • In application.properties file specify your database's URL, username and password.
  • Guide how to import your database: link
  • Guide how to use PostgreSQL in Docker: link

Google credentials

To log in, you need to provide your Google credentials created here. Then open application.properties file and input your JSON Google credentials file as a single string in GOOGLE_CREDENTIALS field. You can use this online service to convert JSON into a string with escape characters: link

In case of any problems refer to this guide

Hosting and CI

We use Heroku to host the backend. Here is the deployed version of it. For continuous integration, we have to make a pull request into the main branch. Then Heroku will automatically deploy a new version on the server.

To build the project on Heroku's server you need to provide config vars: DATABASE_URL and GOOGLE_CREDENTIALS. Also, add this buildpack https://github.com/buyersight/heroku-google-application-credentials-buildpack.git

Guide how to work with config vars: link

How to install locally

  • Download this project
  • Open it in IntelliJ IDEA
  • Set up database and Google credentials (check instructions above Database and Google credentials)
  • Open InnotutorBackendApplication java class and press ctrl+R

Guide how to run Spring project: link

Another way of install project but without IDE (note: you should have Maven installed)

  1. Clone this repository to your machine using: https://github.com/InnoTutor/Backend.git
  2. You need to create a database and specify the path to it in the application.properties. Besides this, you need to specify your username, password and google credentials.

    Note: Path to application.properties: application.properties
spring.datasource.url=${SPRING_DATASOURCE_URL:jdbc:postgresql://localhost:5432/innotutor}
spring.datasource.username=${SPRING_DATASOURCE_USERNAME:postgres}
spring.datasource.password=${SPRING_DATASOURCE_PASSWORD:root}
...
GOOGLE_CREDENTIALS=<Your Google Credentials>
  1. Using the command line, navigate to the root folder of the project and run the command:
mvn clean install
  1. After a successful build, you need to run the command:
java -jar .target/innotutor_backend-0.0.1-SNAPSHOT.jar

or

java -jar target/innotutor_backend-0.0.1-SNAPSHOT.jar

Code analysis

  • The result of PMD static analyzer. Do not be scared by such a huge number of violations. We fixed all the violations that we could fix. Other violations can not be fixed due to spring framework-specific code which requires to follow special name convention, so the framework could understand fields and create particular Beans.

Want to contribute?

You can contribute to this project. Just fork the repository from the develop branch, implement changes you want to propose and make a pull request. Also, there are issues, so feel free to submit a new one or participate in existing.

Comments
  • Waiting list, Card info, Schedule, Session, Rating

    Waiting list, Card info, Schedule, Session, Rating

    • Improve Waiting List
    • Add additional field in Card
    • Implement Schedule
    • Add requests for the Session: cancel, rate
    • Changed the way of calculating the card rating: now it based on conducted rated sessions.
    new feature 
    opened by SMore-Napi 0
  • Add new fields to the `CardDTO`

    Add new fields to the `CardDTO`

    Add new fields to the CardDTO

    • hidden - boolean flag which represents should this card be hidden from a search.
    • countVoted - number of students who rated this card.

    454ea5ee9579e51ad21324586059b5da4d0f6375

    #5

    invalid 
    opened by Dablup 0
  • Change fields and data type in DTOs

    Change fields and data type in DTOs

    In TutorDTO the field rating should be float rather that an integer value, since it stores the average rating. Also, in other DTOs there should be these fields sessionFormat and sessionType.

    454ea5ee9579e51ad21324586059b5da4d0f6375

    invalid 
    opened by SMore-Napi 0
  • Notifications

    Notifications

    Show events to notify a user about changes Tasks to-do

    • [ ] Show to student if a tutor accepted his request
    • [ ] Show to student if a tutor rejected his request
    • [ ] Show to student if a tutor deleted him from a students list
    • [ ] Show to a tutor if a student accepted his respond
    • [ ] Show to a tutor if a student rejected his respond
    • [ ] Show to tutor if a student deleted him from a tutors list
    • [ ] Notify if a student was added to a session
    • [ ] Notify if a session was canceled
    new feature 
    opened by SMore-Napi 0
  • Waiting list

    Waiting list

    Description

    Implement Request mappings to handle cards to which you sent requests, but users hasn't accepted you yet. You can delete such cards if you changed your mind.

    There are four lists of cards from the waiting list

    • studentsRequested - students' request cards to which you sent responds as a tutor to help them.
    • studentsRejected - students' request cards to which you sent responds as a tutor to help them, but a student rejected your response.
    • tutorsRequested - tutors' CV cards to which you sent requests as a student asking to study with them.
    • tutorsRejected - tutors' CV cards to which you sent requests as a student asking to study with them, but a tutor refused you.

    Tasks to-do

    • [x] Show sent request
    • [x] Show rejected requests
    new feature 
    opened by SMore-Napi 0
  • My Tutors

    My Tutors

    Tasks to-do

    • [x] Show user's tutors
    • [x] Accept new tutors
    • [x] Remove a tutor

    Functionality

    • GET /my-tutors

      • newTutors list - tutors who responded to your request cards. You have not accepted them yet. So, the tutor can't conduct sessions with you.
      • acceptedTutors list - tutors who responded to your request cards and you have accepted them.
        Also, there are tutors who published their Service cards to which you requested and was accepted.
        This tutors can conduct sessions with you.
    • PUT /my-tutors/accept/{id} Accept a tutor who responded to your Request card. Specify enrollmentId as a path variable to identify which card enrolment you want to accept.

      You can accept a tutor only from newTutors list.

    • DELETE /my-tutors/remove/{id} Remove a tutor from your list, so you will no longer have sessions with him/her. Specify enrollmentId as a path variable to identify which card enrolment you want to remove.

      You can remove enrolment cards from newTutors and acceptedTutors

    new feature 
    opened by SMore-Napi 0
  • My Students

    My Students

    Implement Request mappings for My Students page which shows students who requested on your CV cards and to which you responded to Request Cards.

    There are two sections

    • New Students those who requested to your help
    • Students those you accepted
    new feature 
    opened by SMore-Napi 2
Releases(v1.0.0)
  • v1.0.0(Oct 10, 2021)

    This is the v.1.0.0 release of the backend part of the application "InnoTutor".

    What's Changed

    • Created Database Entities by @SMore-Napi in https://github.com/InnoTutor/Backend/pull/4
    • Tutors list by @SMore-Napi in https://github.com/InnoTutor/Backend/pull/11
    • Create RequestMappings for the Students List #12 by @SMore-Napi in https://github.com/InnoTutor/Backend/pull/15
    • Create POST mappings for creating CV Cards and Request Cards #14 by @SMore-Napi in https://github.com/InnoTutor/Backend/pull/16
    • Added new field for CardDTO #23 by @SMore-Napi in https://github.com/InnoTutor/Backend/pull/24
    • Refactoring by @SMore-Napi in https://github.com/InnoTutor/Backend/pull/27
    • Updated entities and Services/Requests Controllers by @SMore-Napi in https://github.com/InnoTutor/Backend/pull/28
    • Added picture fields in the UserDTO and Entity User by @SMore-Napi in https://github.com/InnoTutor/Backend/pull/30
    • Services by @SMore-Napi in https://github.com/InnoTutor/Backend/pull/31
    • Update UserController.java by @SMore-Napi in https://github.com/InnoTutor/Backend/pull/32
    • Develop by @SMore-Napi in https://github.com/InnoTutor/Backend/pull/33
    • Create POST Session and GET session/students #18 by @SMore-Napi in https://github.com/InnoTutor/Backend/pull/34
    • Static analysis fixing by @SMore-Napi in https://github.com/InnoTutor/Backend/pull/35
    • added testing by @SMore-Napi in https://github.com/InnoTutor/Backend/pull/36

    New Contributors

    • @SMore-Napi made their first contribution in https://github.com/InnoTutor/Backend/pull/4

    Full Changelog: https://github.com/InnoTutor/Backend/commits/v1.0.0

    Source code(tar.gz)
    Source code(zip)
Owner
InnoTutor
InnoTutor
An assistance platform made using Spring framework that analyses your code, and helps you either to start a devops project, or to turn an existing project into a devops project using open source software (Git, Docker, Jenkins..)

DevOpsify Description An assistance platform made using Spring framework that analyses your code, and helps you either to start a devops project, or t

obaydah bouifadene 14 Nov 8, 2022
循序渐进,学习Spring Boot、Spring Boot & Shiro、Spring Batch、Spring Cloud、Spring Cloud Alibaba、Spring Security & Spring Security OAuth2,博客Spring系列源码:https://mrbird.cc

Spring 系列教程 该仓库为个人博客https://mrbird.cc中Spring系列源码,包含Spring Boot、Spring Boot & Shiro、Spring Cloud,Spring Boot & Spring Security & Spring Security OAuth2

mrbird 24.8k Jan 6, 2023
Team 5468's 2022 FRC robot code. This code is written in Java and is based off of WPILib's Java control system and utilizes a command based system

FRC 2022 Team 5468's 2022 FRC robot code. This code is written in Java and is based off of WPILib's Java control system and utilizes a command based s

null 4 Oct 4, 2022
Spring Boot microservices app with Spring Cloud, Robust and resilient backend managing e-Commerce app

e-Commerce-boot μServices Important Note: This project's new milestone is to move The whole system to work on Kubernetes, so stay tuned. Introduction

Selim Horri 65 Dec 23, 2022
A repository that contains the backend part of the Human Resources Management System.

Human Resources Management System Backend A human resources management system is a form of human resources (HR) software that combines several systems

Bulent Baris Kilic 24 Dec 26, 2022
This repository is for Todo application. This contains the Backend part of the application.

Todo Application 개요(Abstract) 개인용 할일 목록 리스트 앱플리케이션 구축 (Personal Todo List Application) 목적 1. React.js기초, AWS서버 활용, 스프링 부트 공부 목적으로 프로젝트 시작했습니다.

Thom 3 Jan 8, 2022
This is the primary repository for the source code of the OpenJML project.

OpenJML This is the primary repository for the OpenJML project. The active issues list for OpenJML development is here and the wiki contains informati

OpenJML 111 Dec 22, 2022
This repository contains the code for the Runescape private server project, and this repo is soley maintained by @Avanae and @ThePolyphia and @Xeveral

Runescape: The private server project. A Runescape private server based on the 2009 era. This repository contains the code for the Runescape private s

ProjectArchitecture 4 Oct 1, 2022
This repository contains source code examples to support my course Spring Data JPA and Hibernate Beginner to Guru

Spring Data JPA - Spring Data JPA This repository contains source code examples to support my course Spring Data JPA and Hibernate Beginner to Guru Co

John Thompson 8 Aug 24, 2022
该仓库中主要是 Spring Boot 的入门学习教程以及一些常用的 Spring Boot 实战项目教程,包括 Spring Boot 使用的各种示例代码,同时也包括一些实战项目的项目源码和效果展示,实战项目包括基本的 web 开发以及目前大家普遍使用的线上博客项目/企业大型商城系统/前后端分离实践项目等,摆脱各种 hello world 入门案例的束缚,真正的掌握 Spring Boot 开发。

Spring Boot Projects 该仓库中主要是 Spring Boot 的入门学习教程以及一些常用的 Spring Boot 实战项目教程,包括 Spring Boot 使用的各种示例代码,同时也包括一些实战项目的项目源码和效果展示,实战项目包括基本的 web 开发以及目前大家普遍使用的前

十三 4.5k Dec 30, 2022
İnnova-Patika Java Spring Bootcamp - > Bitirme Projesi -> Backend

İnnova-Patika Java Spring Bootcamp - > Bitirme Projesi -> Backend

Murat Ali KIŞTAN 6 May 1, 2022
Bersama Java Spring membangun negeri (Backend)

Hal - hal yang ada pada Java Spring Application Context Menggunakan IoC (Inversion of Control) / Container. Singleton : Object yang hanya dibuat 1 kal

Pradana 2 Jul 11, 2022
Application for creating blog posts, developed with Java using Spring Framework for backend and Angular along with PrimeNG Library for frontend development.

Application for creating blog posts, developed with Java using Spring Framework for backend and Angular along with PrimeNG Library for frontend development.

Áureo Carmelino 10 Nov 27, 2022
This project is a backend that lets you create to-do lists.

PROJECT This project is a backend service developed for the todo application. Stack Technologies Java 16 Spring Boot Spring Security Spring Data JPA L

Murat Akbıyık 2 Jun 3, 2022
This project is an Android Studio plugin version of BlackObfuscator, it supports obfuscating code automatically. More information about this project are in BlackObfuscator.

DEX控制流混淆插件版 · BlackObfuscator-ASPlugin English Version 本项目为 BlackObfuscator 的Android Studio插件版,支持打包自动化混淆。功能及介绍方面请查看 BlackObfuscator 源项目 注意事项 首要注意:Blac

null 229 Dec 31, 2022
A backend for Asciidoctor used to produce Spring styled HTML

Asciidoctor Spring Backends Alternative HTML conversion for Asciidoctor with a Spring "look and feel". Maven build integration You can use the Asciido

Spring IO 40 Dec 14, 2022
In this course, we will learn how to build a complete full-stack web application using Spring boot as backend and React (React Hooks) as frontend

In this course, we will learn how to build a complete full-stack web application using Spring boot as backend and React (React Hooks) as frontend. We will use MySQL database to store and retrieve the data.

Ramesh Fadatare 43 Dec 22, 2022
Frontend : React , Backend : Spring boot

React(Front) + Spring Boot(Back) 작업 하기 앞서, React와 Spring Boot는 각각 다른 서버에서 돌아가기 때문에, 연동시 Front에 문제가 생기면 Back까지 문제가 생길 수 있다. 하지만, Spring Boot에서 React와 같

심재철 2 Jan 9, 2022