Prerequisites
Before you begin, ensure you have the following installed:Node.js 20+
Download from nodejs.org
npm or pnpm
Package manager (npm comes with Node.js)
Git
Version control system
Recommended: Use Node.js 20.x or later for optimal Next.js 16 performance
Quick Start
1
Clone the Repository
Clone the SuperBox frontend repository to your local machine:
2
Install Dependencies
Install all required npm packages:
This will install Next.js 16, React 19, Tailwind CSS 4.1, Framer Motion, and all other dependencies.
3
Configure Environment Variables
Create a Edit
.env.local file in the root directory:.env.local with your configuration:4
Start Development Server
Development Commands
npm run dev
npm run dev
Starts the Next.js development server with hot module replacement (HMR)Server runs on http://localhost:3000
npm run build
npm run build
Creates an optimized production buildOutput is generated in the
.next directorynpm run start
npm run start
Starts the production server (requires build first)Serves the optimized production build
npm run lint
npm run lint
Runs ESLint to check code qualityIdentifies and fixes linting issues
npm run type-check
npm run type-check
Runs TypeScript type checkingValidates TypeScript types without building
Project Structure
IDE Configuration
VS Code (Recommended)
Install recommended extensions for the best development experience:WebStorm / IntelliJ IDEA
Enable these features:- TypeScript Language Service
- ESLint integration
- Prettier integration
- Tailwind CSS IntelliSense
Troubleshooting
Port 3000 already in use
Port 3000 already in use
If port 3000 is occupied, specify a different port:Or kill the process using port 3000:
Module not found errors
Module not found errors
Clear node_modules and reinstall:
TypeScript errors
TypeScript errors
Restart the TypeScript server in VS Code:
- Press
Cmd/Ctrl + Shift + P - Type “TypeScript: Restart TS Server”
- Press Enter
Tailwind styles not working
Tailwind styles not working
Ensure Tailwind is properly configured and rebuild:
API connection errors
API connection errors
Verify your backend is running and environment variables are correct: