A simple movie ticketing application that displays a list of films, their details, and allows users to buy tickets for available films.
- View a list of available films.
- Display film details including description, runtime, showtime, and poster.
- Mark films as "Sold Out" when tickets are no longer available.
- Buy tickets for films that are not sold out.
- Real-time updates to ticket availability.
- HTML: Structure of the webpage.
- CSS: Styling for the app layout and user interface.
- JavaScript: Client-side functionality, including fetching data, rendering films, and handling ticket purchases.
- JSON Server: Mock server to simulate an API for film data.
Ensure the following are installed before running the application,
- Node.js: Download and Install Node.js
- JSON Server: Installation Guide
Follow these steps to set up the project locally:
git clone https://github.com/your-username/film-ticket-booking-app.gitcd film-ticket-booking-appYou will need to install JSON Server globally to run the mock API:
npm install -g json-serverYou can either create your own db.json file or use the one provided in the repository.
The db.json file contains mock data about films, including titles, posters, descriptions, showtimes,
capacities, and tickets sold.
Run the following command to start the JSON Server on localhost:3000:
json-server --watch db.json --port 3000Once the server is running, open the index.htmlfile in your browser to view the app.
The app will fetch the list of films from the mock API and display the details.
Feel free to fork the repository.Contributions are always welcome!
This project is licensed under the MIT License