Next-Starter is a front-end project scaffold based on Next.js 14
, which is a good starting point for your next project. (Node.js >= 18.17.0)
- Build with Next.js 14;
- With prisma for database;
- With Tailwind CSS and PostCSS for styling;
- With TypeScript for type checking;
- With ESLint and Prettier for code linting;
- With Lint Staged and Husky for pre-commit linting;
- Add rate limit for API;
- Create with t3-cli;
- With Next-auth for authentication;
First, run the development server:
yarn dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying pages/index.tsx
. The page auto-updates as you edit the file.
API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.ts
.
The pages/api
directory is mapped to /api/*
. Files in this directory are treated as API routes instead of React pages.
Follow is useful commands for development.
# prisma db migrate and generate
yarn prisma:dev
# production build
yarn build
# start production server
yarn start
# run lint
yarn lint
# export static html
yarn export
# lint and fix
yarn lint:fix
# style and fix
yarn style:fix
# clean node_modules
yarn clean
# deps upgrade
yarn npm:check
# dev with specific env file (default is .env.development)
npx dotenv -e .env._test npx next dev
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
- Next.js deployment documentation for more details.
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
- With Tailwind CSS - learn about Tailwind CSS features and API.
- With TypeScript - learn about TypeScript features and API.
- With ESLint - learn about ESLint features and API.
- With Prettier - learn about Prettier features and API.
- T3 App - learn about T3 App features and API.
- Next-i18next
如果你有任何的想法或者意见,欢迎提 Issue 或者 PR。
MIT License © 2023 funnyzak