Next.js Admin Template is a comprehensive, production-ready admin dashboard template built with modern technologies. It provides a complete foundation for building web applications with authentication, user management, content management, marketplace functionality, and more.
Built with Next.js 16, TypeScript, and PostgreSQL, this template offers a solid architecture with extensive features to accelerate your development.
- Authentication System - OTP-based registration, secure sessions, password reset
- User Management - Role-based access control, permissions, user profiles
- Dashboard Analytics - Comprehensive analytics and reporting tools
- Activity Logging - Track user actions and system events
- Settings Management - User preferences, notifications, appearance settings
- Blog System - Create, edit, and manage blog posts with markdown support
- Help Center - FAQ management and documentation pages
- Legal Pages - Privacy policy, terms of service management
- Notices - Announcements and system notifications
- Campaigns - Marketing campaign management
- Marketplace - Product listings, offers, messaging, and reviews
- Support Tickets - Customer support system with ticket management
- Subscription System - Stripe-powered premium tiers
- Multi-tenancy - Site-wide settings and configuration
- OAuth Integration - Support for external authentication providers
- Shadcn UI Components - Beautiful, accessible component library
- Dark Mode - Theme switching with user preference persistence
- Responsive Design - Mobile-first approach with tailwind CSS
- Real-time Updates - WebSocket support for live features
- Data Tables - Sortable, filterable tables with pagination
- Node.js 18+
- PostgreSQL 15+
- Redis 7+ (optional, for caching and queues)
# Clone the repository
git clone https://github.com/yourusername/next-shadcn-admin.git
cd next-shadcn-admin
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env.local
# Edit .env.local with your configuration
# Generate Prisma Client
npx prisma generate
# Run database migrations
npx prisma migrate deploy
# Start development server
npm run devOpen http://localhost:3000 in your browser.
For detailed documentation, see the docs/ folder:
| Category | Documents |
|---|---|
| Getting Started | INDEX.md • SETUP.md |
| Authentication | AUTH_README.md • REFRESH_TOKENS.md |
| Features | MARKETPLACE.md • ADMIN_DASHBOARD.md |
| Infrastructure | SUBSCRIPTION_SETUP.md |
View Full Documentation Index →
next-shadcn-admin/
├── prisma/
│ └── schema.prisma # Database schema (40+ models)
├── public/ # Static assets
├── src/
│ ├── app/ # Next.js App Router
│ │ ├── (auth)/ # Authentication routes
│ │ ├── (public)/ # Public pages
│ │ ├── (user)/ # User pages
│ │ ├── dashboard/ # Dashboard routes
│ │ └── api/ # API endpoints
│ ├── components/ # React components
│ │ ├── ui/ # Shadcn UI base components
│ │ ├── dashboard/ # Dashboard-specific components
│ │ └── auth/ # Authentication components
│ ├── lib/ # Business logic
│ │ ├── auth/ # Authentication services
│ │ ├── db/ # Database utilities
│ │ └── utils/ # Helper functions
│ └── types/ # TypeScript types
├── docs/ # Documentation
└── server.ts # WebSocket server
Frontend: Next.js 16, React 19, TypeScript, Tailwind CSS, Shadcn UI, TanStack Query
Backend: Node.js, Next.js API Routes, Prisma ORM, PostgreSQL
Services: Stripe, Resend, Firebase (optional OAuth providers)
Real-time: Socket.io, Redis, BullMQ
UI Components: Radix UI primitives, Lucide Icons, Recharts, React Hook Form
/- Landing page/about- About page/blog- Blog listing/blog/[slug]- Blog post details/contact- Contact form/help-center- Help center/pricing- Pricing plans/notices- System notices/privacy- Privacy policy/terms- Terms of service
/auth/sign-in- Sign in/sign-up- Sign up/otp- OTP verification/forgot-password- Password reset
/dashboard- Main dashboard/dashboard/users- User management/dashboard/activities- Activity logs/dashboard/blog- Blog management/dashboard/marketplace- Marketplace/dashboard/settings- User settings/dashboard/support-tickets- Support system
POST /api/auth/register/send-otp- Send registration OTPPOST /api/auth/register/verify-otp- Verify OTPPOST /api/auth/login- LoginPOST /api/auth/logout- LogoutPOST /api/auth/refresh- Refresh access token
GET /api/users- List usersGET /api/users/[id]- Get user detailsPUT /api/users/[id]- Update userDELETE /api/users/[id]- Delete user
GET /api/blog- List blog postsPOST /api/blog- Create blog postPUT /api/blog/[id]- Update blog postDELETE /api/blog/[id]- Delete blog post
GET /api/marketplace/posts- Browse listingsPOST /api/marketplace/offers- Make an offerGET /api/marketplace/conversations- Get conversations
# Development with Infisical (recommended)
npm run dev
# Plain development (using .env.local)
npm run dev:plain
# WebSocket server (in separate terminal)
npm run dev:ws
# Build for production
npm run build
# Start production server
npm startThe application uses PostgreSQL with Prisma ORM. The schema includes 40+ models covering:
- User management and authentication
- Content management (blog, help center, legal pages)
- Marketplace and transactions
- Activity logging and analytics
- Support tickets and campaigns
- Settings and configuration
View the database with:
npx prisma studioThis template is designed to be easily customizable:
- Branding - Update logos, colors, and site name in settings
- Features - Enable/disable features in
.envconfiguration - Components - Use the included Shadcn UI components as building blocks
- Database - Extend the Prisma schema for your specific needs
- API Routes - Add or modify API endpoints in
/src/app/api
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Built with ❤️ using Next.js and Shadcn UI