Skip to content

πŸ™‹πŸ» An application written in flutter will help people get answers to all questions of interest.

License

Notifications You must be signed in to change notification settings

ars-kalinichenko/WeHelp

Repository files navigation

WeHelp Β·GitHub license GitHub release Project Language

About project:

πŸ™‹πŸ» A mobile application written for android is designed to help people find like-minded people and get answers to their questions.

Screenshots:

Welcome page Home page Search page (questions)
Welcome Home Search
Search page (users) Search page (posts) Profile page
Search Search Profile

Architectural diagram:

Backend:

back diagram

Frontend:

web diagram

Install on Android Device:

You can install the latest version of the application by going to releases: https://github.com/ars-kalinichenko/WeHelp/releases

If you have a 32 bit processor architecture, then choose app-armeabi-v7a (almost all arm devices support this target), if 64 bit - app-arm64-v8a.

Dependencies for mobile app:

cupertino_icons: ^0.1.3 # for icons
simple_animations: ^2.2.1 # for toast animations
shared_preferences: ^0.5.8 # for save login data
provider: ^4.3.2 # for transfer data between registration screens
http: ^0.12.2 # for server calls
random_color: 1.0.5 # for changing colors in human preview, article
mask_text_input_formatter: ^1.0.7 # for phone mask

How run app in Android Studio:

Clone repository:

git clone https://github.com/ars-kalinichenko/WeHelp.git

Install Flutter and Dart SDK:

Create configuration:

  • Path to dart entrypoint: lib/main.dart
  • Run main.dart

How to join our API:

You can use the api at this link: http://wehelp-apiserver-stage.us.aldryn.io/

How run server on local machine:

  1. Clone repo: https://github.com/iCatOK/weHelpDemo

    git clone https://github.com/iCatOK/weHelpDemo
  2. Install and run Docker, official tutorials: https://docs.docker.com/get-docker/ .

  3. Install docker-compose, tutorials https://docs.docker.com/compose/install/

  4. In cloned project directory run:

    docker-compose up

    After finish last lines should be like below:

    web_1    | Starting ASGI/Channels version 2.4.0 development server at http://0.0.0.0:80/
    web_1    | Quit the server with CONTROL-C.
    web_1    | HTTP/2 support not enabled (install the http2 and tls Twisted extras)
    web_1    | Configuring endpoint tcp:port=80:interface=0.0.0.0
    web_1    | Listening on TCP address 0.0.0.0:80

    Stop running the server.

  5. Next, run:

    docker-compose run web python manage.py migrate

    After finishing last lines will look like below:

      Applying api.0021_user_lol... OK
      Applying api.0022_auto_20200823_1553... OK
      Applying api.0023_auto_20200824_1427... OK
      Applying api.0024_auto_20200825_0849... OK
      Applying authtoken.0001_initial... OK
      Applying authtoken.0002_auto_20160226_1747... OK
      Applying chat.0001_initial... OK
      Applying sessions.0001_initial... OK
      Applying sites.0001_initial... OK
      Applying sites.0002_alter_domain_unique... OK
      Applying socialaccount.0001_initial... OK
      Applying socialaccount.0002_token_max_lengths... OK
      Applying socialaccount.0003_extra_data_default_dict... OK
  6. Finally, run:

    docker-compose up

    You will see response like this, if that's it, so it worked correctly:

    web_1    | Performing system checks...
    web_1    |
    web_1    | System check identified some issues:
    web_1    |
    web_1    | WARNINGS:
    web_1    | ?: (urls.W005) URL namespace 'admin' isn't unique. You may not be able to reverse all URLs in this namespace
    web_1    |
    web_1    | System check identified 1 issue (0 silenced).
    web_1    | August 25, 2020 - 05:50:10
    web_1    | Django version 2.2.15, using settings 'settings'
    web_1    | Starting ASGI/Channels version 2.4.0 development server at http://0.0.0.0:80/
    web_1    | Quit the server with CONTROL-C.

    Next open the 127.0.0.1:8000 address in your browser and you will see page like this:

    Divio

  7. To test setup a Postman Desktop: https://www.postman.com/

You should see application's start window (emptier unlike it) after log in:

Postman

In grey textbox write the address 127.0.0.1:8000/auth/registration/ (especially with final slash) choose POST request in left menu. Type body of registration request like in picture:

Response body

In headers set key-value

Content-Type: application-json

In postman it should be like that:

Post postman

After that click to Send button. You will see response like that:

Request body Key
Postman Key

Add this token in header like that:

Token

And to add your first question change body and address (127.0.0.1:8000/api/questions/ method: POST) like in picture bellow. Make sure that you have headers like in above picture:

Example

After clicking send you'll see response like this:

Returned body

To make sure that your question is in the global list of all questions make GET request without body to 127.0.0.1:8000/api/questions/ :

Get request

Backend project dependencies

# weHelp dependencies
dj-rest-auth>=1.1.0
django-allauth>=0.42.0
channels>=2.4.0
channels-redis>=3.0.1
django >= 3.0.8
djangorestframework>=3.11.0

Backend additional docker images (docker-compose.yml)

# Postgres database
db:
    image: postgres:9.6-alpine
    environment:
      POSTGRES_DB: "db"
      POSTGRES_HOST_AUTH_METHOD: "trust"
    volumes:
      - ".:/app:rw"
# Redis server for socket connections
  redis:
    image: redis:5
    command: redis-server --appendonly yes
    ports:
      - 6379:6379
    volumes:
      - ./docker/data/redis_data:/data

Support:

  • Frontend: Telegram @bestelde_chaos
  • Backend: Discord mambaka #0757

Developers:

About

πŸ™‹πŸ» An application written in flutter will help people get answers to all questions of interest.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages