Skip to content
Submitted 8 days ago

Fx_Checker | Tanstack Start

tanstack-query, tailwind-css, tanstack-router, zustand, vitest
LVL 4
Jo89 😈•1,420
@AhmadYousif89
A solution to the Foreign exchange currency converter challenge

Solution retrospective


What are you most proud of, and what would you do differently next time?

I think I did a decent job developing a pretty nice app with some lite features like adding a theme switcher and keyboard shortcuts, through more advance features such as integrating the Twelve data api for fetching Intraday OHCL datasets with various data intervals for creating more rich and sleek history charts.

What challenges did you encounter, and how did you overcome them?

the biggest challenges came the moment I decide that we need to display a rich history chart for all time ranges, and the frankfurter api was not going to cut it for this job because the api returns a EOD data points which is not enough for the 1D and 1W time ranges, so I needed to find another api that can provide us with intraday datasets with OHCL values and after a quick research I found out that Tweleve data provides free tiers with some decent credits to work with.

however, the free tier was not perfect as it came with big limitations, limitations like having to deal with only 8 requests per mins, which is gonna get hit the moment we go production! so I had to implement some caching system with a rate limiter module to handle the situation as best as we can.

Now I need to orchestrate between 2 external APIs, therefor, the frank's api get to handle the 1M ~ 5Y time ranges because these ranges don't benefits much from having intraday points the EOD is sufficient and also we needed to left the load off the tweleve api free tier limits. so tweleve api gets to handle only the 1D and 1W ranges - the ranges that actually needs the OHCL points.

The history section where the chart lives is probably the most complicated piece in the app. it was gradually getting bigger and bigger so it was constantly getting refactors and changes.

What specific areas of your project would you like help with?

I hope you like it 🤗

Code
Loading...

Please log in to post a comment

Log in

Community feedback

No feedback yet. Be the first to give feedback on Jo89 😈’s solution.

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord