An automated system that checks KSRTC (Kerala State Road Transport Corporation) bus seat availability every 5 minutes and sends email notifications when seats become available for your desired route.
The frontend code for this project is available at: KSRTC Bus Alerts Frontend
- 🔄 Automated checks every 5 minutes using GitHub Actions
- 📧 Email notifications when seats are available
- ⏰ Time range preference for bus departures
- 🎯 Route-specific alerts
- 🗑️ Auto-deletion of alerts once notified
- Node.js
- TypeScript
- Express.js
- MongoDB
- GitHub Actions
- Nodemailer
- AWS Lambda (Serverless)
Create a .env
file in the root directory with the following variables:
MONGO_URI=your_mongodb_connection_string
EMAIL=your_gmail_address
PASSWORD=your_gmail_app_password
- Clone the repository:
git clone https://github.com/yourusername/ksrtc-bus-alerts.git
cd ksrtc-bus-alerts
- Install dependencies:
npm install
- Start the development server:
npm run dev
POST /alerts
Request body:
{
"email": "user@example.com",
"searchUrl": "https://onlineksrtcswift.com/search?fromCity=298|Bangalore&toCity=472|Iritty&departDate=28-03-2025",
"timeRangeStart": "06:00",
"timeRangeEnd": "23:00"
}
The project uses GitHub Actions to run checks every 5 minutes. The workflow:
- Checks out the code
- Sets up Node.js
- Installs dependencies
- Runs the seat availability checker
- Sends email notifications if seats are available
The application is deployed on AWS Lambda using the Serverless Framework. To deploy:
serverless deploy
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the ISC License.
For support, email aswanth682@gmail.com or open an issue in the repository.