GithubHelp home page GithubHelp logo

tuffstuff9 / nextjs-serveraction-drizzle-starter Goto Github PK

View Code? Open in Web Editor NEW
11.0 1.0 1.0 50 KB

A robust starter template integrating Next.js 13 server actions with Drizzle ORM and PlanetScale.

Home Page: https://tuffstuff9.hashnode.dev/setting-up-drizzle-orm-with-planetscale-for-your-nextjs-13-app

CSS 6.37% TypeScript 90.96% JavaScript 2.66%
drizzle drizzle-kit drizzle-orm nextjs-template nextjs13 planetscale server-actions drizzle-starter nextjs-server-actions planetscale-starter

nextjs-serveraction-drizzle-starter's Introduction

Next.js 13 with Drizzle ORM & PlanetScale Starter Template

A robust starter template for Next.js 13, integrated with Drizzle ORM and PlanetScale. This template provides a quick and seamless option to get up and running quickly.

nextjsserveractionshq.mp4

๐ŸŒŸ Features

  • Next.js App Router: The latest version of the popular React framework for server-rendered applications.
  • Drizzle ORM: A modern and efficient ORM to manage database operations.
  • PlanetScale: A scalable and serverless relational database.
  • TailwindCSS: A utility-first CSS framework for rapid UI development.
  • Server Actions: Utilize the experimental features of Next.js for better server-side operations.
  • UseFormStatus: An experimental hook to manage form states.

๐Ÿš€ Getting Started

Prerequisites

  • Node.js (v14 or newer)
  • npm or Yarn

Setup

See the accompanying blog post for a more detail overview.

  1. Clone the Repository

    git clone https://github.com/tuffstuff9/nextjs-serveraction-drizzle-starter.git
    cd nextjs-serveraction-drizzle-starter
  2. Install Dependencies

    yarn install
    # or
    npm install
  3. Setup Environment Variables

    • Create a .env file
    • Set up your PlanetScale database and add the DATABASE_URL to the .env file. See here for further details on how to setup PlanetScale integration.
    • Modify the copied connection string by replacing ?sslaccept=strict with ?ssl={"rejectUnauthorized":true}
  4. Run Migrations

    yarn drizzle-kit push:mysql
    # or
    npm run drizzle-kit push:mysql
  5. Start Development Server

    yarn dev
    # or
    npm run dev

Now, you can open http://localhost:3000 in your browser to see your app in action!

๐Ÿ“ƒ License

This project is MIT licensed.

nextjs-serveraction-drizzle-starter's People

Contributors

tuffstuff9 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

moaoa

nextjs-serveraction-drizzle-starter's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.