JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 121
  • Score
    100M100P100Q124448F
  • License MIT

Full-stack EchoNet-style project generator CLI

Package Exports

  • @shakil-dev/shakil-stack
  • @shakil-dev/shakil-stack/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@shakil-dev/shakil-stack) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

๐Ÿš€ Shakil-Stack CLI

npm version License: MIT Build Status npm downloads

Shakil-Stack is a high-performance, developer-first full-stack project generator CLI. It scaffolds production-ready applications with a professional Express/Prisma backend and a state-of-the-art Next.js 16 / React 19 frontend โ€” complete with unified branding, authentication, and a premium UI system out of the box.


๐Ÿ“– Documentation & Guides

Full walkthrough and advanced usage:
๐Ÿ‘‰ Shakil-Stack CLI Mastering Guide


โœจ What's New (v2.2.9)

  • ๐ŸŽจ Unified Branding System โ€” <Logo /> component with dark/light SVG variants auto-copied into public/logos/
  • ๐Ÿ”ฒ <Separator /> Component โ€” Premium diagonal-pattern divider for rhythmic UI sectioning
  • ๐Ÿ”— <SocialLinks /> Component โ€” Footer social links (Email, LinkedIn, GitHub, Portfolio) wired to the author's real profiles
  • ๐Ÿ”‘ Google OAuth UI โ€” Login & Register forms now feature a Google sign-in button (replacing the old GitHub button)
  • ๐Ÿ–ผ๏ธ Dual-Pane Auth Layout โ€” Premium split-screen login/register with gradient backdrop and quote panel
  • ๐Ÿ“ Favicons & Logos Asset Pipeline โ€” Static assets organized into public/favicons/ and public/logos/; CLI automatically physicalizes them during init
  • ๐Ÿงฑ Shadcn Base UI (New API) โ€” Migrated to the new Field, FieldGroup, FieldLabel, and render prop pattern โ€” fully compatible with React 19, zero hydration errors
  • ๐Ÿ”Œ TanStack Query โ€” Pre-wired <Providers /> with QueryClientProvider + ThemeProvider
  • ๐ŸŒ Geist Font โ€” Global Geist sans font loaded via next/font/google
  • ๐Ÿ—‘๏ธ Boilerplate Cleanup โ€” Default Next.js page.tsx, globals.css, and asset files are removed and replaced during generation

๐ŸŒŸ Key Features

๐Ÿ›ก๏ธ Backend (Professional EchoNet Architecture)

  • Modular Architecture โ€” Clean, scalable src/app/module pattern
  • Prisma 7+ โ€” Next-gen ORM with pre-configured PostgreSQL adapters and local generated client
  • Better Auth Integration โ€” Pre-built authentication schemas (User, Session, Account)
  • Security First โ€” Integrated Helmet, CORS, Rate Limiting, and XSS Sanitization
  • Centralized Error Handling โ€” Global error handler and structured ApiError class

๐ŸŒ Frontend (Next.js 16 / React 19)

  • App Router โ€” Latest Next.js App Router patterns with Server Actions
  • TypeScript & Tailwind CSS โ€” Pre-configured for visual excellence and type safety
  • Shadcn/UI (Base UI) โ€” New component API (Field, FieldGroup, render props) โ€” no hydration errors
  • Geist Font โ€” Modern, clean sans-serif font via next/font/google
  • Dark / Light Mode โ€” ThemeProvider with system preference detection
  • TanStack Query โ€” Ready-to-use QueryClientProvider in <Providers />
  • Sonner Toasts โ€” Beautiful toast notifications pre-wired globally

๐ŸŽจ Branding & UI Components

Component Path Description
<Logo /> components/logo.tsx Themed logo with dark/light SVG swap, optional text
<Separator /> components/separator.tsx Diagonal-pattern full-width section divider
<SocialLinks /> components/social-links.tsx Icon links for Email, LinkedIn, GitHub, Portfolio
<Navbar /> components/navbar.tsx Sticky responsive nav with user dropdown, mobile Sheet
<Footer /> components/footer.tsx Multi-column footer with <Logo /> + <SocialLinks />
<UserAvatar /> components/user-avatar.tsx Dropdown avatar with logout, dashboard, profile links
<ThemeSwitcher /> components/theme-switcher.tsx One-click dark/light mode toggle

