neon_postgres

This gem contains tests and sequel setup to speak to the Neon Law database


Keywords
react, nodejs, nlp, kubernetes, typescript, neo4j, apollo-client, terraform, nextjs, postgresql, vscode, gcp, gke, legaltech, postgraphile, chakra-ui, react-hook-form
License
Other
Install
gem install neon_postgres -v 0.0.2

Documentation

Neon Law Codebase Tweet

Contributor Covenant Maintainability Test Coverage

This is a monorepo containing the software packages used by Neon Law to deliver our services to our clients. You are welcome to use this library pursuant to the Neon License as long as you promise not to use our Neon Law trademark.

Package Latest Version Staging Production
@neonlaw/web NPM deployed on pull requests by Vercel latest main branch commit (link)
@neonlaw/server NPM latest main branch commit (link) v0.1.0 (link)
@neonlaw/i18n NPM n/a n/a
@neonlaw/mdx NPM n/a n/a
neon_nlp (server) Crates.io n/a n/a
git_flow Crates.io n/a n/a
neon_postgres RubyGems.Org n/a n/a
neon_documents RubyGems.Org n/a n/a
neon_email RubyGems.Org n/a n/a
neon_diagrams PyPi n/a n/a
neon_schemas PyPiRubyGems.OrgNPM n/a n/a

This repo also contains an infrastructure folder for managing cloud and SaaS resources with Terraform and a shell folder containing our base docker image, which contains all the libraries necessary to work on any of the above packages.

Developer Setup

The following instructions are for you if you intend to work on this repository.

Git Flow

Our opinionated git flow is an essential part of working with this repo. A series of continuous integration and deployment scripts will run based on how you name your branches and your subsequent pull request to the main branch. Please refer to the package or the git_flow CLI available from crates.io for more information.

Doppler Configuration

We use Doppler for storing and sharing configuration secrets like API keys. If you wish to work on the application, please email us at support@neonlaw.com to request a Doppler account. Please refer to the individual package README files for more information on how to use Doppler.

Package Development

For each of our packages, consult the README file located in each top-level directory of this repository. There, you will find instructions on how to develop. We believe developing each in isolation is a great developer experience because you should not have to load a bunch of stuff in your head whilst coding.

Schemas

The schemas package is built in Python, Ruby, and Node and contains Avro schemas for the messages that travel through our message bus, which is Google Pub/Sub. You can also run a local Google Pub/Sub with the emulator with:

gcloud beta emulators pubsub start --project=neon-law-staging

Cloud SQL Proxy

If you need to access either the staging or production database on your local machine, you can connect to it via Google Cloud SQL Proxy. First, ensure that you have access to the gcp project in Doppler. Then, you can connect to staging and production with these respective commands:

doppler setup # choose the GCP project
yarn run copy-gcp-credentials
yarn run sql-proxy-staging
yarn run sql-proxy-production

The staging database runs at localhost:5433 and the production database runs at localhost:5434.

Copying Postgres Data from Production to Staging

To copy data from production to staging, run the following script:

doppler run -- bundle exec ruby lib/neon_postgres/inter_database_copy/copy.rb

This will copy data over from production to staging while anonymizing client data so we can develop the app without exposing the attorney-client privilege of the firm.

Third-Party SaaS Services

To help us write into this repository and run our business, we use these software:

  • Auth0
  • Casetext
  • Code Climate
  • Doppler
  • G Suite
  • GitHub
  • Google Cloud Platform (GKE and Managed PostgreSQL)
  • Grammarly
  • Lexis Nexis
  • Logflare
  • Mercury Bank
  • PGRita
  • Postgraphile
  • SendGrid
  • Sentry
  • Slack
  • Terraform Cloud
  • Transloadit
  • Vercel
  • Xero
  • Zendesk Suite

Legal

Copyright 2021 Neon Law. Licensed under the Neon License. The Neon License is the same as the Apache License Version 2 with the additional disclaimer that nothing provided herein is legal advice.

Please contact us if you have any questions at support@neonlaw.com.