Skip to content

Hackday tech spec #6

Description

@blahmonkey

Frontend

Overview

  1. Target: mobile browser
  2. Four Pages: Need Help, Can Help, Safety, About
  3. Initial landing page is Need Help with reachable subtle link to Can Help (or nav menu to other pgs)
  4. Configurable elements:

all language strings (should be internationalizable by just pasting in the different language text)
logo (image)
bgcolor, fontcolor, font face, font sizing of category blocks (may need more settings for other text)
active_time_period to show requests for in the 'Can Help' page e.g. '24h' or '72h' or '168h'
domain on which the frontend will be hosted (required for CORS in backend)

  1. Configuration file will be in JSON format and have all settings in 4 above other than the logo image which is a standalone app
  2. All frontend pages are stateless, if any requester/helper comes back, they see a fresh page

Need Help

  1. Current design is a base reference with 3 categories for help
  2. Person needing help enters their name, html5 geolocation gets their lat/lng (no need to show to them at this point), and does 'SEND/CANCEL'
  3. At this point we show disclaimer/guidance that their request will be live for limited time period (as configured) and ask them to login to FB so that helpers can connect to them via FB messenger.

Can Help

  1. Primary content is a list of requests with

date/time, proximity (html5 geolocation based) in miles/km, category of help needed and 'Action' button

  1. All requests within this list were those made in the active_time_period from the current time. e.g. 24 hours -- this parameter is in the configuration (and this is enforced by the backend)
  2. The list has a 'Filter' dropdown on top, allowing the helper to view the list with filter by category of help needed
  3. When person who can help clicks on action button, they are asked to do a checkbox 'I have seen the safety instructions + legal disclaimer if any' and then they have to login via FB; on which they are connected to the requester by FB messenger
  4. When a matchmaking is done (requester is connected to helper) by fb messenger, we remove the original request from the 'Can Help' list

Backend

REST API

  1. Submit request (from Need Help page):

Method - POST
Parameters - name, category, lat, lng, facebook_id
Response status code - 201 (success) / 400 (bad request)
Response text - N/A
Action at backend - add the request to the list (unless there is already a request from same fbid within active_time_period from current time

  1. Fetch requests (from Can Help page):

Method - GET
Parameters - N/A
Response status code - 200 (success) - no failure can happen within API
Response text - json with list of requests, no older than active_time_period {datetime, lat, lng, category}
Action at backend - none

  1. Fulfil requests (from Can Help page):

Method - PUT
Parameters - N/A
Response status code - 201 (success) / 400 (bad request)
Response text - N/A
Action at backend - remove the request from the list

Storage

  1. Expected - SQLite file based storage
  2. DB Tables - Just one table help_requests
  3. Row format - autoid, datetime, lat, lng, category, fbid (numeric id), name

CORS Configuration
Must be configurable

Facebook interconnectivity

  1. OAuth is built into AdonisJS. We need to retrieve the profile_id (numeric) of the user
  2. FB messenger to connect 2 users -- we redirect to the following link in the helper's browser https://m.me/<USERNEEDSHELPPROFILEID>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions