{"id":40391279,"url":"https://github.com/htmujahid/next-bard","last_synced_at":"2026-04-30T19:32:21.291Z","repository":{"id":327734617,"uuid":"986840301","full_name":"htmujahid/next-bard","owner":"htmujahid","description":"Ultimate boilerplate for your next SAAS. NextJS + Better Auth + oRpc + Drizzle ","archived":false,"fork":false,"pushed_at":"2026-02-02T02:44:08.000Z","size":1825,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-03T22:29:48.800Z","etag":null,"topics":["better-admin","better-auth","crud","datatables","drizzle","drizzle-orm","next","next-safe-action","nextjs","orpc","react","react-hook-form","rpc","shadcn"],"latest_commit_sha":null,"homepage":"https://next-bard.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/htmujahid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-05-20T07:44:21.000Z","updated_at":"2026-02-09T15:10:02.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/htmujahid/next-bard","commit_stats":null,"previous_names":["htmujahid/next-bard"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/htmujahid/next-bard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/htmujahid%2Fnext-bard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/htmujahid%2Fnext-bard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/htmujahid%2Fnext-bard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/htmujahid%2Fnext-bard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/htmujahid","download_url":"https://codeload.github.com/htmujahid/next-bard/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/htmujahid%2Fnext-bard/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32475192,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["better-admin","better-auth","crud","datatables","drizzle","drizzle-orm","next","next-safe-action","nextjs","orpc","react","react-hook-form","rpc","shadcn"],"created_at":"2026-01-20T12:36:50.670Z","updated_at":"2026-04-30T19:32:21.286Z","avatar_url":"https://github.com/htmujahid.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Next Bard\n\nA production-ready, full-stack Next.js 16 boilerplate with authentication, admin panel, user dashboard, CMS, and advanced data tables.\n\n## Features\n\n### Authentication (Better Auth)\n\n- **Email \u0026 Password** - Sign up, sign in, email verification, password reset\n- **OAuth Providers** - GitHub and Google social login\n- **Two-Factor Authentication** - TOTP with QR codes, OTP via email, backup codes\n- **Session Management** - Multiple sessions, IP/user agent tracking, session termination\n- **Role-Based Access Control** - Admin and user roles with permission-based access\n\n### Admin Dashboard\n\n- User management (create, update, delete, ban/unban)\n- User session monitoring\n- Role assignment\n- User impersonation for debugging\n- Statistics and analytics overview\n\n### User Dashboard\n\n- Profile management with image upload\n- Email change with verification\n- Password management\n- Two-factor authentication setup\n- Session management\n- Preferences configuration\n\n### Tasks Management\n\n- Create, read, update, delete tasks\n- Batch operations\n- Status tracking (todo, in-progress, done, canceled)\n- Priority levels (low, medium, high)\n- Labels (bug, feature, enhancement, documentation)\n\n### Advanced Data Tables\n\n- **Multiple Filter Modes**:\n  - Advanced filters (Airtable-like)\n  - Command filters (Linear-like)\n  - Standard filters\n- Multi-column sorting\n- Server-side pagination\n- Column visibility toggle\n- URL state persistence\n- Bulk actions\n- Date, range, and slider filters\n\n### CMS (Keystatic)\n\n- Headless CMS with local file storage\n- Markdown/Markdoc content editor\n- Blog management with categories and tags\n- Draft/published workflow\n- Cover image support\n\n### Marketing Pages\n\n- Landing page with hero, features, tech stack sections\n- Blog listing and detail pages\n- About, Pricing, Privacy, Terms pages\n\n### API Layer (oRPC)\n\n- Type-safe RPC with OpenAPI support\n- Interactive API documentation at `/api/docs`\n- OpenAPI spec at `/api/spec.json`\n- Zod validation on all endpoints\n\n### Payment Integration\n\nThis boilerplate intentionally ships without a built-in payment provider to maximize flexibility and scalability. With Better Auth's plugin system, you can add any payment integration in less than 10 lines of code:\n\n- [Stripe](https://www.better-auth.com/docs/plugins/stripe#user) - Industry-standard payment processing\n- [Polar](https://www.better-auth.com/docs/plugins/polar) - Open source friendly monetization\n- [Autumn](https://www.better-auth.com/docs/plugins/autumn) - Usage-based billing\n- [DodoPayments](https://www.better-auth.com/docs/plugins/dodopayments) - Global payment solution\n- [Creem](https://www.better-auth.com/docs/plugins/creem) - Creator economy payments\n\n### Additional Features\n\n- **Internationalization** - i18next with language detection\n- **Email System** - Nodemailer with SMTP support\n- **File Upload** - AWS S3 / S3-compatible storage (MinIO)\n- **Theme Support** - Light, dark, and system themes\n- **Form Handling** - React Hook Form with Zod validation\n- **Toast Notifications** - Sonner integration\n- **Drag and Drop** - dnd-kit for sortable interfaces\n\n## Tech Stack\n\n| Category         | Technology                  |\n| ---------------- | --------------------------- |\n| Framework        | Next.js 16 (App Router)     |\n| Language         | TypeScript                  |\n| Styling          | Tailwind CSS v4             |\n| UI Components    | Shadcn/ui (47+ components)  |\n| Database         | PostgreSQL with Drizzle ORM |\n| Authentication   | Better Auth                 |\n| API              | oRPC with OpenAPI           |\n| State Management | TanStack React Query        |\n| Forms            | React Hook Form + Zod       |\n| Tables           | TanStack React Table        |\n| CMS              | Keystatic                   |\n| Email            | Nodemailer                  |\n| File Storage     | AWS S3 / MinIO              |\n| Animations       | Motion                      |\n| i18n             | i18next                     |\n\n## Getting Started\n\n### Prerequisites\n\n- Node.js 18+\n- PostgreSQL database\n- S3-compatible storage (optional)\n- SMTP server for emails (optional)\n\n### Installation\n\n1. Clone the repository:\n\n```bash\ngit clone \u003crepository-url\u003e\ncd next-bard\n```\n\n2. Install dependencies:\n\n```bash\nnpm install\n```\n\n3. Copy the environment file and configure:\n\n```bash\ncp example.env .env\n```\n\n4. Start the database (using Docker):\n\n```bash\ndocker-compose up -d\n```\n\n5. Run database migrations:\n\n```bash\nnpm run db:migrate\n```\n\n6. Start the development server:\n\n```bash\nnpm run dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000) to view the application.\n\n## Scripts\n\n| Script                | Description                             |\n| --------------------- | --------------------------------------- |\n| `npm run dev`         | Start development server with Turbopack |\n| `npm run build`       | Build for production                    |\n| `npm run start`       | Start production server                 |\n| `npm run lint`        | Run ESLint                              |\n| `npm run typecheck`   | Run TypeScript type checking            |\n| `npm run format`      | Check code formatting with Prettier     |\n| `npm run format:fix`  | Fix code formatting                     |\n| `npm run db:generate` | Generate Drizzle migrations             |\n| `npm run db:migrate`  | Run database migrations                 |\n| `npm run db:studio`   | Open Drizzle Studio                     |\n| `npm run ba:generate` | Generate Better Auth schema             |\n\n## Project Structure\n\n```\nsrc/\n├── actions/           # Server actions\n├── app/\n│   ├── (marketing)/   # Public pages (landing, blog, etc.)\n│   ├── admin/         # Admin dashboard\n│   ├── api/           # API routes\n│   ├── auth/          # Authentication pages\n│   └── home/          # User dashboard\n├── components/\n│   ├── admin/         # Admin-specific components\n│   ├── auth/          # Authentication forms\n│   ├── data-table/    # Advanced table components\n│   ├── marketing/     # Marketing page components\n│   ├── providers/     # Context providers\n│   ├── sidebar/       # Sidebar navigation\n│   ├── tasks/         # Task management components\n│   ├── ui/            # Shadcn/ui components\n│   └── user/          # User dashboard components\n├── config/            # App configuration\n├── content/           # Keystatic content (blogs)\n├── db/                # Database schema and client\n├── hooks/             # Custom React hooks\n├── lib/               # Utility libraries\n│   ├── auth/          # Authentication utilities\n│   ├── data-table/    # Table utilities\n│   ├── i18n/          # Internationalization\n│   ├── keystatic/     # CMS utilities\n│   └── query/         # React Query utilities\n├── orpc/              # oRPC API definitions\n├── seeders/           # Database seeders\n├── types/             # TypeScript types\n└── validators/        # Zod validation schemas\n```\n\n## Docker Services\n\nThe `docker-compose.yml` includes:\n\n| Service    | Port       | Description                   |\n| ---------- | ---------- | ----------------------------- |\n| PostgreSQL | 5432       | Database server               |\n| MinIO      | 9000, 9001 | S3-compatible storage         |\n| Mailpit    | 1025, 8025 | Email testing (SMTP + Web UI) |\n\n## Environment Variables\n\nSee `example.env` for all available environment variables:\n\n- **Database**: PostgreSQL connection string\n- **Auth**: Better Auth secret, OAuth credentials\n- **Email**: SMTP configuration\n- **S3**: AWS/MinIO credentials and endpoints\n- **App**: Base URL, app name\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhtmujahid%2Fnext-bard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhtmujahid%2Fnext-bard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhtmujahid%2Fnext-bard/lists"}