automated-parking
v1.0.0
Published
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 parki
Downloads
75
Readme
automated-parking
Project Description
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
Setup Instructions
Dependencies
- Node.js
- MongoDB
Installation Steps
- 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
Building the React App
- Navigate to the
frontend
directory:cd frontend
- Build the React app:
npm run build
Usage Instructions
Starting the Server
- Ensure MongoDB is running on your local machine.
- Start the server:
node index.js
- The server will be running on
http://localhost:5000
.
Using the API
- 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
Running the Python Script
- Ensure MongoDB is running on your local machine.
- Navigate to the
scripts
directory:cd scripts
- Run the Python script:
python user_data_reel.py
Setting Up the Frontend
- 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.
Deploying the Application
- 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.
Contributing Guidelines
- 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.
License
This project is licensed under the MIT License. See the LICENSE
file for more details.