GithubHelp home page GithubHelp logo

linkvan-api's People

Contributors

dependabot[bot] avatar fabionl avatar jhonsidney avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

linkvan-api's Issues

Planning Admin Interface v1.0

Overview of main features needed for the initial version of the Admin Interface. Each feature will have one or more issues with implementation details and relevant discussions.

  • Dashboard
    • Review Pending Facilities
    • Review Pending Users
  • List Facilities #6
    • Viewing Facilities as seen by end users (link to frontend)
    • Approve/Disaprove directly from index page.
  • List Users #7
    • Sign up Users (via email)
    • Approve/Disaprove Users directly from index page
    • Delete Users directly from index page
  • Alerts #47
  • Notices #49
  • Add Ability to Filter
    • #53
    • Alerts by Status (Active/Deactive)
    • Notices by Status (Draft/Published)
    • Users by Status (Verified/Not Verified)
    • Users by Type (Admin, Not-Admin)
  • Add Ability to Search
    • #54
    • Users by: (Name, Email, Phone Number)
  • Location Data
  • List available Welcomes
    • Add/Edit/Delete Welcomes
  • List available Services
    • Add/Edit/Delete Services

Checked items have one or more issues created detailing their requirements.

Add an Analytics section to the Admin interface

The analytics page(s) should be its own section for now, because it might require some work to handle all the data without timing out. The Dashboard can have a simplified version of the analytics after the implementation becomes more clear and stable.

