Integration with https://neon.tech Serverless Postgres

Overview

README

Welcome to RedwoodJS!

Prerequisites

Start by installing dependencies:

yarn install

Then change into that directory and start the development server:

cd my-redwood-project
yarn redwood dev

Your browser should automatically open to http://localhost:8910 where you'll see the Welcome Page, which links out to a ton of great resources.

The Redwood CLI

Congratulations on running your first Redwood CLI command! From dev to deploy, the CLI is with you the whole way. And there's quite a few commands at your disposal:

yarn redwood --help

For all the details, see the CLI reference.

Prisma and the database

Redwood wouldn't be a full-stack framework without a database. It all starts with the schema. Open the schema.prisma file in api/db and replace the UserExample model with the following Post model:

model Post {
  id        Int      @id @default(autoincrement())
  title     String
  body      String
  createdAt DateTime @default(now())
}

Redwood uses Prisma, a next-gen Node.js and TypeScript ORM, to talk to the database. Prisma's schema offers a declarative way of defining your app's data models. And Prisma Migrate uses that schema to make database migrations hassle-free:

yarn rw prisma migrate dev

# ...

? Enter a name for the new migration: โ€บ create posts

rw is short for redwood

You'll be prompted for the name of your migration. create posts will do.

Now let's generate everything we need to perform all the CRUD (Create, Retrieve, Update, Delete) actions on our Post model:

yarn redwood g scaffold post

Navigate to http://localhost:8910/posts/new, fill in the title and body, and click "Save":

Did we just create a post in the database? Yup! With yarn rw g scaffold <model>, Redwood created all the pages, components, and services necessary to perform all CRUD actions on our posts table.

Frontend first with Storybook

Don't know what your data models look like? That's more than okโ€”Redwood integrates Storybook so that you can work on design without worrying about data. Mockup, build, and verify your React components, even in complete isolation from the backend:

yarn rw storybook

Before you start, see if the CLI's setup ui command has your favorite styling library:

yarn rw setup ui --help

Testing with Jest

It'd be hard to scale from side project to startup without a few tests. Redwood fully integrates Jest with the front and the backends and makes it easy to keep your whole app covered by generating test files with all your components and services:

yarn rw test

To make the integration even more seamless, Redwood augments Jest with database scenarios and GraphQL mocking.

Ship it

Redwood is designed for both serverless deploy targets like Netlify and Vercel and serverful deploy targets like Render and AWS:

yarn rw setup deploy --help

Don't go live without auth! Lock down your front and backends with Redwood's built-in, database-backed authentication system (dbAuth), or integrate with nearly a dozen third party auth providers:

yarn rw setup auth --help

Next Steps

The best way to learn Redwood is by going through the comprehensive tutorial and joining the community (via the Discourse forum or the Discord server).

Quick Links

You might also like...

A complete template for 2022 focused on around React, Postgres and various web3 integrations.

A complete template for 2022 focused on around React, Postgres and various web3 integrations.

A complete template for 2022 focused on around React, Postgres and various web3 integrations. You can use the template to make a website, a web application, a hybrid decentralized web application, or even a DAO.

Dec 22, 2022

Using Htmx, ASP.NET Core, and Marten (postgres document db) to sort list

Using Htmx, ASP.NET Core, and Marten (postgres document db) to sort list

Feb 16, 2022

Simple "everyday CRUD" Postgres queries with perfect TypeScript types

Crudely Typed Simple "everyday CRUD" Postgres queries with perfect TypeScript types. Zero dependencies. Designed to work with pg-to-ts and node-postgr

Dec 26, 2022

Postgres.js - The Fastest full featured PostgreSQL client for Node.js and Deno

Postgres.js - The Fastest full featured PostgreSQL client for Node.js and Deno

๐Ÿš€ Fastest full-featured node & deno client ๐Ÿท ES6 Tagged Template Strings at the core ๐Ÿ„โ€โ™€๏ธ Simple surface API ๐Ÿ–Š๏ธ Dynamic query support ๐Ÿ’ฌ Chat and

Jan 1, 2023

The Complete Intro to Postgres, as taught by Brian Holt for Frontend Masters

next-course-starter A NextJS starter to get you started creating educational materials using Markdown Get Started Set up Node.js v14+ Clone this repo

Dec 30, 2022

Connect to a Postgres database from a Cloudflare Worker, using Cloudflare Tunnel

Cloudflare Workers Postgres Client This is an experimental module. Heavily based on cloudflare/worker-template-postgres, but cleaned up and bundled in

Dec 22, 2022

Wraps postgres API in a pg compatible API.

postgres/pg compatibility layer Wraps postgres API in a pg compatible API.

Oct 16, 2022

๐Ÿ˜ instantly stand up full Postgres databases in your AVA tests

ava-postgres ava-postgres is a test fixture for AVA that provides you with nearly-instant access to a fresh Postgres database for every test. Installa

Dec 22, 2022

Ferramenta desenvolvida para migrar dados de um banco de dados Sqlite para Postgres.

Ferramenta desenvolvida para migrar dados de um banco de dados Sqlite para Postgres.

Sqlite to Postgres Migration Ferramenta desenvolvida para migrar dados de um banco de dados Sqlite para Postgres. Atualmente vocรช pode: Pegar os dados

