Coder Social home page Coder Social logo

rfj_expungement's Introduction

Rising for Justice Expungement

The Expungement Eligibility Guide app is a brand new project being created with Rising For Justice. RFJ is a DC organization that runs legal clinics where residents can get help having their criminal records expunged. This repository has the source code for a complex web form. The form encodes logic developed by Rising for Justice to help pro bono lawyers evaluate whether their client is eligible to have their criminal record expunged.

Discalaimer

This is not a self service tool. rfj_expungement is being developed in conjunction with The Rising for Justice organization and is meant to be used within Washington DC. Please talk to your lawyer for any legal advice.

For Clinics

You are free to use this code for your needs as stated in our license. Please remember that this application is made to be used in Washington DC. You will need to modify it to fit your needs in your jurisdiction.

Get Involved

If you'd like to support the mission of Rising for Justice but don't have programming experience, head over to their support page. If you'd like to get started developing this project, read on!

  1. Read CONTRIBUTING.md and our code of conduct
  2. Optionally,review our open issues (note the labels like good first issue or help wanted)

Then...

  1. Create an issue of your own! Do you see a bug, something we're missing, or a feature we really should include?
  2. Remember to follow the guidelines you read earlier, as well as all the instructions in the issue template that best matches your issue.
  3. Submit your issue!

OR...

  1. Fork the repo and clone it locally
  2. npm install
  3. Happy hacking!

Our Tech Stack

We've settled on using Next.js for this project as it gives us the flexibility to deploy it as a web or Electon app.

Running the App

Once you clone the repository on you machine and installed the project dependencies, you can execute $ npm run dev to run the Next.js dev server. For more on how to use Next.js take a look at their Getting Started and their Docs.

About Code For DC

Code for DC is a non-partisan and non-political civic hacktivism organization, and a chapter of the Code for America Brigade Network.

rfj_expungement's People

Contributors

berlinunm avatar charlesdlandau avatar cmazzullo avatar dependabot[bot] avatar dylanbyars avatar fran33 avatar jello avatar jimmyjay1985 avatar mkalish avatar mmacdonald1 avatar psortman avatar simbaxo avatar trevor-jameson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rfj_expungement's Issues

datamodel.json may be obsolete

casecontainer.json & datamodel.json seem to have duplicate info, output reads from casecontainer.json, datamodel.json may be obsolete

CI will build in master

Before we start shipping we need to adopt a "CI in dev branch"->"merge to master branch from dev branch" strategy

is Papered disposition spec

If isPapered, in the configuration shown below, return analysis: "Wait times may vary for papered clients under Intrests of Justice, consult with you client"

image

Branding assets

RFJ has branding guidelines which they would like to be accounted for in this project. For this task we need to:

  1. Await assets from RFJ
  2. Edit favicons, pages/_app, pages/_doc
  3. Maybe edit README?
  4. ???

Requesting collaborator status (ability to write to the repo)

Hey Charles and Froi,

Hope you're both safe and doing well!

I just wanted to request collaborator status on this repo, so I can help review and merge some of the extant pull requests, and new ones as they come up. This would also help me make contributions - there are some parts of the extant pull requests I'd like to use, and can't until they're merged into master.

Of course if you'd prefer to keep control of the repo in fewer hands I completely understand.

Best,
Chris

Using Bit for Component Management and Documentation

Bit is an extension of Git, destructing repositories into discrete components and supports their lifecycle. Bit will automatically detect and manage all the components in a project, their dependencies, and documentation. Bit supports documentation in both markdown and JSDOS.

It lets you independently build, test, version, update and publish components in true isolation from the rest of the repository.

Follow directions in the bit quick start https://docs.bit.dev/docs/quick-start

Open up the wiki

Hey, so it turns out you can't submit a pull request to the wiki.

The repo owner themselves have to enable the wiki.

FYI, I created a page with a few of my notes here. I guess once it's enabled in this repo I'll copy it over manually?

Add way to test (Jest)

It would be great to be able to test parts of this - would anyone object to adding Jest to the dependencies?

