Skip to content

ita-social-projects/Home

Repository files navigation

Home


Heroku Deploy Quality Gate Status Coverage Status Github Issues Pending Pull-Requests Docker Pulls License


Table of Contents


About the project

Home - is an all-in-one social service that will cover all aspects of your communication with your home and neighbors.

  • Internal notification and news system

  • Private messages, chat with selected residents and general OSBB group with all residents or OSBB's modules separately

  • Residents independently form a budget, determine contributions for the maintenance of the house, the sequence of solving problems. This makes it possible to quickly respond to emergencies, to decide what needs to be done in the house or on the adjacent territory in the first place, to ensure the protection of the personal and common property of residents

  • The ability to choose a service provider such as (water, electricity, gas), and pay utility bills

  • The best offers and wishes can be implemented in the OSBB by residents through internal voting system

  • Transparency of expense. The residents' funds go exclusively to the needs of their home and are spent rationally. The head of the OSBB reports directly to the residents, so they are always aware of what the funds were spent on

Installation

Environmental variables

First of all, you need to check and if it would any necessary to set environment variables at application-home-data.properties which contains in home-application/src/main/java/source module.

spring.datasource.url=${DATASOURCE_URL}
spring.datasource.username=${DATASOURCE_USER}
spring.datasource.password=${DATASOURCE_PASSWORD}

Required to install

  • Java 11
  • Docker
  • Maven
  • PostgreSQL
  • IntelliJ IDEA (optional)

How to run local

Run with Docker

  • if you compose it first time, you need to change home_network external -> false, because it would try to use remote one that doesn't exist. File is located in home-dev/launch package, named docker-compose.yml.
networks:
  home_network:
    external: false
    name: home_network
    driver: bridge
  • use command docker-compose up in package home-dev/launch to run application.

Run with Maven + Intellij IDEA

  • if you don't have mvn like environment variable, you need to install it into your environment.

  • use mvn clean install command in the project root directory to build project.

  • when you use the command below, you will need to run your docker image named launch with container launch-mailhog.

  • change directory to 'project root'/home-data-migration/target and use java -jar home-data-migration-0.0.1-SNAPSHOT.jar --url=jdbc:postgresql://localhost:5432/postgres -u=user -p=password command for connection to your local DB.

  • after using this command you will need to choose - would you like to receive notifications from community?, there are three ways: but you need to choose between: enter your email and skip the request(default one).

  • also, you need to mark following directories in project structure as a Generated Sources Root:

    • home-application/target/generated-sources/openapi
    • home-oauth-server/target/generated-sources/openapi
    • home-clients/target/generated-sources/openapi
    • home-data/target/generated-sources/java
  • if your API documentation doesn't display correctly try to mark
    home-application/target/classes/static directory as Resources Root.

  • run application with your IDEA.

If you did everything correctly, you should be able to access RapiDoc by this URL: http://localhost:8080/api/0/apidocs/index.html

Authorization server can be accessed by this URL: http://localhost:9000/api/0/oauth2/index.html

Detail info about other running options/running tests, you can read in hom-dev package.

Authorization

After accessing RapiDoc you are able to enter Cooperation section where you could create Cooperation:

  • there isn`t any need to authorize, because in your DB you don't have any created user and basic authentication will be requested any time you try to do something.
  • if you are already authenticated - make sure that you are working in a new session without being authorized(invalidate session).

When you have finished all previous steps: You need to use your personal email for admin_email field and change iban field to make it unique (simply change a few numbers in it).

In your email inbox or in table invitations of your local DB you should be able to find a registration token.

Having completed all previous steps you can use the provided registration token in the registration_token field. You can create a new user in the User section where you need to use the same email as you entered for admin_email and change password on your own using for that registration token.

Pay attention that you wouldn't be able to edit your email/password after registration!


Docker images

Our images on Docker Hub:

  • data-migration - this image starts a data-migration for database in docker container

  • home-application - this image starts an application in docker container


Documentation

  • You can find OpenApi specification for the project here
  • More information about the project's technologies and modules' description

Contributing

Git flow

Step 1

  • Option 1

    • 🍴 Fork this repo!
  • Option 2

    • 👯 Clone this repo to your local machine using command:

git clone https://github.com/ita-social-projects/Home.git

Step 2

Create your Feature Branch

git checkout -b 'name_for_new_branch'

Step 3

Make changes and test

Step 4

Open a Pull Request with description of changes


Team

  • Technical Expert of the project - @MrScors
  • Mentor of SoftServe ITA - @DzigMS

Contributors that have worked on this project:


Contact

[email protected]


License

License

About

Home - is an all-in-one social service that will cover all aspects of your communication with your home and neighbors.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages