- Marie-Aimee Brajeux (Project Lead)
- Tien Yuan (Tech Lead)
Table of Contents
- About the project
- Quick Start Guide
- Detailed Start Guide
- Loging into App
- Using Postgres
- Using pgadmin
About the Project
This project meets on Monday at the westside hacknight. We are working with a program of the City of LA's Attorney's Office which supports the Criminal Record Clearing Project by administering the Los Angeles County Homeless Court Program. HEART (Homeless Engagement and Response Team) deploys its staff to homeless connect days in the community where adults who are experiencing homelessness or are at risk of experiencing homelessness may enroll in the program. The program helps participants resolve eligible traffic and pedestrian infraction citations by engaging in services instead of paying fines and fees they cannot afford. HEART files a motion with the Los Angeles Superior Court, requesting a dismissal and/or suspension of fines, and a recall of associated warrants.
Hack for LA has been working with the program's staff to design and build a better processing system, helping to streamline in-person client intake, data processing and the filing of motions.
Find us on the Hack for LA Slack on the channel #heart, or join us at one of our meetings, every Monday night in Santa Monica.
This serves both the backend api and frontend pages for the processing system and will be used to review and process participant info. Below is a brief overview of the tech involved in this project.
- Express is serving the api and an index page
- Jest runs the tests
- Linting is setup with the airbnb style guide
- CI is setup with Travis-CI
- Some simple routes exist for a notes table
- Postgres is seeded with participant table and a citations table
- Latest version of Docker is rquired must be installed on your computer.
- Node and NPM does not have to be installed but it is highly recommended.
- cd into
docker-compose uponce the obove command is finished runiing. This will bring up heart_node, heart_postgres, and heart_pgadmin containers and start the application.
- Go to localhost:3000 to access main-app using user:
- Go to localhost:8080 to access pgadmin using user:
See "How to browse postgres using pgadmin" section below if you wish to see the db structure.
To run tests
- ensure your containers are up with
docker exec -it heart_node npm test(This will work for now but it is slow so we are exploring other options)
This project provides a dockerized
A local database is not required to start working on this project.
\design // contains design files \main-app // contains the full application \api // contains all the backend code \client // contains the front-end code docker-compose.yml README.md // you are reading it
User: demo Password: pwd123
User: email@example.com Password: pgadmin
Use your favorite Command Line Interface (e.g.
powershell) and change into the
Enter the commands:
docker-compose build docker-compose up (after above command finishes)
This downloads and builds the base Docker images (if needed), and starts all services.
node can now be accessed from http://localhost:3000. It serves the main-app.
pgadmin can now be accessed from http://localhost:8080. It's a GUI for browsing postgres.
postgres service exposes the standard PostgreSQL port
5432. It serves the main-app database.
If one service or another is already started:
docker-compose up [SERVICE]
To stop the service(s):
docker-compose stop [SERVICE]
Connecting to the
The default port is
The default postgres credentials are:
Connecting from an application**
Use the PostgreSQL connection URI:
With our defaults:
pgadmin login credentials are:**
How to browse postgres using pgadmin**
Go to localhost:8080 and login.
Then trom the top navbar Object > Create > Server.
On the General tab, fill in whatever Name you want.
On the Connection tab, fill in:
postgres(the name of the local service, as noted in docker-compose.yml
The rest of the fields can be left blank. Click Save to connect.
In the future, the server you saved can be used again
Local Data Persistence / How to Destroy
If the services are started and stopped as outlined above, changes made within the
postgres database server (e.g. creating tables, inserting data) and the
pgadmin client (e.g. server connections, preferences) will persist between restarts.
An alternative command can stop and completely remove all services and any associated local storage. *This is destructive*:
docker-compose down [SERVICE]