Frontend polish issues/nits

  • The "To Top" button doesn't do anything
  • The "Save to PDF" button doesn't work
  • The "Pre-rendered page" button (the little lightning bolt) is baffling - should this be here? I might just be missing something
  • Date Inputs should describe the format they expect in the help text
  • "Evaluator Name" is skipped over when tabbing through the form (accessibility issue)
  • "Persist Case Data" is unclear in function - could use some help text
  • Sometimes default text in Client DOB box isn't deleted after manually selecting a date (flaky)
  • "Case terminated on" box always has Today as the default date
  • Big "Case Info" title at the top of the page seems superfluous

Prettier, husky, et al are a broken mess

We've adopted some linters but we don't have a happy path to really use them. Right now if you're developing on our repo you use the --no-verify flag and what's the point?

PERSIST CASEDATA button

PERSIST CASEDATA button defined in ClientInfoTable.js should be made to look like a button, right now looks like an error msg, suggestion: put oval shading around it to resemble a button

Top Level Data View Component

Motivation:
The form is essentially a set of components encoding a decision tree which branches N times given a case with N charges. Things like the date, name of defendant, names of the charges, et cetera can all be encoded in a component that maps to the top of the decision tree.

Build a top level data view component, which can be something like a table. The data view consists of fields, a form for populating the fields, and navigation to branches in the decision tree. It is at or near the top of the component tree.

Accepts:
rulesData: our single-source-of-truth JSON object describing the rules.
componentsMap: a flat key-value pairs JSON object mapping strings to child components

Renders:
Dynamic tree of child components based on rulesData and componentsMap
row components based on the user inputs, where each row represents a charge the user has declared.

Pushes to context:
All top-level data view fields (e.g. something like clientName)

Consumes from context:
State Machine data (?)
Global user notes data from RTE (?)
Warnings, Notices, Tips data (?)

Propose a new document for user testing questions

  • Is the pending cases field needed?
  • Does evaluator need an id?
  • Does casecontainer include required info (from datamodel)?
  • Is datamodel format correct?
  • Can you (Gwen) provide an example criminal record (with PII removed)?
  • What rules are most important for determining decision logic?

Project Overview

Notes from the National Civic Day of Hacking Project - for updating in a readme or wiki somewhere if needed.

Looks for for the Rising for Justice Expungement Eligibility Guide in the docs folder.

The deterministic guide is deterministic.

High level story: A client comes in to RFJ and meets with a lawyer to review if they are eligible to have their records expunged. One client is a "case" and they may have multiple "charges" they're looking to get expunged. After completing the Eligibility Guide, the results should return one of three states -

  1. Either the client is ineligible to get records expunged.
  2. The client is eligible to get expunged.
  3. The client MAY be eligible to get expunged.

For views

  1. Top level data view
    1. information at the top of the decision tree - clients name evaluators name, data points on evaluator, charges in the case, outcomes of the case, date of the case.
    2. Could be in a table, flat view, whatever we decide from a design perspective.
  2. Each case opens into a view for Deterministic workflow
  3. For each charge indicator for eligible / ineligible
  4. In the issues we’ve spec’d out a bunch of react components
  5. A data model from which the views can be dynamically generated

User

  • the pro bono attorney who’s meeting with the client

Current User Experience

  • a piece of paper, has the documents from the case, prior to beginning to work with them and a determination guide.
  • They go through the set of questions and scribble notes in the margins.
  • based on the control flow in the guide, they come to a determination / recommendation with the client and then tell the client.
  • If they make an error, it’s not controlled.

Goal User Experience

  • Have them enter the information, record the info from the client, in a web form component, and code those responses into a document.
  • If they come to a question like is this case more than 4 years ago - hits a radio button and that become data that’s recorded by the app.
  • Print to pdf - may not happen today, but all the inputs would be recorded and put into a pdf document.
  • PDF gets put on a USB and gets handed too Gwen.
  • If it’s screen reading pdf all the better.
  • If you get to the end of the guide, you could go on to
    • Another charge
    • Another case
    • Summary of recommendation
    • Print file
  • Maximum at a glance feedback for attorney to see

