{"id":23350566,"url":"https://github.com/mu-senpai/p-ticket","last_synced_at":"2026-04-29T19:33:37.612Z","repository":{"id":267532531,"uuid":"860920214","full_name":"mu-senpai/p-ticket","owner":"mu-senpai","description":"A responsive front-end for online ticketing system based on vanilla JavaScript and basic DOM manipulation.","archived":false,"fork":false,"pushed_at":"2024-12-10T21:44:44.000Z","size":786,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-17T09:07:02.607Z","etag":null,"topics":["daisyui","documentobjectmodel","javascript","tailwindcss"],"latest_commit_sha":null,"homepage":"https://p-ticket-web.netlify.app/","language":"HTML","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/mu-senpai.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":"2024-09-21T14:18:58.000Z","updated_at":"2025-01-08T05:02:03.000Z","dependencies_parsed_at":"2024-12-10T22:28:00.838Z","dependency_job_id":"6ac3eedd-62e4-4fa9-ab99-d561da58b60c","html_url":"https://github.com/mu-senpai/p-ticket","commit_stats":null,"previous_names":["mu-senpai/p-ticket"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mu-senpai/p-ticket","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mu-senpai%2Fp-ticket","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mu-senpai%2Fp-ticket/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mu-senpai%2Fp-ticket/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mu-senpai%2Fp-ticket/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mu-senpai","download_url":"https://codeload.github.com/mu-senpai/p-ticket/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mu-senpai%2Fp-ticket/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32441164,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T18:12:22.909Z","status":"ssl_error","status_checked_at":"2026-04-29T18:11:33.322Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["daisyui","documentobjectmodel","javascript","tailwindcss"],"created_at":"2024-12-21T08:16:58.017Z","updated_at":"2026-04-29T19:33:37.597Z","avatar_url":"https://github.com/mu-senpai.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# P-Ticket\n\nP-Ticket is an interactive web-based application for bus ticket booking. This platform enables users to select their desired seats, apply discount coupons, and make a reservation conveniently. The project leverages modern frontend technologies to deliver an intuitive and responsive user interface.\n\n## Features\n\n- **Responsive Design**: The layout is optimized for desktop, tablet, and mobile devices.\n- **Seat Selection**: Users can select up to 4 seats per booking.\n- **Coupon Application**: Offers coupon codes for discounts (e.g., `NEW15` for 15% off and `COUP20` for 20% off).\n- **Dynamic Updates**: Real-time updates for seat availability and pricing.\n- **Success Dialog**: Displays a confirmation modal after successful booking.\n\n## Technologies Used\n\n- **HTML5**: For structuring the web pages.\n- **CSS (Tailwind CSS \u0026 DaisyUI)**: For styling and responsive design.\n- **JavaScript**: For interactivity and dynamic updates.\n- **FontAwesome**: For icons and visuals.\n- **Google Fonts**: For typography.\n\n## File Structure\n\n- `index.html`: Contains the structure of the website, including the navbar, banner, and main content.\n- `js/seatSelect.js`: Handles seat selection logic and updates the UI dynamically.\n- `js/applyCoupon.js`: Manages the coupon application process and adjusts the total price accordingly.\n- `js/nextButton.js`: Validates passenger details and triggers booking confirmation.\n\n## Setup Instructions\n\n1. **Clone the repository**:\n    ```bash\n    git clone \u003crepository-url\u003e\n    ```\n\n2. **Navigate to the project directory**:\n    ```bash\n    cd p-ticket\n    ```\n\n3. **Open the project in a browser**:\n    Open `index.html` in your preferred web browser to view the application.\n\n## Usage\n\n1. Open the `index.html` file in a browser.\n2. Select your desired seats (up to 4 seats allowed per booking).\n3. Enter a valid coupon code (e.g., `NEW15` or `COUP20`) and click \"Apply\" to get a discount.\n4. Enter passenger details and click the \"Next\" button to confirm your booking.\n5. A success modal will appear upon successful booking.\n\n## Code Overview\n\n### Seat Selection (`seatSelect.js`)\n- Users can toggle seat selection.\n- Updates total seats selected, remaining seats, and price dynamically.\n- Limits the selection to a maximum of 4 seats.\n\n### Coupon Application (`applyCoupon.js`)\n- Users can apply discount coupons.\n- Supported coupons:\n  - `NEW15`: 15% discount.\n  - `COUP20`: 20% discount.\n- Displays an alert for invalid or empty coupons.\n- Ensures that at least one seat is selected before applying a coupon.\n\n### Passenger Validation and Confirmation (`nextButton.js`)\n- Validates passenger name and phone number inputs.\n  - Ensures the passenger name does not contain numeric characters.\n  - Requires a minimum of 11 digits for the phone number.\n- Checks if at least one seat is booked before proceeding.\n- Displays a confirmation modal on successful validation and booking.\n- Resets the page upon confirmation closure.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmu-senpai%2Fp-ticket","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmu-senpai%2Fp-ticket","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmu-senpai%2Fp-ticket/lists"}