Skip to content

This Go CLI Ticket Generator is a robust and efficient application designed to streamline the process of booking and managing event tickets. This tool provides an easy-to-use interface for users to input their details and receive their event tickets promptly via email.

Notifications You must be signed in to change notification settings

KunalKumar-1/ticket-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

Booking-App-CLI

The Go CLI (Command-Line Interface) Ticket Generator is a robust and efficient application designed to streamline the process of booking and managing event tickets. This tool provides an easy-to-use interface for users to input their details and receive their event tickets promptly via email.

Key Feature

1. User Input Collection:

Name: Collects the full name of the user.

  • Email: Gathers the user's email address to send the ticket.
  • Number of Tickets: Captures the quantity of tickets the user wants to purchase.
  • Event Date: Records the date of the event for which the tickets are being booked.

2. Unique Ticket ID Generation:

Each ticket is assigned a unique identifier to ensure proper tracking and validation.

  • Ticket Creation: The application processes the inputs to generate a digital ticket containing all the necessary details, including the unique ticket ID.

3. Email Notification:

Automated Email Sending: Once the ticket is generated, the application automatically sends an email to the provided address. This email contains the ticket with all relevant details and the unique ticket ID

Technical Overview:

  • Programming Language: The application is built using Go, known for its simplicity, performance, and concurrency capabilities, making it ideal for handling input/output operations and email notifications efficiently.
  • Input Handling: Utilizes Go’s flag package to parse command-line arguments, ensuring a seamless user experience.
  • Unique ID Generation: Implements a UUID generation library to create unique ticket identifiers.
  • Email Sending: Integrates with an SMTP library to handle email delivery, ensuring the tickets reach the users promptly and reliably.

Documentation

check out Go Documentation for GO: Documentation

Setting up Locally

To clone this project run

git clone https://github.com/KunalKumar-1/ticket-cli

Run Locally

Go to the project directory

cd ticket-cli

Initialise Go module(if needed)

In case if you need to create the go Module

go mod init
  • And change the file directry of main file to the directry of the main file in import "main.go file/helper"(if not changed leave it as it is)

Import dependencies

  • Type the following commands in your terminal to import dependencies.

For setting up go env.

go get github.com/joho/godotenv

For setting up figlet4go.

go get github.com/mbndr/figlet4go

make some changes here:

  • open .env file and change the mail_pass ,enter the generated password of Your email.
  • insendMIals() function change the [email protected] to your real UserId from which mails are goona be sent.
  • To cahnge the (event name) Change conferenceName to your desired name.

Run the project

go run . | lolcat

Optimization

  • Batch Processing.
  • Input Validation.
  • Goroutines and Channels.
  • Worker Pools.

"struct" which provides basic syncronization , WaitGroup, used various Goroutines to wait for(increase the counter by the provided number).

How it works ?

  1. Run the CLI Application: The user launches the application from the command line.
  2. Provide Necessary Details: The user inputs their name, email, number of tickets, and event date.
  3. Process and Generate Ticket: The application processes these details, generates a unique ticket ID, and creates the ticket.
  4. Send Email: The application sends the ticket to the user's email address.

Client: Go , ntp/smtp, godotenv ,figlet4go , linux

Screenshots

start App Screenshot genereates App Screenshot

Contributing

Contributions are always welcome!

See contributing.md for ways to get started.

Please adhere to this project's code of conduct.

About

This Go CLI Ticket Generator is a robust and efficient application designed to streamline the process of booking and managing event tickets. This tool provides an easy-to-use interface for users to input their details and receive their event tickets promptly via email.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages