A modern web-based parking management system built with Next.js, Socket.IO, and WebSocket for real-time parking slot monitoring and booking.
- 🚗 Real-time parking slot monitoring
- 📱 User authentication and registration
- 🎫 Slot booking and management
- ⚡ Live updates using WebSocket
- 🌙 Dark/Light mode support
- 📊 Interactive dashboard
- 🔔 Real-time notifications
- 📱 Responsive design
-
Frontend
- Next.js 14 (App Router)
- TypeScript
- Tailwind CSS
- Socket.IO Client
- Lucide Icons
- shadcn/ui Components
-
Backend
- Node.js
- Express.js
- WebSocket
- Socket.IO
- MongoDB
- JWT Authentication
Before you begin, ensure you have the following installed:
- Node.js (v18 or higher)
- npm or yarn
- MongoDB
- Clone the repository
git clone https://github.com/devdaim6/iot-smart-parking-frontend.git
cd iot-smart-parking-frontend
- Install dependencies
npm install
# or
yarn install
- Environment Setup
Create a .env
file in the root directory:
NEXT_PUBLIC_API_URL="http://localhost:5000"
- Start the development server
npm run dev
# or
yarn dev
The application will be available at http://localhost:3000
smart-parking-system/
├── app/ # Next.js app directory
│ ├── (auth)/ # Authentication routes
│ ├── dashboard/ # Dashboard pages
│ └── layout.tsx # Root layout
├── components/ # Reusable components
│ ├── ui/ # UI components
│ └── theme-provider.tsx # Theme configuration
├── hooks/ # Custom React hooks
├── lib/ # Utility functions
├── providers/ # Context providers
└── public/ # Static assets
- Live monitoring of parking slot status
- Automatic status updates using WebSocket
- Visual indicators for occupied/available slots
- Secure user registration and authentication
- JWT-based session management
- User profile management
- Interactive slot booking interface
- Date and time selection
- Duration-based booking
- Automatic slot release
- Mobile-first approach
- Smooth animations and transitions
POST /api/auth/register
- User registrationPOST /api/auth/login
- User login
GET /api/slots
- Get all parking slotsPOST /api/slots/book
- Book a parking slotPOST /api/slots/release
- Release a parking slot
parkingStatus
- Receives parking slot updatestriggerServo
- Controls parking gatedeviceCommand
- Handles device commands
connection
- Handles new client connectionsdisconnect
- Manages client disconnectionsservoControl
- Processes servo control commands
Daim Zahoor - daimdev6+iot+support@gmail.com
Project Link: https://github.com/devdaim6/iot-smart-parking-frontend