In the future, could open this app up to the public, but we do have a disclaimer about how you should talk to the lawyer.

Two evaluation workflows

  • could change if the law changes tomorrow
  • Json will dynamically create workflows

Top Level functions

  • Print to PDF
  • Reset (you’re about to erase all the data you just entered, do you want to do that?)
  • A card next to the table - right now you have not entered enough information to determine eligible. Based on this charge, this client is ineligible, do you want to continue? Once they’re determined eligible, it should indicate as such.

Deliberately preventing any retention of cases. The print to pdf feature is how it gets persisted to disc, because it’s PII, PMI every GDPR acronym.

The only way the data should be persisted is handing it to Gwen

In the guide

  • at the top, if it’s actual innocence, that’s one type of motion
  • 16803 - Interest of Justice, most complicated with a number of different waiting periods. If you have a recent case with a recent conviction, it makes you ineligible, or they’ll skip of it. If it’s in the 2-4 year window.

Implementation notes

  • Review the issues in the repo
    • Include the top level data view, some of the nav buttons, the eligibility workflow, the at a glance indicator for rows, component-ry is on it’s way to being fully spaced out
  • Features most important
    • Dynamic rendering - reading a json object and then rending them
    • Mapping components to a json object

Work issues

  • validating the data model
    • needs to match the true workflow
  • Are any of the data fields optional at any point? Yes

Split up issues and get to work

Using material UI.

Move Client and Evaluator Info to the end

This app isn't supposed to save any personal information, or any information at all. If information were to be saved, it would be immediately exported to a PDF for the lawyers.

Moving the evaluator info and the client info to the end would allow the lawyers to go through eligibility check first, and then if necessary add extra information about the case and also download to PDF.

DOB (Date of Birth) Date Picker input section

DOB (Date of Birth) picker has a red error on onset because it’s trying to display a DOB value that hasn't been set, perhaps could have it display MM/DD/YYYY

(DOB & case term dates are defined in ClientInfoTable.js)

Repo Description

I wanted to start a conversation about the description of our project. This is the short description found under the repo title. This is not the text for the README.md.

This is a first stab at it, if you agree with it just give a thumbs up to this initial comment. Anything else comment down below 😄

Description

Tool for pro bono attorneys helping the Rising for Justice’s Expungement Clinic.

Any thoughts?

Create hyperlinks in the analysis outputs

Populate the analysis blurbs with hyperlinks in addition to outputs like

"Eligible under for engagement for Interests of Justice -- hyperlink to Interests of Justice"

Input text fields are slow

Seems like there is a delay if you're entering in a lot of characters.

Possible issues:

  1. Updating after every keystroke is potentially too slow.
  2. Potentially, a lot of the DOM is re-rendered when characters are entered. We can test this with logging statements or the react debugger from within chrome.

Component Tree

We need a component tree!

  • Top level data view encoding top level form logic (e.g. client name, date of case) #19
  • Row component for the table using indicator and content component #20
  • Indicator component for the row #21
  • Charge eligibility view #24
  • Persistent nav buttons #25
  • Form components typical to a webform #23
  • Rich text editor #26

Rich Text Editor

The Rich Text Editor feature for this project is intended to be a space for freeform notes. The RTE should be approachable but does not need to be a fully-featured word processing UX.

At this time I am writing the draft schema for the data model with the assumption that the RTE values will be encoded at the root of the data model. That is, there will be no granularity about where notes are assigned.

Docs

TODO:

  • Meaningful README.md
  • CONTRIBUTING.md
  • LICENSE.md
  • Storybook?
  • Issue template?
  • ???

Implement a React Context idiom

In our meeting on 9/14 we identified the need for an example React Context implementation. This can be helpful because:

  1. We need them anyway
  2. We can point to the implementation to show how it fits into this project
  3. Many people have not adopted the React Context API and an example helps onboard them quickly.

Charge numbering display

