sayedsoft / nexquik

Whisk up full-CRUD Next.js server components and server actions in seconds

Home Page:https://www.npmjs.com/package/nexquik

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nexquik npm npm License Build / Publish

Nexquik is a CLI tool to auto-generate Next.js full CRUD server components & server actions from a Prisma schema.

For a more in depth example, checkout this Medium Article.

Description

Nexquik reads your Prisma Schema and generates an ENTIRE app directory containing React components and server actions for all your Prisma models.

Say goodbye to manual CRUD implementation and hello to full CRUD capabilities in seconds! This enables you to focus on building your application without spending time on repetitive tasks.

With Next.js server actions, you can harness the power of server-side logic within your React components. Reduce data transfer and supercharge your application's performance.

Usage

Reference the dev folder for an example starting project.

All you need to get started is:

  • A Prisma Schema
  • A Next.js project
    • Using App Directory
    • In your next config, you will need to enable server actions since they are still in Alpha
        experimental: {
          appDir: true,
          serverActions: true,
        }
    

Nexquik supports the following parameters:

  • -schema <value>: Path to prisma schema file (default: "./prisma/schema.prisma").
  • -out <value>: Path to output directory (default: "nexquikApp").
  • -prismaImport <value>: String to use for Prisma Import (default: "@/lib/prisma").

Examples

With defaults:

npx nexquik@latest

With params:

npx nexquik@latest -schema ./prisma/schema.prisma -out nexquikApp -prismaImport ~/server/db

asdf

Contributors

A table of avatars from the project's contributors

About

Whisk up full-CRUD Next.js server components and server actions in seconds

https://www.npmjs.com/package/nexquik

License:Apache License 2.0


Languages

Language:TypeScript 88.1%Language:JavaScript 6.5%Language:CSS 5.4%