Next.js
Get Started
Install dependencies, run dev server, and build your Next.js project.
Welcome. This guide will help you set up, run, and understand your project.
What you need
- Node.js (recommended: 20.9.0+)\
Download Node.js - TypeScript (recommended: 5.1.0+)
- A package manager:
Setup
Download the project
After downloading, you will see multiple separate folders (each folder is a different Next.js project). Choose a project folder (for example, “AI Application”) and work inside it.
Install dependencies
Run one of these:
Terminal
yarn install
# or
npm install
# or
pnpm install
# or
bun install
Start development server
Terminal
yarn dev
# or
npm run dev
# or
pnpm dev
# or
bun dev
Open http://localhost:3000.
Build for production
Terminal
yarn build
# or
npm run build
# or
pnpm build
# or
bun build
Start production server
Terminal
yarn start
# or
npm run start
# or
pnpm start
# or
bun start
Useful commands
| Command | What it does |
|---|---|
yarn dev | Start development server |
yarn build | Build for production |
yarn start | Start production server |
yarn lint | Check for code issues |
yarn lint:fix | Fix lint issues automatically |
yarn format | Format code |
You can use
npm, pnpm, or bun instead of yarn if you prefer.Project folder structure
src/ # root
app/ # Main application files (pages, layouts, routes)
context/ # Application context provider
components/ # Reusable building blocks
data/ # Static data (Markdown, JSON)
hooks/ # Custom hooks
interface/ # TypeScript types and interfaces
styles/ # Stylesheets
utils/ # Utilities and helpers