Skip to content

InReach is the world’s first open source verified LGBTQ+ resource platform.

License

Notifications You must be signed in to change notification settings

weareinreach/InReach

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Project license

Pull Requests welcome code with love by InReach

Table of Contents

About

InReach is the world’s first tech platform matching LGBTQ+ people facing persecution and discrimination with safe, verified resources.

The InReach App is available on web (desktop and mobile), and native iOS and Android. Over 9,000 services across the U.S. are currently listed, with new verified services added every day by trained volunteers. InReach’s open-source technology instantly matches LGBTQ+ people in need with independently verified safe housing, medical and mental health care, immigration and other legal help, meal assistance, education and employment, translation, community and spiritual support, and more critical services. InReach is a comprehensive, digital one-stop-shop for all intersectional community needs, with listed verified services for LGBTQ+ asylum seekers, refugees and other immigrants, BIPOC communities, transgender folks, youth and caregivers, and more. The InReach App is free for everyone – including lawyers, case managers, social workers, and other service providers and community organizations searching for affirming resource referrals for LGBTQ+ clients.

Built With

Getting Started

Prerequisites

pnpm

This project uses pnpm to manage packages. To install, run the command:

npm -g install pnpm

or follow the instructions on pnpm's installation page.

Docker

Docker (& docker compose) are used for local databases. Instructions to install Docker can be found here

Installation

To install the required packages & dependencies:

pnpm install

Project Structure

InReach/
├── @types/                       # Shared TypeScript types/overrides
├── apps/
│   ├── app/                      # InReach Application
│   └── web/                      # InReach Main Site
├── docker/                       # Docker compose file for local DB instance
├── lambdas/
│   ├── cognito-messaging/        # AWS Lambda to generate Cognito emails
│   └── cognito-user-migrate/     # AWS Lambda for user migration
├── packages/
│   ├── analytics/                # Analytic event handling
│   ├── api/                      # tRPC API route definitions
│   ├── auth/                     # NextAuth settings
│   ├── config/                   # Other shared configs
│   ├── crowdin/                  # Crowdin API/OTA
│   ├── db/                       # Prisma DB schema & other db scripts
│   ├── env/                      # Environment variable validation
│   ├── eslint-config/            # Custom ESlint configuration
│   ├── ui/                       # React components shared between apps
│   └── util/                     # Misc utility scripts/modules
└── patches/                      # Patched npm packages

Usage

To start the development live servers:

pnpm dev:app  # Starts Next.js for the InReach WebApp
pnpm dev:web  # Starts Next.js for inreach.org (future project)
pnpm dev:ui   # Starts Storybook for UI component development

Next.js based projects will be available at http://localhost:3000

Storybook will be available at http://localhost:6006

Integrations

Crowdin

InReach integrates with Crowdin to manage multilingual translations for both common UI content and dynamic org-data.

  • Common translations (common, landingPage, services) are static JSON files. Updates are made via PR merges after Crowdin export.
  • Org-data translations (orgn_* namespaces) are dynamic and always live. They are fetched via the OTA (Over-The-Air) system, ensuring the latest translations are immediately available in the app.

OTA Flow:

  1. Crowdin exports translations for both common and database-backed namespaces.
  2. OTA generates a manifest file (manifest.json) that tracks the latest version of each namespace.
  3. The app calls the Edge API endpoint /api/i18n/load with the requested language (lng) and namespaces (ns).
  4. The loader fetches translations from:
    • Redis cache (fastest)
    • File-based JSON for common namespaces
    • DB-backed keys for org-data namespaces
  5. Updated translations are stored in Redis for subsequent requests.
  6. Org-data translations appear live in the app immediately, without requiring a PR merge.
  • Org-data translations (orgn_*) are live via OTA.
  • Common translations require a PR merge to update dev/main.

Crowdin Integration - Code Overview

The Crowdin integration in InReach involves a set of packages and files that handle fetching translations from Crowdin, caching them, and serving them to the app. Below is a structured list of the key code files controlling this integration.


1. Crowdin Client Package (@weareinreach/crowdin)

File Purpose
ota/index.ts Fetches OTA manifests from Crowdin and downloads translation files or keys.
ota/edge.ts Provides edge-compatible functions for OTA, suitable for Next.js Edge runtime.
cache/index.ts Handles Redis caching of translations to reduce repeated network calls.
api/index.ts REST API wrapper for Crowdin interactions (if needed).

2. App Layer (@weareinreach/app)

File Purpose
src/pages/api/i18n/load.ts Next.js API Edge route that serves translation data to the app. It reads from Redis cache and falls back to OTA for missing keys.

3. DB / Static Migration Layer (@weareinreach/db)

File Purpose
prisma/data-migrations/* Static migration jobs that run once to update translation keys or other data in the database.
prisma/dataMigrationRunner.ts Runner that executes all pending migration jobs against the Prisma database.

Summary of Flow

  1. Crowdin produces translation files and an OTA manifest.
  2. Crowdin Client (ota) downloads translations and keys, using Redis cache to minimize network calls.
  3. App (i18n/load.ts) fetches translations for requested languages and namespaces, reading from cache or OTA as needed.
  4. Database (data-migrations) is updated only for static migration jobs via dataMigrationRunner.ts. OTA updates for org-data happen dynamically at runtime; static translations are applied once via migrations.

Crowdin Costs:

Crowdin Usage Overview (from Billing info)

  • Managers: InReach has 10 users with the ability to manage translations. The plan allows up to 1,000,000 managers, before hitting a limit.
  • Words: Inreach has used 28,188,094 words of a 100,000,000-word allowance. Crowdin tracks all words in the project, including source strings and translations.

Implications:

  • InReach is using the open-source plan, which has very high limits for managers and words.
  • Crowdin doesn’t charge based on how the app fetches translations (OTA or PRs). They charge based on words in the translation project and the number of managers.

Roadmap

See the open issues for a list of proposed features (and known issues).

Support

Reach out to the maintainer at one of the following places:

Project assistance

If you want to say thank you or/and support active development of InReach:

  • Add a GitHub Star to the project.
  • Tweet about InReach.
  • Write interesting articles about the project on Dev.to, Medium or your personal blog.

Together, we can make InReach better!

Contributing

First off, thanks for taking the time to contribute! Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make will benefit everybody else and are greatly appreciated.

Please read our contribution guidelines, and thank you for being involved!

Authors & contributors

The original setup of this repository is by InReach.

For a full list of all authors and contributors, see the contributors page.

Security

InReach follows good practices of security, but 100% security cannot be assured. InReach is provided "as is" without any warranty. Use at your own risk.

For more information and to report security issues, please refer to our security documentation.

License

This project is licensed under the GNU General Public License v3.

See LICENSE for more information.

Acknowledgements

Powered by Vercel

built with Codeium

About

InReach is the world’s first open source verified LGBTQ+ resource platform.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Contributors 18