A professional Next.js application with authentication, dashboard, and route management features.
route-map/
├── src/
│ ├── app/ # Next.js App Router pages
│ │ ├── auth/ # Authentication pages
│ │ │ ├── login/
│ │ │ └── register/
│ │ ├── dashboard/ # Dashboard pages
│ │ │ ├── layout.tsx # Dashboard layout with sidebar
│ │ │ └── page.tsx # Main dashboard page
│ │ ├── layout.tsx # Root layout
│ │ ├── page.tsx # Home page (redirects to login)
│ │ └── globals.css # Global styles
│ ├── components/ # React components
│ │ ├── ui/ # Reusable UI components
│ │ │ ├── Button.tsx
│ │ │ ├── Input.tsx
│ │ │ ├── Card.tsx
│ │ │ └── index.ts
│ │ ├── auth/ # Authentication components
│ │ ├── dashboard/ # Dashboard-specific components
│ │ └── layout/ # Layout components
│ │ ├── Header.tsx
│ │ ├── Sidebar.tsx
│ │ └── index.ts
│ ├── lib/ # Library code
│ │ └── api-client.ts # API client utility
│ ├── services/ # API service layer
│ │ └── auth.service.ts # Authentication service
│ ├── hooks/ # Custom React hooks
│ │ └── index.ts # useLocalStorage, useDebounce, etc.
│ ├── utils/ # Utility functions
│ │ └── helpers.ts # Helper functions
│ ├── types/ # TypeScript type definitions
│ │ └── index.ts # Shared types
│ ├── constants/ # Application constants
│ │ └── index.ts # Constants and enums
│ └── config/ # Configuration files
│ └── index.ts # App configuration
├── public/ # Static assets
└── ... (config files)
- Node.js 18+
- npm, yarn, pnpm, or bun
- Install dependencies:
npm install
# or
yarn install
# or
pnpm install- Run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev- Open http://localhost:3000 in your browser.
- ✅ Login page with form validation
- ✅ Registration page
- ✅ Protected routes
- ✅ Authentication service layer
- ✅ Responsive sidebar navigation
- ✅ Header with user profile
- ✅ Dashboard overview with stats
- ✅ Recent activity feed
- ✅ Quick actions panel
- ✅ Button component with variants
- ✅ Input component with validation
- ✅ Card component
- ✅ Reusable layout components
- ✅ Clean folder structure with src directory
- ✅ TypeScript for type safety
- ✅ Path aliases (@/components, @/lib, etc.)
- ✅ Service layer for API calls
- ✅ Custom hooks for common patterns
- ✅ Utility functions and helpers
- ✅ Constants and configuration management
- Framework: Next.js 16
- Language: TypeScript
- Styling: Tailwind CSS v4
- Font: Inter (Google Fonts)
npm run dev- Start development servernpm run build- Build for productionnpm start- Start production servernpm run lint- Run ESLint
Edit src/config/index.ts to change app name and other configurations.
- Create a new directory in
src/app/dashboard/[route-name] - Add a
page.tsxfile - Add navigation item in
src/app/dashboard/layout.tsx
- Add component to appropriate directory:
- UI components →
src/components/ui/ - Feature components →
src/components/[feature]/ - Layout components →
src/components/layout/
- UI components →
- Export from
index.tsfor easier imports
- Create service file in
src/services/ - Use
apiClientfromsrc/lib/api-client.ts - Define types in
src/types/index.ts
- Set up API endpoints
- Implement authentication middleware
- Connect to database
- Add environment variables
- Implement route management pages
- Add user management
- Create analytics dashboard
- Add settings page
- Implement notifications
- Add dark mode support
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.