Strapi Neon Tech Db Branches

screenshot of Strapi Neon Tech Db Branches
strapi

Strapi plugin to connect the neon.tech Postgres database using the neon API

Overview

The Strapi v4 plugin strapi-neon-tech-db-branches integrates neon.tech with Strapi. It allows for the automatic injection of the Postgres connection string based on the current git branch or environment variables. It also creates a new neon database branch for the current working git branch, ensuring isolated databases for development and preview deployment. This plugin follows the develop-preview-ship principle and makes working with Strapi easier by seeding it with live data.

Features

  • Automatic Injection: Automatically injects the Postgres connection string using the current git branch or environment variables.
  • Neon Database Branch: Creates a new neon database branch specific to the current working git branch.
  • Isolated Databases: Ensures that the same database branch is used in both development and preview deployment, eliminating the need for copying and recreating testing data.
  • Seeding with Live Data: Seeds Strapi with live data, making it easier to work with.

Configure via Environment Variables:

  • NEON_API_KEY: Get it from https://console.neon.tech/app/settings/api-keys.
  • NEON_PROJECT_NAME: The neon project under which your DB runs.
  • NEON_ROLE: Create it manually under roles for your project first.
  • GIT_BRANCH or GITHUB_REF_NAME or VERCEL_GIT_COMMIT_REF: The branch can be pinned via one of these env variables (will use first available). If set, the plugin will not use the branch from git.

Configure via config/plugin.js:

Use the config file to configure the plugin.

Summary

The strapi-neon-tech-db-branches plugin allows for seamless integration between neon.tech and Strapi. It simplifies the process of managing Postgres connection strings, creates isolated database branches for different git branches, and ensures that Strapi is always seeded with live data. By providing automatic injection and easy configuration options, this plugin streamlines the development and preview deployment process for Strapi users.

strapi
Strapi

Strapi is an open source headless CMS that provides a customizable content management system and API for your projects. It allows you to manage content in a visual interface and use a REST or GraphQL API to retrieve the data.

fullstack
Fullstack

A fullstack boilerplate provides a starter application that includes both frontend and backend. It should include database, auth, payments, user roles and other backend services to build a fully featured saas or webapps.

typescript
Typescript

TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.