Automated Parking is a system designed to manage parking spots efficiently. It provides features such as:
- Adding new parking spots
- Retrieving available parking spots
- Updating the status of parking spots
- Calculating time-based pricing for parking spots
- Node.js
- MongoDB
- Clone the repository:
git clone https://github.com/akaday/automated-parking.git
- Navigate to the project directory:
cd automated-parking
- Install the dependencies:
npm install
- Navigate to the
frontend
directory:cd frontend
- Build the React app:
npm run build
- Ensure MongoDB is running on your local machine.
- Start the server:
node index.js
- The server will be running on
http://localhost:5002
.
- To get all parking spots:
GET /api/spots
- To create a new parking spot:
POST /api/spots
- To update entry and exit times for a parking spot and calculate the price:
PUT /api/spots/:id/times
- Ensure MongoDB is running on your local machine.
- Navigate to the
scripts
directory:cd scripts
- Run the Python script:
python user_data_reel.py
- Create a
public
directory in the project root. - Add an
index.html
file in thepublic
directory with a basic form to add parking spots. - Add a
script.js
file in thepublic
directory to handle form submission and interact with the backend API. - Add a
styles.css
file in thepublic
directory to style the form and parking spots list.
- Ensure all dependencies are installed and the server is running locally.
- Choose a deployment platform (e.g., Heroku, AWS, etc.).
- Follow the platform's instructions to deploy the application.
- Ensure the MongoDB connection string is updated to use the production database.
- Ensure your
index.js
serves the static files correctly from thefrontend/build
directory.
- Fork the repository.
- Create a new branch for your feature or bugfix.
- Commit your changes and push the branch to your fork.
- Create a pull request with a description of your changes.
This project is licensed under the MIT License. See the LICENSE
file for more details.
The geosurveillance feature allows tracking and storing geolocation data for each parking spot. This feature helps in monitoring the location and size of parking spots.
- Update the
ParkingSpot
model inmodels/ParkingSpot.js
to includelocation
andsize
fields. - Update the API routes in
routes/parking.js
to handlelocation
andsize
fields when creating and retrieving parking spots.
- Update the form in
public/index.html
to includelocation
andsize
input fields. - Update the script in
public/script.js
to capture and sendlocation
andsize
data to the backend.
- To create a new parking spot with geolocation data:
POST /api/spots { "spotNumber": 1, "isAvailable": true, "location": "40.712776, -74.005974", "size": "large" }
- To retrieve parking spots based on location and size:
GET /api/spots?location=40.712776, -74.005974&size=large