3.2.1 • Published 7 months ago

nexquik v3.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

Option 1: Add the generator to your Prisma Schema and run prisma generate

generator nexquik {
  provider = "prisma-generator-nexquik"
  command  = "--init group --name Main"
}

Option 2: Use the command line

npx nexquik --init group --name Main

Example - Initializing Nexquik in an existing app

Install nexquik, install dependencies and required files, and generate some selected models into the app directory.

npm i nexquik
nexquik deps

Now that we installed Nexquik and initialized it in the project, you can add the generator to your schema, and your UI will be generated every time you run prisma generate.

generator nexquik {
  provider = "prisma-generator-nexquik"
  command  = "group --name UserManagement --include User,Admin,Organization group --name TaskManagement --include Task,Product,Category"
}

Keeping the generator in your schema will ensure that any time your models change, your UI will reflect them.

This also allows you to benefit from enhancements to the project from the open source community.

Options

OptionsDescription
-V, --versionOutput the version number
--schema Path to prisma schema file (default: "schema.prisma")
--output Path to root directory of your project (default: "./")
--initInitializes a full Next.js app from scratch
--extendOnlyOnly creates the models specified in the current command, and leaves previously created ones alone.
--appTitle Title to be used in the header of your app (default: "App")
--rootName Desired name for the root app dir for your generated groups (this is the first directory nested under your 'app' directory. (default: "gen")
--depth Maximum recursion depth for your models. (Changing this for large data models is not recommended, unless you filter down your models with the 'include' or 'exclude' flags also.) (default: "5")
--modelsOnlyOnly generates components for your models. Skips the boilerplate files - root page.tsx,layout.tsx, globals.css, etc....
--prismaImport Import location for your prisma client if it differs from the standard setup. (default: "import prisma from '@/lib/prisma';")
--disabledDisable the generator (default: false)
-h, --helpDisplay help for command
CommandsDescription
group optionsCreate a group to organize your models into route groups. You can use this command multiple times to create many groups
depsInstall nexquik dependencies and copy over required config files. (tailwind, postcss, auto-prefixer, etc)
help commandDisplay help for command

Disabled

To disable Nexquik from generating during a Prisma generate, you can either use the --disabled CLI option or set the following env var.

DISABLE_NEXQUIK=true

Live Demo

The live demo is hosted through CodeSandbox.

Using the example directory in this repo, it will build your full app from a Prisma Schema.

To get hands-on, update the prisma schema in the demo, and run the generate task in the CodeSandbox terminal to re-generate your app based on your changes.

Use Cases

Portions of your app that rely on simple CRUD operations are prime candidates for auto-generation. Here are some examples.

User Management

A user management section typically involves creating, reading, updating, and deleting user accounts. This could include functionalities like user registration, profile management, password reset, and account deletion.

Admin Screens

Admin screens often require CRUD operations to manage various aspects of the application or website. This could include managing content, users, roles, permissions, settings, and more.

Product Catalog

An e-commerce website's product catalog might involve creating, reading, updating, and deleting products. Admins could add new products, update product details, and remove products that are no longer available.

Content Management System (CMS)

In a CMS, content creators might need to perform CRUD operations on articles, blog posts, images, and other types of content. They can create, edit, delete, and publish content.

Task Management

For a task management app, users may need to perform CRUD operations on tasks. This includes adding new tasks, marking tasks as completed, updating task details, and deleting tasks.

Customer Relationship Management (CRM)

CRM systems require basic CRUD operations to manage customer information. Users can add new contacts, update contact details, log interactions, and delete contacts if needed.

Event Calendar

An event calendar app may involve CRUD operations for adding, updating, and deleting events. Users can create new events, edit event details, and remove events from the calendar.

Inventory Management

For an inventory management system, CRUD operations could be used to manage stock items. Users can add new items, update quantities, adjust prices, and mark items as discontinued.

Feedback or Comment System

Websites with user-generated content might need CRUD operations for handling feedback, comments, or reviews. Users can post new comments, edit their comments, and delete them.

Polls or Surveys

Poll or survey applications may involve CRUD operations to manage questions, options, and responses. Admins can create new polls, update question wording, and analyze collected responses.

3.2.1

7 months ago

3.1.3

8 months ago

3.2.0

8 months ago

3.1.5

8 months ago

3.1.4

8 months ago

1.2.0

12 months ago

1.2.8

10 months ago

1.2.7

11 months ago

1.2.6

11 months ago

1.2.5

11 months ago

1.2.4

11 months ago

1.2.3

11 months ago

1.2.2

12 months ago

1.2.1

12 months ago

3.1.0-beta.1

8 months ago

2.2.1

9 months ago

2.1.2

9 months ago

2.0.3

9 months ago

3.1.0-beta.2

8 months ago

2.3.0-beta.1

9 months ago

2.2.0

9 months ago

2.1.1

9 months ago

2.0.2

9 months ago

3.1.0-beta.3

8 months ago

2.0.5

9 months ago

2.2.2

9 months ago

2.1.3

9 months ago

2.0.4

9 months ago

2.0.6

9 months ago

2.3.0-beta.4

8 months ago

2.3.0-beta.5

8 months ago

2.3.0-beta.2

8 months ago

2.1.0

9 months ago

2.0.1

9 months ago

2.3.0-beta.3

8 months ago

2.0.0

9 months ago

3.1.2

8 months ago

3.1.1

8 months ago

3.1.0

8 months ago

3.2.0-beta.1

8 months ago

3.0.0

8 months ago

1.1.0

12 months ago