๐Ÿ”‘ Authentication

  • Dual-Pane Layout โ€” Left: gradient brand panel with logo + quote. Right: form panel
  • Login Form โ€” Email + Password with Zod validation + Google sign-in button
  • Register Form โ€” Name, Email, Password, Confirm Password with Zod validation + Google sign-in button
  • Server Actions โ€” loginAction, registerAction, logoutAction using httpClient (axios)
  • JWT Session โ€” getSession() reads and decodes accessToken from server-side cookies
  • Secure Cookies โ€” httpOnly, SameSite=None + Secure=true in production

๐Ÿ› ๏ธ Developer Experience (CLI)

  • One-Command Scaffolding โ€” Full-stack project in seconds with init
  • Smart Module Generation โ€” Scaffold full backend modules (Controller, Service, Route, Interface, Validation, Constant)
  • Asset Physicalization โ€” Logos and favicons automatically copied into public/ during project init
  • Boilerplate Cleanup โ€” Default Next.js starter files removed automatically
  • Built-in Prisma Tools โ€” prisma generate and prisma migrate without leaving the CLI
  • Production Build โ€” TypeScript compilation via tsup targeting Node 20

๐Ÿš€ Commands Guide

1. Initialize a New Project

npx @shakil-dev/shakil-stack init my-awesome-app

Scaffolds the complete full-stack project interactively โ€” backend, frontend, assets, and all components.

2. Scaffold a New Module

Generate a complete backend module with all layers:

# Must be run in the project root
shakil-stack g module Product

Generated Files:

File Purpose
product.controller.ts Request / Response handling
product.service.ts Business logic & Database interaction
product.route.ts API endpoint definitions
product.interface.ts TypeScript types and contracts
product.validation.ts Zod schema validation
product.constant.ts Reusable constants

3. Production Build

shakil-stack build

4. Prisma Power Tools

shakil-stack prisma generate   # Update Prisma Client
shakil-stack prisma migrate    # Apply migrations to DB

๐Ÿ“‚ Project Structure

