React frontend application for the ParkEasy parking management system.
- User authentication (login/register)
- Browse all parking spots
- Create, edit, and delete parking spots (authenticated users)
- Owner-based access control
- Responsive design
- Install dependencies:
npm install
- Create a
.env
file in the root directory:
cp .env.example .env
- Update the API URL in
.env
if your backend runs on a different port:
REACT_APP_API_URL=http://localhost:3000/api
Start the development server:
npm start
The app will open at http://localhost:3000
Create a production build:
npm run build
This frontend is designed to work with the ParkEasy backend API. Make sure the backend is running before starting the frontend.
POST /api/auth/register
- User registrationPOST /api/auth/login
- User loginGET /api/parking
- Get all parking spotsPOST /api/parking
- Create parking spot (protected)PUT /api/parking/:id
- Update parking spot (owner only)DELETE /api/parking/:id
- Delete parking spot (owner only)
src/
├── components/ # React components
│ ├── Home.js
│ ├── Login.js
│ ├── Register.js
│ ├── ParkingList.js
│ ├── ParkingSpotCard.js
│ ├── ParkingSpotForm.js
│ ├── Navbar.js
│ └── ProtectedRoute.js
├── context/ # React context
│ └── AuthContext.js
├── services/ # API services
│ └── api.js
└── App.js # Main app component
- React
- React Router
- Axios
- Context API for state management