create-next-admin
v15.5.6
Published
NextJS Admin Dashboard ready to use
Downloads
28
Maintainers
Readme
Create Next Admin
A Next Admin Dashboard installer that uses NextJS as a framework, next-intl for internationalization, prisma as an ORM and nextAuth for authentication, ready to use.
Usage
npx
npx create-next-admin@latest --with-templatepnpm
pnpx dlx create-next-admin@latest --with-templateyarn
yarn create next-admin --with-templatebun
bunx create-next-admin@latest --with-templateor non-interactive mode:
npx create-next-admin@latest --name mydashboard --package npm --with-templateor
npx create-next-admin@latest -n mydashboard -p npm --with-templateThen, Go to Dashboard and register a new user.
- If you want a very simple Auth Login without a dashboard sample just remove
--with-templateargument.
Dependencies
- Next.js (React Framework)
- TailwindCSS (CSS Framework)
- Shadcn (UI Components collection)
- next-intl (Internationalization)
- next-themes (Theme provider)
- Auth.js (Authentication)
- Prisma (ORM)
NextJS Options
| Question | Answer | | ----------------- | ------ | | Typescript | ✅ Yes | | ESLint | ✅ Yes | | Tailwind CSS | ✅ Yes | | src/ directory | ❌ No | | App Router | ✅ Yes | | Turbopack | ✅ Yes | | import alias @/* | ✅ Yes |
Log out
Logout is implemented and functional in the sidebar menu. But if you want to implement it as a button for your project you can use the logoutButton.tsx component.
Deploy
If you want to deploy on Serverless provider such as Vercel you need change only one file at: prisma/schema.prisma
- You need change your "sqlite" into a "postgresql"
- You need add directUrl in order to work with prisma Your prisma config example:
...
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
directUrl = env("DIRECT_URL")
}
...Then in Vercel go to your Project Settings > Environment Variables you need have 3 environments:
- AUTH_SECRET
- DATABASE_URL
- DIRECT_URL
- The Auth Secret you can generate a new one by:
openssl rand -base64 32or here:https://generate-secret.vercel.app/32 - The Database Url and Direct Url you can get from your database provider, example: Supabase
Todo
- Create a dynamic Breadcrumb using the url as path
- Admin section using role Admin
~~3. Create a better Dashboard with example data~~
~~4. Create a better Admin Area~~
~~5. Support internationalization for zod validations~~
~~6. Support install offline mode~~
~~7. Support non-interactive commands~~
Author
👤 Danny Davila
License
MIT License. Read more at LICENSE.md