Charge numbering display begins at 0, probably because it's reflecting array index values (should start at 1 for user-friendliness, but still track the indices correctly)

Outcome Indicator Component

Motivation:
Each client has a case and each case may have more than one charge against the client. The top level data about each charge will be represented in a "Row" of the top level data view. The row displays data like the name of the charge, whether it's a felony or a misdemeanor, but it should also have an "Indicator" which shows at-a-glance what the status of the row is.

Accepts:
chargeId (or some identifier): used to match on the specific charge that the indicator should listen to in the Context.

Renders:
An indicator, such as a circle which changes color and hovertext based on the outcome of evaluations. For example if context indicates that the charge has not been evaluated, show as grey, or if ineligible show as red.

Pushes to context:
???

Consumes from context:
State/outcome of the charge.

Initial meeting notes 2019-08-21

These notes are for our initial meeting notes. More notes and updates to come.

  • There is a checklist that helps determine if a client is eligible for expungened.
  • In a case there can be several charges.
  • each charge needs to go go through the checklist
  • Information needs to be saved in a pdf.
    • No database can be left after the client interview
    • Once the file is created by the app the data enters attorney / client privilege
  • Currently the data is entered by hand.
  • The user is the layer but the conversation is between the layer and client
    • the client needs to bring in their data
      • case number
      • date of birth
      • etc.
  • The checklist has been developed by Rising Justice
  • Rising Justice gets the report from TLO (Trans Union like entity) that has some information of the clients case and charges
    • These reports are inaccurate or incomplete on occasion
  • If any of the charges are not expungeable the case is not

CI?

Travis? Circle? any preferences get logged here.

Charge eligibility view

Motivation:
Once the user navigates "in" to a specific charge that is part of the case, they should be presented with a sequence of questions which map to the data model in the Context object.

Accepts:
Passthrough props from #19 (?)

Renders:
Form components as in #23
Annotations consumed from context

Pushes to context:
User input from the web form

Consumes from context:
Web form annotations, field types, data model generally

Implementing a state machine

The process of the expungement clinic is very much a decision tree. Going from one step to another is based on answers to previous steps.

Since this is the case let's implement a state machine!

After some searching I've landed on using XState.

Persistent nav buttons

In a nav bar or prominent location in the root view, buttons should exist with basic nav functions including:

  1. Back to root view (e.g. the top level data view in #19 )
  2. Reset project (needs confirmation modal)
  3. Save to dummy button (may need a modal)

Note: an actual save feature is out of scope for this issue. See #22

Debug CircleCI

On #27 Circle is failing with no config found, but the config is located in the default position. We'll need to debug.

Save to file feature

Before delivering this project it may become necessary to implement a "save to file" feature, probably save-to-pdf. Ideally, we'll use the print to pdf APIs. At time of writing #15 needs to be finished before this issue can be specced out.

Add ability to deploy static site (through Zeit)

It would be nice to have a place to host our in-progress site, say, to show
the lawyers who are going to help us with user testing.

I propose to use Zeit's "now" tool to do this because:

  • It's really easy to set up with Next.js (by design, they are made by the same company)
  • We can't use GitHub pages because CodeForDC already has a page up using GitHub pages
  • It's free

This branch contains the setup for Now, and allows you to push up a static site.

To push up a site, run these commands locally:
npm install # to install the "now" dependencies
npx now # launches the site (uses your "now" credentials)

Webform components

This is a green-fields (pun intended) issue. We know we'll need form components and we haven't adopted a design library or form library.

Case "Row" Component

Motivation:
Each client has a case and each case may have more than one charge against the client. The top level data about each charge will be represented in a "Row" of the top level data view. The row displays data like the name of the charge, whether it's a felony or a misdemenor. The user clicks some part of this row to navigate to the case eligibility evaluation workflow.

Note: The implementation does not need to use tr, it could just as easily be a card or whatever.

Accepts:
to: destination component(s)
Data fields: The top level component renders each case based on user input, so any data fields such as name of the charge

Renders:
Data fields
Indicator component

Pushes to context:
??

Consumes from context:
??

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.