0.02
The project is in a healthy, maintained state
This gem contains tests and sequel setup to speak to the Neon Law database
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
 Project Readme

Neon Law Codebase Tweet

Contributor Covenant Maintainability Test Coverage

This is a monorepo containing the following packages, some of which are deployed to our staging and production environment.

Package Latest Version Staging Production
Web NPM deployed on pull requests by Vercel latest main branch commit (link)
Server NPM latest main branch commit (link) v0.1.0 (link)
i18n NPM n/a n/a
Neon NLP Crates.io n/a n/a
Git Flow Crates.io n/a n/a
Neon Postgres RubyGems.Org n/a n/a

This repo also contains an infrastructure folder for managing cloud and SaaS resources with Terraform.

Developer Setup

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.

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 test credentials.

Web Development

For developing the website you can do so locally and speak to our staging GraphQL server. To spin up a Next.JS server, enter the following commands.

yarn
doppler setup # staging
doppler run -- yarn workspace @neonlaw/web dev

Server Development

We recommend developing with a containerized setup that best mimic our staging and production process. If you have docker and docker-compose installed on your machine, you can follow these two steps to start developing.

  1. Start Docker Compose
doppler setup # development
doppler run -- docker-compose up

This starts the following containers:

  1. exec /bin/bash in the shell container.

You are encouraged to do work from the shell container, which contains all of the third party dependencies and libraries to run all of the code defined herein. You can access a shell with:

docker exec -it shell /bin/bash
  1. VSCode settings (optional)

If you don't already have a favorite editor, we recommend VSCode by Microsoft. Using VSCode with Docker Compose as outlined in the previous step, you can edit files directly in the shell container. By doing so, you don't need to install anything on your host machine except for Docker. Node, Python, Postgres, and anything else we may add in the future will all run within Docker containers managed by Docker Compose.

To edit within a container, follow this tutorial, which assumes that you have the Remote - Containers extension installed. Then after starting docker-compose up, you can attach to the shell container, which already has node, psql, and python, with our third-party libraries, and required environment variables, ready for you.

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. Before connecting, please ensure the Public IP is turned on for these instances (by default they're turned off).

Then, you can connect to staging and production with these respective commands:

doppler setup # staging
doppler run -- yarn run sql-proxy-staging
doppler setup # production
doppler run -- yarn run sql-proxy-production

With either command (both cannot be ran at the same time), you'll have a PostgreSQL database running at 127.0.0.1:5432, which you can then connect to with the GCP SQL credentials for staging and production.

Neo4j Proxy

If you need to access either the staging or production neo4j on your local machine, you can connect to it via GKE Service Port forwarding. You can connect to staging and production with these respective commands:

doppler setup # staging
doppler run -- yarn run neo4j-proxy-staging
doppler setup # production
doppler run -- yarn run neo4j-proxy-production

With either command (both cannot be ran at the same time), you'll have a local Neo4j instance at 127.0.0.1:7474 if you have the proper GCP SQL credentials for staging and production.

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.