Quickly start a new Next.js project with defaults for UI components, layout, database setup and more.
By Joost Schuur (Twitter, Threads).
(Very) early work in progress. More to come.
Preliminary instructions. Start by cloning the repository:
git clone https://github.com/jschuur/decent-nextjs-starter-template
pnpm install
.decent-nextjs-starter-template
in package.json
to your project name..env.example
to .env
and fill in the values as desired.pnpm dev
to start the development server. Visit http://localhost:3000.pnpm run db:migrate
to set up the database. The dev script also runs the local Turso database instance. You can also run pnpm run dev:db:turso
to run that separately.pnpm run db:seed
. Refresh the local page to see the stack list loaded from the database.~/aws/credentials
or via their CLI. If you don't want to use SST just yet, you can run local dev via pnpm run dev-nosst
.AUTH_GOOGLE_ID
and AUTH_GOOGLE_SECRET
(or update auth.ts
to use a different one). Don't forget the random AUTH_SECRET
string.pnpm run deploy
(for a staging build) or pnpm run deploy:prod
. This deploys to AWS via SST. Cloudflare deploys are also supported by SST Ion. Or use the Vercel CLI to deploy to Vercel. Create preview and production env files under .env.preview
and .env.production
respectively. Set a SITE_DOMAIN
to define the hostname for the site.Substitute pnpm
for your package manager of choice (npm, bun, yarn etc).
useDialog
: Open/close dialog management with type-safe dialog data reference via Zustand.ConfirmationDialog
: Reusable confirmation alert with callbacks.DataTable
: Data table with sorting, filtering, row reordering and row actions.Nav
: Menu entry with current path highlighting.roles.ts
: Basic role-based access controls.adminProtectedAction
: shadcn/ui based data table with drag and drop re-ordering and row action menu.