Dec 15, 2022
Comments
  • Configure Renovate

    Configure Renovate

    Mend Renovate

    Welcome to Renovate! This is an onboarding PR to help you understand and configure settings before regular Pull Requests begin.

    ๐Ÿšฆ To activate Renovate, merge this Pull Request. To disable Renovate, simply close this Pull Request unmerged.


    Detected Package Files

    • api/package.json (npm)
    • package.json (npm)
    • web/package.json (npm)
    • .nvmrc (nvm)

    Configuration

    ๐Ÿ”ก Renovate has detected a custom config for this PR. Feel free to ask for help if you have any doubts and would like it reviewed.

    Important: Now that this branch is edited, Renovate can't rebase it from the base branch any more. If you make changes to the base branch that could impact this onboarding PR, please merge them manually.

    What to Expect

    With your current configuration, Renovate will create 3 Pull Requests:

    Update Yarn to v3.3.0
    • Schedule: ["at any time"]
    • Branch name: renovate/yarn-monorepo
    • Merge into: main
    • Upgrade yarn to 3.3.0
    Update Node.js to v18
    • Schedule: ["at any time"]
    • Branch name: renovate/node-18.x
    • Merge into: main
    • Upgrade node to >=14.19 <=18.12
    Update react monorepo to v18 (major)
    • Schedule: ["at any time"]
    • Branch name: renovate/major-react-monorepo
    • Merge into: main
    • Upgrade react to 18.2.0
    • Upgrade react-dom to 18.2.0

    ๐Ÿšธ Branch creation will be limited to maximum 2 per hour, so it doesn't swamp any CI resources or spam the project. See docs for prhourlylimit for details.


    โ“ Got questions? Check out Renovate's Docs, particularly the Getting Started section. If you need any further assistance then you can also request help here.


    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
Owner
RedwoodJS
Full-stack, multi-client JavaScript Framework built on React, GraphQL, and Prisma
RedwoodJS
Connect Web Integration illustrates the integration of Connect-Web in various JS frameworks and tooling

Connect Web Integration Connect Web Integration is a repository of example projects using Connect-Web with various JS frameworks and tooling. It provi

Buf 43 Dec 29, 2022
๐Ÿ” Lambda Authorizer ready for integration with Serverless Framework and Auth0.

Getting started 1. Clone the repository (or generate a serverless project) sls create --name auth-service --template-url https://github.com/GustavoNor

Gustavo Noronha 2 Feb 10, 2022
Example Serverless DynamoDB integration tests using Jest, TypeScript and the AWS CDK

serverless dynamodb integration tests ?? Example Serverless DynamoDB integration tests using Jest, TypeScript and the AWS CDK Introduction How to inte

Lee Gilmore 8 Nov 4, 2022
The Remix version of the fakebooks app demonstrated on https://remix.run. Check out the CRA version: https://github.com/kentcdodds/fakebooks-cra

Remix Fakebooks App This is a (very) simple implementation of the fakebooks mock app demonstrated on remix.run. There is no database, but there is an

Kent C. Dodds 61 Dec 22, 2022
nest์—ฐ์Šต์šฉ (w. https://github.com/seuiggi, https://github.com/okysky1121)

A progressive Node.js framework for building efficient and scalable server-side applications. Description Nest framework TypeScript starter repository

์ด๋ฆ„ 2 Oct 5, 2022
Learn Web 2.0 and Web 3.0 Development using Next.js, Typescript, AWS CDK, AWS Serverless, Ethereum and AWS Aurora Serverless

Learn Web 2.0 Cloud and Web 3.0 Development in Baby Steps In this course repo we will learn Web 2.0 cloud development using the latest state of the ar

Panacloud Multi-Cloud Internet-Scale Modern Global Apps 89 Jan 3, 2023
A Serverless GraphQL Sample project using Apollo and Serverless Framework with TypeScript and Webpack.

Serverless GraphQL Boilerplate This is a base project with a structure that includes Serverless Framework, Apollo, TypeScript and Webpack. It can be d

Ravi Souza 5 Aug 23, 2022
AWS Lambda & Serverless - Developer Guide with Hands-on Labs. Develop thousands line of aws lambda functions interact to aws serverless services with real-world hands-on labs

AWS Lambda & Serverless - Developer Guide with Hands-on Labs UDEMY COURSE WITH DISCOUNTED - Step by Step Development of this Repository -> https://www

awsrun 35 Dec 17, 2022
My-portfolio - Built with Namecheap, Digital Ocean, Nginx, PM2, SSL, NextJs, Tailwind 3, Graphql, NexusJS, Prisma, Postgres, Passion and Love

Current Implementation technologies Nextjs with Typescript. Static pages/ Server side rendering. Easy peasy state management (Might not need it with i

Samrood Ali 1 Jan 10, 2022
A Turborepo with Strapi v4 (w/ postgres database) + Next.js powered by docker and docker-compose

Turborepo + Strapi + Next.js + Docker A Turborepo with Strapi v4 (w/ postgres database) + Next.js powered by docker and docker-compose. โš ๏ธ Prerequisit

Elvin Chu 60 Dec 29, 2022