Within the past few years, the world has been plagued by supply chain issues, resulting in shortages of items ranging from simple fertilizers to the semiconductors needed to power motor vehicles. One of the biggest bottlenecks in any supply chain is the logistics of getting an item shipped from A to B. This is also the weakest link in the process, as shown by examples like the global shipping delays that happened as a result of the Ever Given ship stuck in the Suez Canal. The fallout of the event includes the loss of nearly $60 billion in global trade revenue. To tackle this issue, we made ZipShip, an application designed to turn shipping into less of a bottleneck, so products can be shipped for cheaper and faster.
What it does ⚙️
ZipShip is a Discord bot that allows users to input what kind of package they are shipping, it's origin information, and it's destination. The bot will then run all the information through the Shippo API and return a list of available shipping providers. It will list the prices for each option, as well as delivery times and suggest which service to use based on how much you want to spend or how fast you want it to be delivered. The bot is designed for enterprise use, for companies big or small, to arrange their products to be shipped as fast as possible with ease without worrying about which different carriers to use for networks of international customers and how much it'll cost.
How we built it 🛠️
We initially built a small program to test the Shippo API and find out it's JSON response. Afterwards, we started building a frontend and backend. When a user runs the bot and adds all their information, it is processed and sent to the backend via a Flask server. The backend formats the data as JSON and sends it to Shippo. The result is a list of possible shipping companies and their cost/shipping time, which is then formatted and sent back as a embed. We went with a Discord bot instead of a conventional website as most of our team members didn't know web development, but we designed the backend to be inter-changeable, so it can be used with different frontends, like a website or an mobile app.
Challenges we ran into ⛈️
- We initially wanted our bot to be written in Python, but had to switch to JS as a result of interactions being broken
- Fedex and DHL didn't have working APIs, so we had to resort to a 3rd-party via Shippo
- We had lots of issues surrounding setting up modal forms for user input, leading us to switch to embeds and waste time in the process
Accomplishments that we're proud of 🎉
Despite all our struggles, we still managed to (hopefully) submit on time, and it's amazing that all our code worked together, considering how many people were working on the same things at once. We also managed to make Shippo work properly and learn its API format, without previous experience with it at all. No one in our team has worked on anything related to supply chains or shipping either, so we're very proud of how we were able to pivot to this area. While not very important, we're also proud of how our logo turned out, which was beautifully made using the DALL-E 2 AI.
What we learned 🧠
We learned how to use the discord.js platform, and the flask web server. We also learned a lot about using APIs and local web servers, for connecting to Shippo and for passing data between the frontend and backend via Flask.
What's next for ZipShip ⏩
We hope to expand ZipShip into a proper website, instead of a simple Discord bot. We also hope to use individual APIs from each courier instead of relying on a single one. We'd like to implement machine learning into our program, so that instead of relying on API's, it'll also figure out calculations on it's own and calculate other factors aside from price and shipping time, like security (chances of package being damaged) and reliability (will the package get lost/misplaced in transit). We'd also like to add a function to allow users to directly place orders after choosing which courier they want to go with.
Thanks to the people who run TriHacks, we had a blast and hope everyone else did too!