Skip to content

Repository files navigation

Production runs on Vercel + Turso.


Life After Hate
Life After Hate

A Hack4Impact UIUC project.

Tests and security

About This Project

"Each year, more than 250,000 people in the United States are victims of hate crimes. The vast majority are violent and more than half go unreported. Between 2008 and 2017, 71 percent of extremist-related fatalities in the U.S. were committed by members of the far right or white-supremacist movements. LAH helps people leave the violent far-right to connect with humanity and lead compassionate lives."

- Life After Hate

When helping people leave hate groups, LAH staff members need to sift through their resources located on many different platforms: Excel, email, paper, and more. These resources can be either businesses or organizations that will support ex-hate group members willing to change.

This time sunk looking for resources is time not spent helping people exit hate groups, limiting LAH's reach as an organization. This bottleneck in the support process can also take up to days to complete. By automating and organizing the search process, we can speed up the process of matching resources to formers. We wanted to create a highly-secure, easily searchable, centralized web application to host and manage these resources. This way, we can enable LAH to spend more time serving people and accomplish their mission on a larger scale.

To learn more details about the project, please view the official case study.

Team

Alan Fang
Alan Fang

Product Manager
Josh Byster
Josh Byster

Technical Lead
Evan Eckels
Evan Eckels

Product Designer
Alice Fang
Alice Fang

Software Developer
Rebecca Xun
Rebecca Xun

Software Developer
Lauren Ho
Lauren Ho

Software Developer
Gene Wang
Gene Wang

Software Developer
Albert Cao
Albert Cao

Software Developer
Eugenia Chen
Eugenia Chen

Software Developer
Angad Garg
Angad Garg

Software Developer
Aryn Harmon
Aryn Harmon

Software Developer
Josh Burke
Josh Burke

Software Developer

Development and verification

The app now uses Node 24 LTS, Express 5, Mongoose 9, Passport 0.7, React 18, Vite, MUI 7, and React Hook Form 7. See the Vercel + Turso setup for the current production configuration.

Local setup

  1. Install Node 24 (nvm install / nvm use) and Docker with Compose v2.
  2. Copy .env.example to .env, generate a random session secret, and supply Google OAuth, Mapbox, and MapQuest credentials. Register http://localhost:3000/api/auth/login/callback in Google Cloud. The frontend proxies /api to the backend.
  3. Run docker compose up --build, then open http://localhost:3000.

For synthetic local testing with authentication bypass: ./scripts/lahutil up --admin. The helper needs no npm dependencies. Production explicitly rejects authentication bypass.

Seeding replaces local data and must be intentional:

./scripts/lahutil seed --confirm-local-data-loss

Normal ./scripts/lahutil down preserves database volumes. The old global Docker cleanup and remote environment-file download commands were removed.

Tests and build

npm ci --ignore-scripts
npm ci --prefix backend --ignore-scripts
npm ci --prefix frontend
npm ci --prefix scripts/db_backup/backup --ignore-scripts
npm run lint
npm test
npm run build
cd frontend
npx playwright install chromium
npm run test:e2e

Backend tests create a disposable MongoDB instance; the first run downloads its binary. They never connect to your configured DB_URI. Playwright browser tests exercise the real local API and disposable libSQL with synthetic records; a smaller mocked suite checks UI security behavior. See browser test coverage. External credentials are not needed.

Deployment and migration

See the deployment guide for Google OAuth, database configuration, and deployment requirements. Deployment requires explicit configuration; no production services are changed by installing dependencies or running tests.

For native local development outside Docker, set DB_URI to an isolated local MongoDB, run the backend from backend/ with its environment supplied, and start the frontend from frontend/. Vite proxies /api to 127.0.0.1:5000 by default. Use API_PROXY_TARGET to change that internal development target.

Credits

We want to give credit to the following open source packages (non-exhaustive list):

Frontend packages:

  • React for creating the single page application
  • Redux for state management
  • DeckGL for rendering resources on a map
  • MapboxGL for providing the main map view

Backend packages:

  • Express for the API layer
  • Mongoose for interactions with MongoDB
  • Passport for authentication
  • Joi for schema validation
  • Fuse for fuzzy searching
  • Ramda for functional programming utilities

Testing:

  • Playwright for browser workflow testing
  • Vitest for frontend regression testing
  • Mocha for backend testing

License

Copyright 2020 Hack4Impact UIUC

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


lifeafterhate.org  ·  GitHub @hack4impact-uiuc  ·  Website uiuc.hack4impact.org

About

An intuitive resource map to aid nonprofit Life After Hate staff in finding resources for individuals attempting to disengage from hate groups.

Topics

Resources

Contributing

Stars

14 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages