TrackMyBus is a web application designed to help users track bus schedules and information by entering the vehicle number. It fetches bus details from a live API and displays the data in an interactive and responsive UI.
- Fetch and display real-time bus data based on vehicle number.
- Responsive design for seamless use on various devices.
- Smooth and dynamic user interface.
- Next.js - React framework for server-side rendering and static site generation.
- TypeScript - Superset of JavaScript for type safety and improved development experience.
To run this project locally, follow these steps:
- Clone the repository:
git clone https://github.com/your-username/TrackMyBus.git
- Navigate to the project directory:
cd TrackMyBus
- Install the dependencies:
npm install
- Run the development server
npm run dev
When deploying this application, ensure that the file paths are correctly referenced, especially if you're deploying to a subdirectory. You may need to update the base option in vite.config.js.
To build the project for production:
npm run build
You can then deploy the contents of the dist/ directory to your hosting service.
- Enter the vehicle number in the input field and click Go.
- The app fetches data from the API and displays it, including the bus number, trip details, and station schedules.
The app fetches bus data using the following API:
https://busapi.amithv.xyz/api/v1/search?vehicle_number={busNumber}
https://trackmybus.abinthomas.dev/
Contributions are welcome! Feel free to open a pull request or report issues.