Brewstation is a Python terminal coffee simulator program, which runs in a mock terminal on Heroku.
Users can perform various actions like buy, fill or check machine status. The program displays some ASCII art and shows a coffee animation. The program is inspired by the Jetbrains Python Academy.
Live version: https://brewstation-4e76688e07ae.herokuapp.com/
Python is a new language for me and I wanted to make a program that would help me be comfortable using Python programming concepts. As a big fan of coffee, animations and emoji, I decided to build a coffee machine with some ASCII art. I had build the same project in Kotlin, and decided to make it it in Python as well.
The project has no prospective client, it is built purely for fun, engagement and learning purposes
- I want to be able to understand the purpose of the program
- I want to able to make a choice from the displayed menu
- I want to able to see coffee machine stats
- I want to able to see coffee logo and animation
- I want to able to quit the program
- Engage with a simple terminal program that is fun and easy to operate
- Create an easy to operate, and interactive terminal program
- Add visually appealing features
- Add a fortune cookie option to engage the user
- Give an option to withdraw virtual money and exit
The flowchart for the coffee machine simulator is as below:
It took a bit of time to finalise the structure, flow and design of the coffee machine simulator. I was still confused whether this would need a class model implementation or not. I got confirmation from my mentor, as this is one machine and I wont be creating multiple objects for it, it is fine to create it without a class.
The menu flow was kept the same as advised in the project by Jetbrains Academy, but more colors, emojis, friendly messages, ASCII art was added to make it more engaging and fun.
ChatGPT was used for coffee animations. For text colors, Rich Text library was used. Coffee ASCII art is taken from https://ascii.co.uk/art/coffee with my own minor additions.
A welcome screen with ASCII art and predefined menu is displayed.
Entering buy coffee displays options to buy or go back to main meny again.
- If enough resources, coffee animation and a success displayed.
- If not enough resources, a message specifying the resource is displayed.
Entering take gives away collected money and money is updated.
Entering Remaining display machine ingredients status on that moment.
Entering fill display machine stats and specify machine capacity and ask for amount of each ingredient
- Error Handling on Incorrect Action Input
- Error Handling on Incorrect coffee menu input
- Error Handling on Incorrect value input
-Error Handling on Exceeding Ingredient Amount
- Allow user to fill the specified insufficient ingredient.
- Loop back through the fill ingredients menu, after an invalid entry.
- Allow user to set machine ingredients when the machine is started.
- Add a fortune cookie message along with a coffee animation
Testing details can be found in testing.md
- HTML - For layout of the terminal
- CSS - For background and flex display of the mock terminal
- Python - Main language for the terminal program
- Draw.io - Used to create flowchart for the coffee machine
- Gitpod - Used to code the project and save to online repo
- Github - For version control
- Code Institute Python Linter - For python code validation
- Heroku - For terminal deployment
This project was deployed using Code Institute's mock terminal for Heroku.
- Create an account on Heroku.
- Navigate to Heroku Dashboard and "Create a New App".
- Input App name and choose a region you are closer to.
- Select "Settings" from the table, and search for "Buildpack"
- Add "python" and "nodejs" from the list, in that order.
- Go to Deploy section, connect to GitHub.
- Seach for the repository name to connect.
- Click on Deploy Branch or enable Automatic Deploy.
- Allow a few minutes and view the deployed program.
- Stack Overflow - For correcting invalid excape sequence warning
- Jetbrains Python Academy - For inspiration on Coffee Machine project
- Typing Hints - For python typing hints
- Geeks for Geeks - Unicodes to print emojis
- ascii art - For Coffee ASCII Art
- PythonGPT - For Coffee animation code
- Code Institute for Python essentials and Love Sandwiches project
- Spencer Barriball - For his guidance and review on the project
- Code Institute Slack Community - For feedback, reviews and community support.












