|
| 1 | +<picture> |
| 2 | + <source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/9113740/201498864-2a900c64-d88f-4ed4-b5cf-770bcb57e1f5.png"> |
| 3 | + <source media="(prefers-color-scheme: light)" srcset="https://user-images.githubusercontent.com/9113740/201498152-b171abb8-9225-487a-821c-6ff49ee48579.png"> |
| 4 | + <img alt="Shows all of the tools in the stack for this template, also listed in the README file." src="https://user-images.githubusercontent.com/9113740/201498152-b171abb8-9225-487a-821c-6ff49ee48579.png"> |
| 5 | +</picture> |
| 6 | + |
| 7 | +<div align="center"><strong>Next.js 13 Admin Dashboard Template</strong></div> |
| 8 | +<div align="center">Built with the Next.js App Router</div> |
| 9 | +<br /> |
| 10 | +<div align="center"> |
| 11 | +<a href="http://admin-dash-template.vercel.sh/">Demo</a> |
| 12 | +<span> · </span> |
| 13 | +<a href="https://vercel.com/templates/next.js/admin-dashboard-tailwind-planetscale-react-nextjs">Clone & Deploy</a> |
| 14 | +<span> |
| 15 | +</div> |
| 16 | + |
| 17 | +## Overview |
| 18 | + |
| 19 | +This is a starter template using the following stack: |
| 20 | + |
| 21 | +- Framework - [Next.js 13](https://nextjs.org/13) |
| 22 | +- Language - [TypeScript](https://www.typescriptlang.org) |
| 23 | +- Auth - [NextAuth.js](https://next-auth.js.org) |
| 24 | +- Database - [Vercel Postgres](https://vercel.com/postgres) |
| 25 | +- Deployment - [Vercel](https://vercel.com/docs/concepts/next.js/overview) |
| 26 | +- Styling - [Tailwind CSS](https://tailwindcss.com) |
| 27 | +- Components - [Tremor](https://www.tremor.so) |
| 28 | +- Analytics - [Vercel Analytics](https://vercel.com/analytics) |
| 29 | +- Linting - [ESLint](https://eslint.org) |
| 30 | +- Formatting - [Prettier](https://prettier.io) |
| 31 | + |
| 32 | +This template uses the new Next.js App Router. This includes support for enhanced layouts, colocation of components, tests, and styles, component-level data fetching, and more. |
| 33 | + |
| 34 | +## Getting Started |
| 35 | + |
| 36 | +During the deployment, Vercel will prompt you to create a new Postgres database. This will add the necessary environment variables to your project. |
| 37 | + |
| 38 | +Inside the Vercel Postgres dashboard, create a table based on the schema defined in this repository. |
| 39 | + |
| 40 | +``` |
| 41 | +CREATE TABLE users ( |
| 42 | + id SERIAL PRIMARY KEY, |
| 43 | + email VARCHAR(255) NOT NULL, |
| 44 | + name VARCHAR(255), |
| 45 | + username VARCHAR(255) |
| 46 | +); |
| 47 | +``` |
| 48 | + |
| 49 | +Insert a row for testing: |
| 50 | + |
| 51 | +``` |
| 52 | +INSERT INTO users (id, email, name, username) VALUES (1, '[email protected]', 'Me', 'username'); |
| 53 | +``` |
| 54 | + |
| 55 | +Finally, run the following commands to start the development server: |
| 56 | + |
| 57 | +``` |
| 58 | +pnpm install |
| 59 | +pnpm dev |
| 60 | +``` |
| 61 | + |
| 62 | +You should now be able to access the application at http://localhost:3000. |
0 commit comments