{"id":26085236,"url":"https://github.com/sameer266/bus_ticket_booking","last_synced_at":"2025-08-23T04:12:55.414Z","repository":{"id":281354633,"uuid":"945026288","full_name":"sameer266/bus_ticket_booking","owner":"sameer266","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-08T13:47:42.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-08T14:27:51.095Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sameer266.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-08T13:43:10.000Z","updated_at":"2025-03-08T13:47:45.000Z","dependencies_parsed_at":"2025-03-08T14:38:42.431Z","dependency_job_id":null,"html_url":"https://github.com/sameer266/bus_ticket_booking","commit_stats":null,"previous_names":["sameer266/bus_ticket_booking"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sameer266/bus_ticket_booking","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameer266%2Fbus_ticket_booking","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameer266%2Fbus_ticket_booking/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameer266%2Fbus_ticket_booking/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameer266%2Fbus_ticket_booking/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sameer266","download_url":"https://codeload.github.com/sameer266/bus_ticket_booking/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sameer266%2Fbus_ticket_booking/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271740731,"owners_count":24812642,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-09T05:57:54.576Z","updated_at":"2025-08-23T04:12:55.231Z","avatar_url":"https://github.com/sameer266.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n# Bus Seat Booking System\n\nA bus seat booking system built using Django, designed to allow bus operators to manage their buses, routes, and schedules while enabling customers to book seats on buses.\n\n## Features\n\n- **Bus Management**: Bus operators can manage buses, including bus types, routes, seat availability, and more.\n- **Schedule Management**: Create and manage bus schedules, including departure/arrival times and ticket pricing.\n- **Bus Admins**: Automatically assign bus admins when a schedule is created, ensuring efficient management of the system.\n- **User Authentication**: Different user roles such as bus admins, customers, and staff.\n- **Seat Booking**: Customers can select a seat and book tickets based on their required bus route and schedule.\n- **Dynamic Pricing**: Set ticket prices for different schedules.\n- **Data Validation**: Ensure integrity in the database, such as preventing available seats from exceeding total seats.\n\n## Tech Stack\n\n- **Backend**: Django, Python\n- **Frontend**: HTML, CSS, JavaScript ,React js\n- **Database**: SQLite (or other supported databases in Django)\n- **User Authentication**: Custom user model with roles (admin, bus_admin, customer, etc.)\n\n## Installation\n\n### Prerequisites\n\n- Python 3.8 or higher\n- pip (Python package manager)\n\n### 1. Clone the Repository\n\n```bash\ngit clone https://github.com/sameer266/bus_ticket_booking/\ncd bus-_booking\n```\n\n### 2. Install Dependencies\n\n```bash\npip install -r requirements.txt\n```\n\n### 3. Set Up Database\n\nRun the following command to apply migrations and set up the database schema:\n\n```bash\npython manage.py migrate\n```\n\n### 4. Create Superuser\n\nTo access the Django admin panel, create a superuser:\n\n```bash\npython manage.py createsuperuser\n```\n\nFollow the prompts to set up the superuser credentials.\n\n### 5. Run the Development Server\n\nNow you can start the Django development server:\n\n```bash\npython manage.py runserver\n```\n\nAccess the application in your browser at `http://127.0.0.1:8000/`.\n\n## Admin Panel\n\n- **Login**: Go to `http://127.0.0.1:8000/admin/` and log in using the superuser credentials you created.\n- **Manage Bus**: Add and manage buses, including bus types, seat availability, and assigned routes.\n- **Manage Schedule**: Create and manage bus schedules, assign bus admins automatically, and set ticket prices.\n- **Manage Users**: Create different users (Bus Admin, Customer) and assign them roles for access control.\n\n## Models\n\n### `Bus`\n- `bus_number`: The unique identifier for the bus (e.g., \"BA 1 KHA 1234\").\n- `bus_type`: Type of bus (e.g., \"Tourist Bus\", \"Deluxe Bus\").\n- `total_seats`: Total number of seats on the bus.\n- `available_seats`: Number of seats still available for booking.\n- `route`: The route assigned to this bus.\n- `is_active`: Whether the bus is active or inactive.\n- `is_running`: Indicates if the bus is currently running.\n\n### `BusAdmin`\n- `user`: The user assigned as a bus admin.\n- `bus`: The bus assigned to this bus admin.\n\n### `Route`\n- `source`: The starting point of the route.\n- `destination`: The ending point of the route.\n- `distance`: Distance in kilometers.\n- `estimated_time`: Estimated travel time.\n\n### `Schedule`\n- `bus`: The bus for the schedule.\n- `route`: The route assigned to the bus.\n- `departure_time`: Time when the bus departs.\n- `arrival_time`: Expected arrival time.\n- `date`: The date and time of the journey.\n- `price`: The ticket price for the schedule.\n- `bus_admin`: The bus admin assigned to manage this schedule.\n\n## User Roles\n\n- **Admin**: Full access to manage buses, routes, schedules, and users.\n- **Bus Admin**: Manages a specific bus and its associated schedule.\n- **Customer**: Can book tickets for available schedules.\n\n## Future Improvements\n\n- Add features for customer booking and payment processing.\n- Integrate a payment gateway for online ticket purchasing.\n- Allow bus operators to view customer bookings.\n- Provide email notifications for booking confirmations and schedule updates.\n- Improve the user interface with a frontend framework like React or Vue.js.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsameer266%2Fbus_ticket_booking","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsameer266%2Fbus_ticket_booking","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsameer266%2Fbus_ticket_booking/lists"}