This Car Rental App for learning purpose
- Interactive Map View: Utilize Google Maps to display available cars, allowing users to easily find nearby rental options.
- Car Booking: A straightforward booking process powered by a sleek UI designed with Ant Design.
- React for building the user interface.
- TypeScript for type-safe code.
- Ant Design (antd) for the UI components.
- Google Maps SDK for rendering maps and location-based services.
- Vite for efficient project bundling.
- Vitest and React Testing Libray for unit and integration testing.
- Node.js (v20 or later)
- npm/yarn
- Clone the repository:
git clone https://github.com/your-username/car-rental-app.git
cd car-rental-app
- Install dependencies:
npm install
# or
yarn install
- Set up environment variables
Use your own Google Maps API key into .env file, otherwise the when you run with preview command it won't work
- Start the development server:
npm run dev
# or
yarn dev
Open http://localhost:5173 to view the app in your browser.
If you prefer to use Docker, you can build and run the application using Docker commands.
- Build the Docker image:
npm run docker:build
# or
yarn docker:build
- Run the application in a Docker container:
npm run docker:run
# or
yarn docker:run
This command runs the Docker container, making the application accessible at http://localhost:8080
To run the tests, use the following command:
npm run test
# or
yarn test
To see the test result with comprehensive UI, use the following command:
npm run test:ui
# or
yarn test:ui
To build and deploy the project into your own server run the following command
npm run build
# or
yarn build