Next.js App Router Course - Starter - https://nextjs.org/learn/dashboard-app
This is the starter template for the Next.js App Router Course. It contains the starting code for the dashboard application.
$ npm install -g pnpm
$ npx create-next-app@latest nextjs-dashboard --example "https://github.com/vercel/next-learn/tree/main/dashboard/starter-example" --use-pnpm
$ cd nextjs-dashboard
-
/app
Contains all the routes, components, and logic for your application. This is where you'll be working most of the time. -
/app/lib
Contains functions used in your application, such as reusable utility functions and data fetching functions. -
/app/ui
Contains all the UI components for your application, such as cards, tables, and forms. These components are pre-styled to save development time. -
/public
Contains all the static assets for your application, such as images. -
Config Files
At the root of your application, you'll find config files likenext.config.js
. These files are created and pre-configured when you start a new project usingcreate-next-app
.
-
@heroicons/react
A library of free SVG icons designed for React. Useful for adding consistent and visually appealing icons to your application. -
@tailwindcss/forms
A Tailwind CSS plugin that provides better default styling for form elements like inputs, selects, and buttons, making forms look more consistent and polished. -
@vercel/postgres
A library to interact with PostgreSQL databases directly, optimized for serverless environments on Vercel. Perfect for integrating database operations in your Next.js app. -
autoprefixer
A PostCSS plugin that automatically adds vendor prefixes to your CSS, ensuring compatibility across different browsers. -
bcrypt
A library for hashing passwords securely. Commonly used for user authentication and securely storing passwords in the database. -
clsx
A small utility for conditionally joining class names. Useful for dynamically applying CSS classes in React components. -
next
The Next.js framework itself. Provides features like server-side rendering, static site generation, API routes, and more. -
next-auth
A library to manage authentication in your Next.js app. Supports various providers like Google, GitHub, email/password, and custom credentials. -
postcss
A CSS processor that transforms styles with plugins. Tailwind CSS uses it internally for processing your CSS. -
react
The core library for building user interfaces in a declarative way. -
react-dom
Provides DOM-specific methods for React. Used to render React components to the DOM. -
tailwindcss
A utility-first CSS framework for building modern, responsive designs efficiently. -
typescript
A superset of JavaScript that adds static typing, making your code more robust and less prone to errors. -
use-debounce
A React hook for debouncing values or functions. Useful for improving performance in search inputs or API calls by reducing the frequency of executions. -
zod
A TypeScript-first schema validation library. Useful for validating and parsing data, ensuring type safety.
-
@types/bcrypt
Type definitions for thebcrypt
library, providing IntelliSense and type-checking in TypeScript. -
@types/node
Type definitions for Node.js, helping with type safety and IntelliSense when working with Node.js APIs. -
@types/react
Type definitions for React, ensuring proper type support for React components and hooks in TypeScript. -
@types/react-dom
Type definitions forreact-dom
, enabling type safety for React's DOM rendering APIs in TypeScript.
-
Styling:
tailwindcss
,autoprefixer
, and@tailwindcss/forms
handle styling, ensuring modern and responsive designs. -
Authentication and Security:
bcrypt
andnext-auth
handle secure password hashing and user authentication. -
Database and Backend:
@vercel/postgres
integrates database operations seamlessly with Vercel. -
React Ecosystem:
react
,react-dom
, andclsx
support the core UI functionality, while@heroicons/react
adds icons. -
Validation and Performance:
zod
ensures data integrity, anduse-debounce
optimizes performance. -
TypeScript:
typescript
and related@types/*
packages provide type safety and improved developer experience.
This setup offers a robust foundation for building a modern, scalable, and secure Next.js application.