0.0.62 • Published 9 months ago

kirimase v0.0.62

Weekly downloads
-
License
ISC
Repository
-
Last release
9 months ago

!NOTE
Note: Only critical bugs are being addressed right now as we are planning a complete rewrite in the very near future!

Features

  1. Initialization and Configuration: quickly add and set up essential packages to jump-start your Next.js project.
  2. Code Generation: scaffold models, views, and controllers directly from the CLI.

Quick Start

Install Kirimase CLI globally:

npm install -g kirimase

If you don't already have a Nextjs app, run create-next-app with your preferred package manager.

Then run the following command within the directory of your project:

kirimase init

Note: Kirimase is not compatible with the the pages directory.

Commands

Run these commands within the directory of your Nextjs app:

1. kirimase add

Initializes and configures the following packages for your Next.js project, categorized into:

ORM

Drizzle-ORM

  • Based on your chosen database type (PostgreSQL, MySQL, SQLite), Kirimase sets up the required files for Drizzle-ORM, drizzle-zod for validations and and drizzle-kit to manage migrations.
  • Scripts are auto-added to package.json for immediate use of drizzle-kit.

Prisma


Authentication

Auth.js

  • Generates files for Auth.js (Next-Auth), including the latest Drizzle adapter. (For PlanetScale, references are excluded as it doesn't support foreign keys).
  • Generates a generic sign-in component for immediate use within your Next.js project.
  • Wraps the root layout with the auth provider and generates utilities for auth checks and redirects in your Next.js routes.

Clerk

  • Generates files for Clerk including all necessary config.
  • Wraps the root layout with the auth provider and generates utilities for auth checks and redirects in your Next.js routes.

Lucia

  • Generates files for Lucia including all necessary config.
  • Generates UI and API routes for sign-in and sign-up

Kinde

  • Generates files for Kinde including all necessary config.
  • Generates sign in component and route handler

Other

tRPC

  • Generates files to configure tRPC with the app router.
  • Provides client-side tRPC and scaffolds server-side configuration using the experimental server-invoker pattern.
  • Wraps the root layout in the tRPC provider.

Shadcn-UI

  • Installs and configures Shadcn-UI including button and toast components.
  • Inserts the toast-provider (<Toaster />) to the root layout for instant toast notifications in your Next.js app.

Stripe

  • Installs and configures Stripe within your Next.js project so you can start accepting subscription payments.

Resend

  • Installs and configures Resend

Kirimase also adds relevant keys to your .env which you'll need to provide values for.

2. kirimase generate

Akin to rails scaffold but for Next.js:

npm.io

npm.io

Kirimase generates:

a) Model:

  • Generates a drizzle schema with column types based on your SQL flavor and database provider.
  • Uses drizzle-zod to generate Zod schemas for frontend and backend validation.
  • Generates queries and mutations for CRUD operations, fully typed and optimized for consumption via a Next.js front-end.

b) Controller:

  • Gives you an option to scaffold tRPC, Server Actions and/or API routes.
  • Uses Zod schemas from models for request validation.
  • Includes built-in error handling for API routes and auto-adding of tRPC routes to the root router.

c) Views:

  • Scaffolds views using Shadcn-UI to enable immediate CRUD operations (including select fields for adding relations and datepickers for dates).
  • Option to use either React Hook Form with tRPC or plain React (useOptimistic and useValidated Form hooks)

Run in non-interactive mode

As of v0.0.23, you can run kirimase init and kirimase add entirely via the command line as follows:

kirimase init -sf yes -pm bun --orm prisma -db pg -a next-auth -ap github discord -mp trpc stripe resend -cl shadcn-ui -ie yes
CommandShort FlagLong OptionDescriptionArgument
init--initialise and configure kirimase-
--h--headlessinitialise without any uiyes or no
--sf--src-folderuse a src folderyes or no
--pm--package-managerpackage manager<pm>
--cl--component-libcomponent library<component-lib>
--o--ormorm<orm>
--db--dbdatabase ("pg", "mysql", "sqlite")<db>
--dbp--db-providerdatabase provider - important if using drizzle<dbp>
--a--authauth<auth>
--ap--auth-providersauth providers (if using next-auth)<providers>
--mp--misc-packagespackages ("trpc", "shadcn-ui", "resend")<packages>
--ie--include-exampleinclude exampleyes or no

Contributing

Keen on enhancing Kirimase? Contributions, bug reports, and feature requests are always welcome. Feel free to open an issue or submit a pull request.

To run locally:

pnpm i
pnpm run dev

npm install -g . (in a second terminal - this will then make kirimase available across your machine using "kirimase *command*")

License

MIT

0.0.62

9 months ago

0.0.60

9 months ago

0.0.61

9 months ago

0.0.59

11 months ago

0.0.58

12 months ago

0.0.57

1 year ago

0.0.56-beta.0

1 year ago

0.0.56

1 year ago

0.0.54-beta.1

1 year ago

0.0.54

1 year ago

0.0.55

1 year ago

0.0.53

1 year ago

0.0.52

1 year ago

0.0.51

1 year ago

0.0.47

1 year ago

0.0.50

1 year ago

0.0.48

1 year ago

0.0.49

1 year ago

0.0.46

1 year ago

0.0.46-beta.1

1 year ago

0.0.45

1 year ago

0.0.45-beta.0

1 year ago

0.0.44

1 year ago

0.0.43

1 year ago

0.0.40

1 year ago

0.0.41

1 year ago

0.0.42

1 year ago

0.0.39

1 year ago

0.0.38-beta.1

1 year ago

0.0.38

1 year ago

0.0.37

2 years ago

0.0.31

2 years ago

0.0.32

2 years ago

0.0.33

2 years ago

0.0.34

2 years ago

0.0.35

2 years ago

0.0.36

2 years ago

0.0.30

2 years ago

0.0.26

2 years ago

0.0.27

2 years ago

0.0.28

2 years ago

0.0.29

2 years ago

0.0.20

2 years ago

0.0.21

2 years ago

0.0.22

2 years ago

0.0.23

2 years ago

0.0.24

2 years ago

0.0.25

2 years ago

0.0.15

2 years ago

0.0.16

2 years ago

0.0.17

2 years ago

0.0.18

2 years ago

0.0.19

2 years ago

0.0.11

2 years ago

0.0.12

2 years ago

0.0.13

2 years ago

0.0.14

2 years ago

0.0.10

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.1

2 years ago

1.0.0

2 years ago