A full-stack parking space booking and management application that allows users to find, book, and pay for parking spots in real-time. Built with the MERN stack (MongoDB, Express.js, React, Node.js) and integrated with Google Maps and Stripe payment processing.
- Interactive Map: Browse available parking spots on Google Maps
- Real-time Booking: Book parking spots with custom date/time ranges
- Secure Payments: Integrated Stripe payment processing
- Vehicle Options: Support for different vehicle sizes (sedan, SUV, truck)
- Add-ons: Optional features like covered parking, EV charging, security cameras
- Booking History: Track all your past and upcoming reservations
- Add Parking Spots: List your parking spaces on the platform
- Earn Income: Monetize your unused parking spaces
- Manage Listings: Update availability and pricing
- JWT Authentication: Secure user authentication and authorization
- Role-Based Access: Different permissions for renters, owners, and admins
- Responsive Design: Works seamlessly on desktop and mobile devices
- RESTful API: Clean and well-structured backend architecture
- Comprehensive Logging: Detailed logging system for debugging and presentations
- React 19.1.1 - Modern UI library with hooks
- Google Maps API - Interactive map integration
- Stripe.js - Payment processing
- Axios - HTTP client
- Lucide React - Modern icon library
- Tailwind CSS - Utility-first styling
- Node.js - JavaScript runtime
- Express.js 4.19.2 - Web application framework
- MongoDB - NoSQL database
- Mongoose 8.5.1 - MongoDB ODM
- JWT - JSON Web Tokens for authentication
- bcryptjs - Password hashing
- CORS - Cross-Origin Resource Sharing
- Stripe - Secure payment processing
Before running this application, make sure you have the following installed:
- Node.js (v14 or higher)
- MongoDB (v4.4 or higher)
- npm or yarn
- Google Maps API Key
- Stripe Account (for payment processing)
git clone https://github.com/yourusername/parking-app.git
cd parking-appnpm installcd backend
npm installcd ../frontend
npm installCreate a .env file in the backend directory:
# Server Configuration
PORT=5001
NODE_ENV=development
# Database
MONGO_URI=mongodb://127.0.0.1:27017/parking-app
# JWT Secret
JWT_SECRET=your_jwt_secret_key_here
# Stripe (optional for payment features)
STRIPE_SECRET_KEY=your_stripe_secret_key_hereCreate a .env file in the frontend directory:
# Google Maps API
REACT_APP_GOOGLE_MAPS_API_KEY=your_google_maps_api_key_here
# Stripe Public Key
REACT_APP_STRIPE_PUBLIC_KEY=your_stripe_public_key_hereFrom the root directory:
npm startThis will start both the backend server (port 5001) and frontend (port 3000) concurrently.
Start Backend:
cd backend
npm startServer will run on http://localhost:5001
Start Frontend:
cd frontend
npm startReact app will run on http://localhost:3000
cd backend
npm run dev- POST /api/auth/register - Register a new user
- POST /api/auth/login - Login user
- GET /api/spots - Get all parking spots
- POST /api/spots - Create a new parking spot (owner only)
- GET /api/spots/:id - Get spot by ID
- PUT /api/spots/:id - Update spot (owner only)
- DELETE /api/spots/:id - Delete spot (owner only)
- GET /api/bookings - Get user's bookings
- POST /api/bookings - Create a new booking
- GET /api/bookings/:id - Get booking by ID
- PUT /api/bookings/:id - Update booking
- DELETE /api/bookings/:id - Cancel booking
- name: String (required)
- email: String (required, unique)
- password: String (hashed)
- role: Enum ['renter', 'owner', 'admin']
- createdAt: Date
- name: String
- address: String
- location: Object (lat, lng)
- price: Number
- availability: Boolean
- owner: Reference to User
- amenities: Array
- user: Reference to User
- spot: Reference to Spot
- startTime: Date
- endTime: Date
- vehicleSize: Enum ['sedan', 'suv', 'truck']
- addons: Array
- totalPrice: Number
- paymentStatus: Enum ['pending', 'completed', 'failed']
- stripePaymentId: String
# Run frontend tests
cd frontend
npm test- Date & Time Selection: Choose start and end times for parking
- Vehicle & Options: Select vehicle size and optional add-ons
- Payment: Secure payment processing via Stripe
- Base rate per hour
- Variable pricing based on vehicle size
- Additional charges for amenities (covered parking, EV charging, etc.)
- Spots update availability in real-time
- Prevent double bookings
- Visual indicators on map
- Password hashing with bcryptjs
- JWT-based authentication
- Protected routes with middleware
- CORS configuration
- Environment variable protection
- Secure payment processing via Stripe
- Email notifications for bookings
- SMS alerts for parking reminders
- Rating and review system
- Admin dashboard for analytics
- Mobile app (React Native)
- Push notifications
- Advanced search filters
- Favorite spots feature
- Recurring bookings
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (git checkout -b feature/AmazingFeature)
- Commit your changes (git commit -m 'Add some AmazingFeature')
- Push to the branch (git push origin feature/AmazingFeature)
- Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Google Maps Platform for mapping services
- Stripe for payment processing
- MongoDB for database solutions
- The amazing React and Node.js communities
For support, email akkiusemail@gmail.com or create an issue in the GitHub repository.
Star this repository if you find it helpful!