npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

create-carch

v1.0.1

Published

Clean & Modular Clean Architecture scaffold for Next.js — generate full project structure, modules, CRUD, and i18n from the CLI

Readme

carch

Clean Architecture scaffold for Next.js — generate a full project, modules, CRUD, and i18n from the CLI.

npm version license author


Quick start

npm create carch@latest

Commands

npm create carch@latest

Interactive project creation. Asks you:

| Prompt | Options | |---|---| | Project name | any | | Architecture | Modular Clean Architecture · Clean Architecture | | Modules | comma-separated (e.g. admin, teacher, student) | | Locales | comma-separated codes (e.g. ar, en, fr) | | Default locale | from your locales | | Auth | next-auth (JWT + httpOnly cookie) | | Data fetching | TanStack Query + Axios · SWR + Axios · Axios only | | UI library | shadcn/ui + Tailwind v4 · Tailwind v4 · None | | Extras | RHF + Zod · TanStack Table · Framer Motion · Sonner | | Package manager | npm · pnpm · bun · yarn |


carch add:module <moduleName>

Adds a new module with the full 4-layer clean architecture.

carch add:module exams

Creates:

src/modules/exams/
├── presentation/
│   ├── pages/
│   ├── components/
│   ├── assets/images/
│   └── icons/
├── domain/
│   ├── entities/
│   └── types/
├── application/
│   ├── hooks/
│   └── services/
├── infrastructure/
│   ├── api/
│   └── integrations/
├── i18n/
│   ├── ar/dashboard/index.json
│   └── en/dashboard/index.json
└── module.config.ts

Also creates src/app/(exams)/ route group.

After running, register the module in src/config/modules.ts.


carch add:crud <module> <entity>

Generates a full CRUD stack for an entity inside a module.

carch add:crud teacher course

| File | Layer | |---|---| | domain/entities/course.entity.ts | Zod schema + type | | domain/types/course.types.ts | DTOs and filters | | infrastructure/api/courses.api.ts | API calls | | infrastructure/api/courses.api.types.ts | Raw response types | | application/hooks/useCourses.ts | List query + filters | | application/hooks/useCourseMutations.ts | Create / update / delete | | presentation/components/courses/CourseColumns.tsx | TanStack Table columns | | presentation/components/courses/CourseForm.tsx | RHF + Zod form | | presentation/components/courses/CreateCourseDialog.tsx | Create modal | | presentation/components/courses/EditCourseDialog.tsx | Edit modal | | presentation/components/courses/DeleteCourseDialog.tsx | Delete confirm | | presentation/pages/CoursesPage.tsx | Full page |


carch add:i18n

Interactive command to add a translation namespace to a module or to shared.

carch add:i18n

Prompts:

  1. Where?shared or a specific module
  2. Namespace name — e.g. courses, settings
  3. File names — e.g. index or table, form, hero

Creates files for every detected locale, then automatically registers the namespace in module.config.ts (or config/i18n.ts for shared).

Example output for carch add:i18n → module: teacher, namespace: courses, files: table, form:

src/modules/teacher/i18n/
├── ar/courses/
│   ├── table.json
│   └── form.json
└── en/courses/
    ├── table.json
    └── form.json

Architecture (generated project)

src/
├── app/                       next.js routing shell — re-exports only
│   ├── (auth)/login/
│   └── (teacher)/             one route group per module
│       ├── layout.tsx         role guard + DashboardLayout
│       └── dashboard/page.tsx
│
├── modules/
│   └── teacher/               same pattern for every module
│       ├── presentation/      layer 1 — UI only
│       ├── domain/            layer 2 — Zod entities + types
│       ├── application/       layer 3 — hooks + services
│       ├── infrastructure/    layer 4 — API + integrations
│       └── i18n/              module translations
│
├── shared/                    cross-module code, same 4 layers
├── config/                    env, constants, i18n registration
├── lib/                       cn, toast, format
├── providers/                 QueryProvider, AppProviders
├── styles/                    globals.css, fonts.css
└── middleware.ts              next-auth + next-intl

Dependency rule

Presentation → Application → Domain ← Infrastructure
  • Presentation — React components and pages. No API calls.
  • Domain — Zod schemas and TypeScript types. No framework imports.
  • Application — Hooks orchestrating domain + infrastructure.
  • Infrastructure — Axios API calls and third-party SDKs.

Tech stack (generated project)

| Concern | Package | |---|---| | Framework | Next.js (App Router) | | Language | TypeScript 5 (strict) | | Styling | Tailwind v4 | | UI | shadcn/ui | | Data fetching | TanStack Query + Axios | | Forms | React Hook Form + Zod | | Tables | TanStack Table | | Auth | next-auth | | i18n | next-intl | | Toast | Sonner | | Animation | Framer Motion |


Author

Mohamed Adel Eid [email protected] github.com/MohamedAdelEid


License

MIT