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
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 intopublic/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/andpublic/logos/; CLI automatically physicalizes them duringinit - ๐งฑ Shadcn Base UI (New API) โ Migrated to the new
Field,FieldGroup,FieldLabel, andrenderprop pattern โ fully compatible with React 19, zero hydration errors - ๐ TanStack Query โ Pre-wired
<Providers />withQueryClientProvider+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/modulepattern - 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
ApiErrorclass
๐ 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 โ
ThemeProviderwith system preference detection - TanStack Query โ Ready-to-use
QueryClientProviderin<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,logoutActionusinghttpClient(axios) - JWT Session โ
getSession()reads and decodesaccessTokenfrom server-side cookies - Secure Cookies โ
httpOnly,SameSite=None+Secure=truein 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 generateandprisma migratewithout leaving the CLI - Production Build โ TypeScript compilation via
tsuptargeting Node 20
๐ Commands Guide
1. Initialize a New Project
npx @shakil-dev/shakil-stack init my-awesome-appScaffolds 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 ProductGenerated 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 build4. 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
Backend Environment โ Fill in
backend/.env:DATABASE_URL="postgresql://user:password@localhost:5432/mydb" ACCESS_TOKEN_SECRET="your-secret" REFRESH_TOKEN_SECRET="your-secret"Frontend Environment โ Fill in
frontend/.env.local:NEXT_PUBLIC_API_URL="http://localhost:8000/api/v1"Database โ Run migrations:
shakil-stack prisma migrate
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.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - 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