Mind the Gap — a CLI app using the TFL API — Part 1
A brief intro about the project that I worked on for the end of Module 1 at FlatIron School. This post is mainly about the planning. I’ll write about the (very unrefactored) code in the next post.
If you had told me while I was struggling through iterating through hashes whilst I was doing the prep work for FlatIron school, that I would create a CLI project using the TFL API and rely heavily on hashes — I would’ve laughed. Or maybe cried…
I wanted to use an API for the project because it would be a fun learning experience & at my last job my team had used the TFL API to figure out which tube stations were closed or had delays. So I decided to give it a shot.
It helps to have been a Product Manager
My previous experience in the tech industry meant that the first thing I wanted to do before we wrote any code was to figure out what the MVP would be, followed by version 2 and finally stretch goals. My team mate, Mayowa, and I agreed on the following goals for MVP, Version 2, Stretch Goals & Super Stretch Goals:
MVP
Creating the classes, relationships and the methods to answer the following questions, with dummy seeded data:
- What stations are on a Tube Line?
- What lines does a Tube Station belong to?
- What Tube Stations have the most Lines?
- What Tube Stations have have least Lines?
- What Tube Lines have the most Stations?
- What Tube Lines have the least stations?
Version 2:
- Get real data from the TFL API
- Populate tables with this real data
- Perform Validation
- Make the CLI look clean & ✨ ✨sparkly.
- Show line colours in CLI.
Stretch Goal(s):
- Get Live Service data from TFL API to show disruptions⚠️.
- Use emojis 😎in the 🌟 CLI (obviously!)
Super Stretchy Goals:
- Incorporate DLR and Overground data. 🚧
- Clean up the code. 😱 😭 🚧
All of this in Trello:
Final App Preview:
Read about the MVP here.