This boilerplate provides a full-stack Next.js setup with a structured monorepo, integrating a Confirm Dialog with text input verification before deleting a user. It includes a dedicated hook for triggering the delete confirmation modal and a reusable Confirm Dialog component. Built with Next.js App Router for the frontend, Next.js API Routes for backend logic, TanStack Query for data fetching, Drizzle ORM for database management, shadcn/ui for UI components, and Docker Compose for auxiliary services, this boilerplate is a solid foundation for Micro SaaS solutions.
Technical Stack
- Frontend: Next.js (App Router)
- Backend: Next.js API Routes
- Data Fetching: TanStack Query
- Database: Drizzle ORM (in a dedicated
db
package) - UI Components: shadcn/ui (in a dedicated
ui
package) - Containerization: Docker Compose
Key Features
- Reusable Confirm Dialog Component: A dedicated modal component that requires text input confirmation before proceeding with user deletion.
- Custom Hook for Deletion Modal: A prebuilt hook that simplifies triggering the confirmation modal, ensuring clean and maintainable code.
- Full CRUD Example: Demonstrates Create, Read, Update, and Delete operations with pagination, search, and filtering.
- Next.js App Router (Frontend): Implements modern UI patterns with server components.
- Next.js API Routes (Backend): Provides structured API endpoints for database operations.
- Optimized Data Fetching with TanStack Query: Enables seamless API caching, background updates, and optimistic UI updates.
- Modular Architecture:
db
Package: Encapsulates Drizzle ORM logic for cleaner database interactions.ui
Package: Uses shadcn/ui for consistent styling and reusable components.
- Scalable & Micro SaaS-Ready: The structured monorepo and Docker Compose for service orchestration make it a solid foundation for building Micro SaaS applications.
Use Cases
This boilerplate is perfect for developers looking to implement a secure and reusable delete confirmation flow in Next.js. The dedicated hook and modal component provide a clean and structured way to handle user deletions safely while maintaining code reusability and scalability.
With Next.js for the frontend, API Routes for the backend, TanStack Query for state management, Drizzle ORM for database operations, and Docker Compose for auxiliary services, this setup delivers a practical, production-ready approach to managing critical user actions in a modern web application! đ
Boilerplate details
Last update
3 weeks agoBoilerplate age
3 weeks ago
Aragon.ai
Turn your selfies into studio-quality headshots in minutes. Save hundreds of dollars and hours of your time.
Visit Aragon.ai