my-awesome-app/
โ”œโ”€โ”€ backend/
โ”‚   โ”œโ”€โ”€ prisma/
โ”‚   โ”‚   โ”œโ”€โ”€ schema.prisma        # DB schema (User, Session, Account)
โ”‚   โ”‚   โ””โ”€โ”€ migrations/
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ server.ts            # Entry point
โ”‚   โ”‚   โ””โ”€โ”€ app/
โ”‚   โ”‚       โ”œโ”€โ”€ module/          # Feature-based modules
โ”‚   โ”‚       โ”œโ”€โ”€ middleware/      # Security & Global handlers
โ”‚   โ”‚       โ””โ”€โ”€ utils/           # Reusable helpers
โ”‚   โ””โ”€โ”€ tsconfig.json
โ”‚
โ””โ”€โ”€ frontend/ (Next.js 16 / React 19)
    โ”œโ”€โ”€ public/
    โ”‚   โ”œโ”€โ”€ logos/
    โ”‚   โ”‚   โ”œโ”€โ”€ logo-dark.svg    # Dark mode logo
    โ”‚   โ”‚   โ”œโ”€โ”€ logo-light.svg   # Light mode logo
    โ”‚   โ”‚   โ””โ”€โ”€ logo-icon.png    # Favicon source
    โ”‚   โ””โ”€โ”€ favicons/
    โ”‚       โ”œโ”€โ”€ favicon.ico
    โ”‚       โ”œโ”€โ”€ favicon-16x16.png
    โ”‚       โ”œโ”€โ”€ favicon-32x32.png
    โ”‚       โ”œโ”€โ”€ apple-touch-icon.png
    โ”‚       โ””โ”€โ”€ site.webmanifest
    โ””โ”€โ”€ src/
        โ”œโ”€โ”€ app/
        โ”‚   โ”œโ”€โ”€ layout.tsx           # Root layout (Geist font, metadata, Providers)
        โ”‚   โ”œโ”€โ”€ (main)/              # Public-facing pages
        โ”‚   โ”‚   โ”œโ”€โ”€ layout.tsx       # Navbar + Footer layout
        โ”‚   โ”‚   โ””โ”€โ”€ page.tsx         # Landing page
        โ”‚   โ”œโ”€โ”€ (auth)/              # Auth pages (no navbar/footer)
        โ”‚   โ”‚   โ”œโ”€โ”€ login/page.tsx
        โ”‚   โ”‚   โ””โ”€โ”€ register/page.tsx
        โ”‚   โ””โ”€โ”€ dashboard/
        โ”‚       โ””โ”€โ”€ page.tsx
        โ”œโ”€โ”€ components/
        โ”‚   โ”œโ”€โ”€ logo.tsx             # <Logo /> with dark/light SVG swap
        โ”‚   โ”œโ”€โ”€ separator.tsx        # <Separator /> diagonal-pattern divider
        โ”‚   โ”œโ”€โ”€ social-links.tsx     # <SocialLinks /> icon links
        โ”‚   โ”œโ”€โ”€ navbar.tsx           # Responsive sticky navbar
        โ”‚   โ”œโ”€โ”€ footer.tsx           # Multi-column footer
        โ”‚   โ”œโ”€โ”€ user-avatar.tsx      # Avatar dropdown (logout, dashboard, profile)
        โ”‚   โ”œโ”€โ”€ theme-switcher.tsx   # Dark/light mode toggle
        โ”‚   โ”œโ”€โ”€ Providers.tsx        # QueryClientProvider + ThemeProvider
        โ”‚   โ””โ”€โ”€ auth/
        โ”‚       โ”œโ”€โ”€ login-form.tsx   # Dual-pane login form
        โ”‚       โ””โ”€โ”€ register-form.tsx # Dual-pane register form
        โ”œโ”€โ”€ lib/
        โ”‚   โ”œโ”€โ”€ utils.ts             # cn() utility
        โ”‚   โ”œโ”€โ”€ session.ts           # getSession() JWT cookie reader
        โ”‚   โ”œโ”€โ”€ axios/
        โ”‚   โ”‚   โ””โ”€โ”€ httpClient.ts    # Configured axios instance
        โ”‚   โ”œโ”€โ”€ tokenUtils.ts        # setTokenInCookies (server action)
        โ”‚   โ””โ”€โ”€ cookieUtils.ts       # deleteCookie (server action)
        โ””โ”€โ”€ services/
            โ””โ”€โ”€ auth.actions.ts      # loginAction, registerAction, logoutAction

๐Ÿ› ๏ธ Post-Setup Checklist

  1. Backend Environment โ€” Fill in backend/.env:

    DATABASE_URL="postgresql://user:password@localhost:5432/mydb"
    ACCESS_TOKEN_SECRET="your-secret"
    REFRESH_TOKEN_SECRET="your-secret"
  2. Frontend Environment โ€” Fill in frontend/.env.local:

    NEXT_PUBLIC_API_URL="http://localhost:8000/api/v1"
  3. Database โ€” Run migrations:

    shakil-stack prisma migrate
  4. Launch โ€” Start both servers in separate terminals:

    # Backend
    cd backend && npm run dev
    
    # Frontend
    cd frontend && npm run dev

๐Ÿ“ฆ Tech Stack

Layer Technology
Frontend Next.js 16, React 19, TypeScript
Styling Tailwind CSS v4, Shadcn/UI (Base UI)
Font Geist (via next/font/google)
Auth UI Dual-pane layout, Google OAuth button
State / Data TanStack Query (React Query v5)
Toasts Sonner
Forms React Hook Form + Zod
HTTP Client Axios
Backend Express.js, TypeScript
ORM Prisma 7+ (PostgreSQL)
Auth Better Auth
Security Helmet, CORS, Rate Limit, XSS

๐Ÿค Contributing

Contributions make the open-source community an amazing place to learn, inspire, and create.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Please read our CODE_OF_CONDUCT.md before contributing.


๐Ÿ“„ License

Distributed under the MIT License. See LICENSE for more information.


Built with โšก by Shakil Ahmed Billal
๐Ÿ“ง Email ยท ๐Ÿ’ผ LinkedIn ยท ๐Ÿ™ GitHub ยท ๐ŸŒ Portfolio