What to display:

  • Ideally we'd have at least a summary of the day, week and month.
  • Another amazing option would be one (or more) charts (not sure if it'd be advisable for first release).

Facilities Search

  1. Services
  2. Welcomes
  3. Facility Name (partial match)

Add a small data dictionary for translating services and welcomes synonyms.

API: /facilities?service=shelter&search=keyword

When /facilities return no facilities.

Add ability to add multiple Phone numbers to facilities

Facilities can have many phone numbers.

Each phone number record will have the phone number and a notes.

This will have to be done in 2 steps.

  • Implement the logic to allow for adding multiple phone numbers with validation.
  • As part of deployment, copy the current phone number to the new phone number data. Just log a warning if the phone number is not valid.
  • After deployment, admin will fix the facilities data.
  • Remove the old facilities phone number field.

Frontend - linkvanproject/linkvan-web#67

Add "bin/docker/dev_reset" script

The script should:

  • drop the database.
  • create a new database.
  • runs bin/docker/setup
    • run migrations.
    • seeds database.
  • populate database with fake data.
  • starts rails server.

Note: Add messages to console letting the user know what commands are run at each step.

Facilities Edit Navigation / Workflow is confusing -

When you Click on Edit Facility from the Hamburger it takes you to a page and it is not clear that this first of 2 pages, The button that states "Update Facility" takes you to the next page and then you can add / change more details. Once you make these changes there is no clear way to exit the facility.

Add notices index and show routes to API

Index:

<api url>/notices?type=<notice type>

Note: type is an optional parameter to filter notices by notice type.

show:

<api url>/notices/slug

Note: slug is an attribute of notices and is included in the index api endpoint.

Re: Notice data. The show action will also serialize the notice's content, while the index page leaves it out of the returned data.

Setup GitHub Workflow to run RSpec on each Pull Request

Fix issues reported by Rubocop

With the introduction of a GitHub workflow to use Rubocop to lint submitted code, we need to fix issues reported by it.

This ticket is supposed to be the placeholder for this effort.

Clear load_fake output at the terminal

Description of the issue below:

  • Make correction in the information output in the terminal for the command rails data: load_fake
  • When executing the command, the terminal must present only the necessary information for the user.

Problem image:

image

Facilities discard (soft-deletion)

When the user asks to delete a facility, they should also select a reason. Then the facility should be marked as discarded.

Reasons:

  • Closed
  • Duplicated

List Users

User Stories

AS an Admin
I WANT TO see a list of users
SO I can View, Edit, Add, Delete, Approve/Disapprove

Scenarios

  • Scenario: Information shown in list of Users

GIVEN I'm on a list of users
THEN I want to see information of each user.

List of expected information:

  • User Name
  • Phone Number
  • Email
  • Organization
  • Status (Not Verified / Verified)
  • Available Actions

  • Scenario: Adding new Users

GIVEN I'm seeing list of users
WHEN I click on Add New User
THEN I want to see the new User form
AND If saved the new created user should receive an 'Signing Up' status
AND an email to proceed their sign up should be sent to their email

List of expected fields:

  • Contact Name
  • Email

  • Scenario: Editing Users

GIVEN I have the right to edit a user
WHEN I click on its Edit action
THEN a Edit User form similar to Sign Up form should be shown


  • Scenario: Delete Users

GIVEN I have the right to delete a user
WHEN I click on its Delete action
THEN I want the see a confirmation dialog
AND if I confirm, I want the user and their facilities to be removed

List Alerts

User Stories

As an Admin
I WANT TO see a list of alerts
SO I can View, Edit, Add, Delete, Active/Deactivate

Scenarios

  • Scenario: Information shown in list of Alerts

GIVEN I'm on a list of alerts
THEN I want to see information of each alert.

List of expected information:

  • Title
  • Content (concatenated)
  • Active
  • Available Actions

  • Scenario: Adding new Alerts

GIVEN I'm seeing list of alerts
WHEN I click on Add New Alert
THEN I want to see the new Alert form

List of expected fields:

  • Title
  • Content
  • Active

  • Scenario: Editing new Alerts

GIVEN I'm seeing list of alerts
WHEN I click on a alert's Edit action
THEN I want to see the edit Alert form


  • Scenario: Deleting Alerts

GIVEN I have the right to delete an alert
WHEN I click on its Delete action
THEN I want to see a confirmation dialog
AND if I confirm, I want to alert to be removed

Add 'bundle install' to the 'Setting up an environment'

In the README.md file, at the 'Setting up an environment' section, it might be a good idea to add an instruction to the user to run 'bundle install' command, just before running 'rails db:create', as this last command complains about the lack of rake.

Just a little enhancement in the docs, but might be useful for beginners (like me).

List Notices

User Stories

As an Admin
I WANT TO see a list of notices
SO I can View, Edit, Add, Delete, Publish/Unpublish

Scenarios

  • Scenario: Information shown in list of Notices

GIVEN I'm on a list of notices
THEN I want to see information of each notice.

List of expected information:

  • Title
  • Content (concatenated)
  • Type
  • Status (Draft/Published)
  • Available Actions

  • Scenario: Adding new Notices

GIVEN I'm seeing list of notices
WHEN I click on Add New Notice
THEN I want to see the new Notice form

List of expected fields:

  • Title
  • Content
  • Type
  • Published

  • Scenario: Editing new Notices

GIVEN I'm seeing list of notices
WHEN I click on a notice's Edit action
THEN I want to see the edit Notice form


  • Scenario: Deleting Notices

GIVEN I have the right to delete an notice
WHEN I click on its Delete action
THEN I want to see a confirmation dialog
AND if I confirm, I want to notice to be removed

Prepare migration to the new app

We'll start fresh in a new database. For that we'll need to import data from the old app to the new one. The script will be used to test the new app, and when we are confident we can deploy to production, we'll start fresh again with the latest production data. After the deploy has been confirmed as successful we'll change the DNS to point to the new app and then we'll need to plan how we'll deal with the old data.

  • Write a script to import data from old production to the new one. โœ…
  • Spin up an instance with a copy of the production data for testing. โœ…
  • After bugs are fixed, start fresh again and spin up the to-be-production instance with the latest production data.
  • Backup the old production database.
  • Plan the actions needed to close the old application entirely.

Reevaluate Analytics implementation

Heroku Database's mini tier has a limitation of 10k rows. When the limit is reached, any write operation in the database leads to a crash.

Current facilities take around 8.7k rows. With 89 visits we had 1.4k impressions, which means 15 impressions per visit. Sounds quite right. To unblock testing, we temporarily removed the analytics feature and removed its data.

Now, while we will have to upgrade the database to the next tier, it seems we should rethink the approach we're taking for analytics. At the very least, we could remove the impressions table and instead add the impressions as a serialized column in the visits table. It would simply contain the list of facility ids displayed to the user.

A brief description:
The analytics feature creates a row on the Visits table for each session. Within a session each time the user goes to a page a Event is registered (one row), and on Impression per returned facility is created (one row per facility returned by the api).

A session is defined by all accesses from a user inside a window of 30mins.

List of Facilities

User Stories

AS a Facility Admin
I WANT TO see a list of my facilities
SO I can View, Edit, Add, Delete

AS an Admin
I WANT TO see a list of all facilities
SO I can View, Edit, Delete, Approve/Disapprove Facilities.

Scenarios

  • Scenario: Information shown in list of Facilities

GIVEN I'm on a list of facilities
THEN I want to see an overview of each facility.

List of expected informations:

  • Facility Name
  • Last Updated
  • Services
  • Welcomes
  • Status (Pending Review / Live)
  • Available Actions'

  • Scenario: Adding new Facilities

GIVEN I'm seeing list of facilities
WHEN I click on Add New Facility
THEN I want to see the new Facility form
AND I should be the owner of the created facility.

List of expected fields:

  • Welcomes
  • Services
  • Address
  • Location in a Google Maps (Optional for v1.0)
  • Phone number
  • Website
  • Hours (With all seven days of week)
  • Notes

  • Scenario: Editting Facilities

GIVEN I have the right to edit a facility
WHEN I click on its Edit action
THEN a Edit Facility form similar to the new facility form


  • Scenario: Delete Facilities

GIVEN I have the right to delete a facility
WHEN I click on its Delete action
THEN I want the see a confirmation dialog
AND if I confirm, I want the facility to be removed of the list

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.