This project is a prototype for a charging and parking station search and booking platform. It allows users to search for nearby charging and parking stations and book slots for their vehicles. The project features user authentication and booking functionality, with a seamless UI/UX design.
- Search for Charging and Parking Stations: Users can search for stations based on location.
- Booking Functionality: Registered users can book slots at available stations.
- User Authentication: Secure user registration and login system using JWT.
- Responsive Design: The interface is fully responsive and optimized for different devices.
- Frontend: Vite, React, TailwindCSS
- Backend: Node.js, Express.js
- Database: MongoDB (with Mongoose ODM)
- UI/UX Design: Figma
-
Clone the repository:
git clone https://github.com/ManishNMR/InSpace.git cd InSpace
-
Install dependencies for both frontend and backend:
-
Set up environment variables: Create a
.env
file in the api directory and add the following environment variables:MONGO_URL=your-mongodb-connection-string JWT_SECRET=your-jwt-secret
Create a
.env
file in the client directory and add the following environment variables:VITE_API_BASE_URL=your-base-url
-
Start the development server:
- Backend:
cd api node ./index.js
- Frontend:
cd frontend npm run dev
- Backend:
-
Access the app: The app will be running at
http://localhost:5413
for the frontend and the backend API will be available athttp://localhost:4000/api/test
.
- Search for Stations: Use the search bar to find charging and parking stations by location.
- Book Slots: Once logged in, users can book available slots at their chosen station.
- Profile Management: Users can view and manage their bookings and profile information.
- POST /api/register: Register a new user
- POST /api/login: Authenticate a user and return a JWT token
- GET /api/profile: Get the authenticated user’s profile
- POST /api/bookslot: Book a slot at a charging or parking station
- GET /api/mybookings: Retrieve a user’s current bookings
This project is licensed under the MIT License.