Parkade is a full-stack web application for parking slot management and reservations. The application allows users to view available parking slots, make reservations, and manage their bookings.
- Framework: React with TypeScript
- Build Tool: Vite
- Styling: Tailwind CSS
- UI Components: shadcn-ui
- Environment: Node.js
- Framework: Express.js
- Database: MySQL
- Authentication: JWT (JSON Web Tokens) & bcryptjs for password hashing
parkade/
├── frontend/ # React frontend application
├── middleware/ # Express middlewares (e.g., Auth)
├── routes/ # API routes (Auth, Parking Slots, Reservations)
├── server.js # Express application entry point
├── db.js # Database connection setup
└── package.json # Backend dependencies
- User Authentication: Secure login and registration using JWT.
- Parking Slots Management: View and interact with available parking spaces.
- Reservations System: Book parking slots and manage user reservations.
- Node.js (v16+)
- MySQL Server
- Create a MySQL database for the application.
- In the root
parkadedirectory, create a.envfile with your database credentials:DB_HOST=localhost DB_USER=your_mysql_user DB_PASS=your_mysql_password DB_NAME=your_database_name PORT=5000 JWT_SECRET=your_jwt_secret_key
- Navigate to the root directory:
cd parkade - Install dependencies:
npm install
- Start the backend server:
npm start # or run with node: node server.js
- Open a new terminal and navigate to the frontend directory:
cd parkade/frontend - Install frontend dependencies:
npm install
- Start the development server:
npm run dev
The backend server will run on http://localhost:5000 and the frontend application will usually be available at http://localhost:5173.
POST /api/auth/register- Register a new userPOST /api/auth/login- Authenticate user and receive JWTGET /api/parking-slots- Retrieve parking slotsPOST /api/reservations- Create a new reservationGET /api/reservations- Get user reservations
ISC