A modern Next.js website with a basic layout structure including header, main content area, and footer.
- Next.js 16 with App Router
- TypeScript support
- Tailwind CSS for styling
- Responsive design
- Dark mode support
- Reusable layout components (Header, Footer, Layout)
- Authentication system with session management
- Protected routes with automatic redirect
- Logout functionality with session invalidation
Use the automated setup scripts to check dependencies, install packages, and start the server:
Windows:
cd scripts
setup.batLinux/macOS:
cd scripts
chmod +x setup.sh # First time only
./setup.shThe setup scripts will:
- Check for Node.js and internet connectivity
- Detect or let you choose a package manager (npm/yarn/pnpm)
- Install dependencies if needed
- Verify port availability
- Start the development server
For more details, see scripts/README.md
If you prefer manual setup:
npm install
npm run devOpen http://localhost:3000 with your browser to see the result.
Session-based auth using sessionStorage. Login at /login with any non-empty credentials. Logout button appears in the header when authenticated.
src/
├── app/ # Next.js app router pages
├── components/ # Reusable React components
└── contexts/ # React contexts (auth, etc.)
npm run dev- Start the development servernpm run build- Build the application for productionnpm start- Start the production servernpm run lint- Run ESLint to check code quality
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.
See LICENSE file for details.