dev-coffee-cli
v1.0.2
Published
A command-line tool for placing coffee orders and sending email confirmations.
Downloads
163
Maintainers
Readme
Dev-Coffee CLI ☕️
dev-coffee
is a command-line interface (CLI) tool for managing and placing coffee orders. Built with Node.js, Inquirer, Mongoose, and Nodemailer, it allows users to register, browse available coffee products, place orders, and receive order confirmation emails—all from the terminal.
Features
- User Registration: Register new users with their name, phone number, and email.
- Product Browsing: View a list of available coffee products with names and prices.
- Order Placement: Place orders directly through the CLI.
- Order Confirmation: Receive email confirmation of each order, including order details.
- Order History: View previous orders with timestamps.
Installation
To install dev-coffee
, ensure you have Node.js installed, then run:
npm install -g dev-coffee-cli
Usage
After installation, you can start using the dev-coffee
CLI by typing the following command:
dev-coffee
Follow the prompts to register, browse products, place orders, and view order history.
Commands
- Start CLI:
dev-coffee
- Launches the interactive CLI menu.
Dependencies
- chalk - For styled terminal output.
- cli-table3 - For displaying tables in the terminal.
- dotenv - For managing environment variables.
- inquirer - For creating interactive CLI prompts.
- mongoose - For database interactions.
- nodemailer - For sending email notifications.
Example Usage
Register a New User
dev-coffee
Follow the prompt to enter your name, phone number, and email.
Browse Available Products
- Choose "Browse Products" from the menu to view the coffee options.
Place an Order
- Choose "Place Order" and select the product and quantity. The order will be saved, and a confirmation email will be sent to you.
View Orders
- Choose "View Orders" to see your previous orders.
Development
To work on this project locally:
Clone the repository:
git clone https://github.com/your-username/dev-coffee-cli.git cd dev-coffee-cli
Install dependencies:
npm install
Run the CLI:
node index.js
Contributing
Contributions are welcome! If you have suggestions, improvements, or bug fixes, please open an issue or submit a pull request.
License
This project is licensed under the MIT License.
Contact
For questions or support, please contact mohammad arshad.
This README provides a solid foundation. Replace placeholders like your-username
in the GitHub link and [email protected]
with your actual details, and adjust as needed for your package!