Urban Drive is a rental car website that allows users to browse available vehicles, make bookings, and manage rental services. Built with React for the frontend, Flask for the backend, and Sqlite for the database, this platform streamlines car rentals with modern technology, offering a smooth and reliable experience.
- React: A JavaScript library for building dynamic user interfaces.
- CSS: Styling for all components, ensuring a clean and responsive design.
- Flask: A lightweight Python web framework for managing server-side requests and API development.
- SQLAlchemy: An ORM (Object Relational Mapper) used for database interactions.
- SQLite: A lightweight relational database for managing car, user, payment, and booking data.
Before setting up the project, ensure you have the following installed:
- Python 3.8+
- Node.js 14+
- npm (Node Package Manager)
- Flask -SQLITE3
- SQLAlchemy
Clone the Repository:
1.Go to the repository URL: git clone https://github.com/E-ugine/urban-drive.git 2.Copy the SSH URL. 3.In your terminal, navigate to your preferred directory and run: git clone
###Installing Dependencies:
1.Open the cloned repository: 2.cd server/ 3.Install required Python libraries using pip: $ pipenv install $ pipenv shell
##Seed Data: If needed, you can seed the database $ python seed.py
Run the Application: -run it at port 5555. to set this if not yet set, after seeding your database,in the terminal run export FLASK_RUN_PORT=5555
##Start the Flask API: flask run/ python app.py ```
- Navigate to the frontend folder(client):
cd client
- Install the frontend dependencies:
npm install
- Start the React development server:
npm start
Once the servers are running, open your browser and go to http://localhost:4000
to access the Urban Drive platform. From here, you can:
- Browse available cars.
- Sign up and log in to make bookings.
- Use the admin panel to manage cars and bookings.
- GET /cars: Retrieve a list of available cars.
- POST /bookings: Create a new booking.
- GET /bookings: View all bookings for a user.
- PUT /admin/cars/:id: Update car details (Admin).
- DELETE /admin/cars/:id: Remove a car from the list (Admin).
- App: The main component that holds routing.
- NavBar: Displays navigation links.
- CarList: Lists all available cars.
- CarDetails: Displays details of a specific car.
- BookingForm: Handles booking creation.
- AdminPanel: Manages car listings and bookings.
If you encounter any issues, please feel free to open an issue on the GitHub repository. For direct inquiries, you can contact the development team at agollaeugine@gmail.com
.
Here are some future plans for Urban Drive:
- ****: Enhance the user interface with advanced search options and visual improvements.
- ****: Integrate payment gateways for online transactions.
Contributions are welcome! Here's how you can contribute:
- Fork the repository.
- Create a new feature branch:
git checkout -b feature/new-feature
- Commit your changes:
git commit -m "Add new feature"
- Push to the branch:
git push origin feature/new-feature
- Open a Pull Request.
Please ensure your code adheres to the style guidelines, and all tests pass before submitting.
Special thanks to all the Binary Brains group members who contributed to making the Urban-Drive website feasible:
- Eugine Owuor (Scrum master)
- Frankline Were
- Onesmus Odongo
- Roy Collins Nguithi
And special thanks to the following resources and tools:
- React Documentation: For comprehensive tutorials and guidelines.
- Flask Documentation: For providing excellent resources for building web applications.
- SQLAlchemy Documentation: For ORM integration.
This project is licensed under the MIT License. See the LICENSE file for more details.
Urban Drive is a scalable and efficient platform designed for managing car rentals. With further development, we aim to provide a full-featured application ready for production deployment. Thank you for checking out the project, and we hope to collaborate with you!