davidmensahedem/easycharge
Toronto Vehicle Charging Location Finder
Toronto Vehicle Charging Location Finder
Overview
The Toronto Vehicle Charging Location Finder is a web-based application designed to help users in Toronto locate nearby vehicle charging stations. It provides an interactive map where users can share their current location, select a number of charging stations, and receive suggestions for the closest stations.
This project integrates modern web development tools and geospatial technologies to deliver a seamless user experience.
Features
- Share Current Location: Users can share their real-time location to find charging stations nearby.
- Charging Station Selection: Specify the number of nearby stations you wish to locate.
- Optimized Proximity Search: The app identifies and displays the closest charging stations based on the user’s location.
- Interactive Mapping: Smooth, interactive map interface with zoom, pan, and station markers.
- Scalable Back-End: Built with FastAPI for fast and reliable API handling.
- Spatial Queries: Efficient location processing powered by PostgreSQL with PostGIS extension.
Technology Stack
Front-End:
- LeafletJS: For rendering and managing the interactive map.
- JavaScript: For implementing dynamic user interactions and map controls.
Back-End:
- FastAPI: To handle API requests and location-based logic.
Database:
- PostgreSQL with PostGIS: For spatial data storage and advanced location queries.
Installation and Setup
Prerequisites:
- Python 3.8 or higher
- PostgreSQL with PostGIS extension
Steps:
-
Clone the Repository:
git clone <repository-url> cd easycharge
-
Set Up the Database:
- Install PostgreSQL and enable the PostGIS extension.
- Create a database and populate it with charging station data using the provided scripts.
-
Install Back-End Dependencies:
pip install -r packages.txt
-
Start the Back-End Server:
python app.py
-
Access the Application:
Open your browser and navigate tohttp://127.0.0.1:5000.
Usage
- Open the application in your browser.
- Share your location by clicking the "Share Location" button.
- Specify the number of charging stations you want to find.
- View the closest charging stations highlighted on the map.
Contributing
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b feature-name
- Commit your changes:
git commit -m "Add feature description" - Push to your branch:
git push origin feature-name
- Open a pull request.
License
This project is licensed under the MIT License.
Acknowledgments
- LeafletJS for the mapping library.
- FastAPI for the high-performance back-end framework.
- PostgreSQL/PostGIS for spatial data processing.
- Toronto residents for inspiring the use case.
Feel free to reach out for questions, suggestions, or contributions!