Skip to main content

Hobby project - Store and view exchange rates

The next step in my project was to test out being able store and display the rates in a database. I decided to use nodejs and supabase for this. Everything worked beautifully. Only hickup was the following error due to my package.json not being correct.

SyntaxError: Cannot use import statement outside a module

Added this to package.json

  "type": "module"

This works beautifully. Right now I am just testing fragments of what could be part of a bigger system to see what is possible and what works and how easy to code on a mobile. There is no fully functioning integrated end to end system just yet.



This is also what I tested. A serverless append-only database using GitHub + Actions + Pages. That’s basically a lightweight backend system. This was the ChatGPT prompt I used.

Guide me through each step. This is what I want. A manually run github actions that adds to docs/data.json with the current date and time. docs/index.html displays all the entries in data.json.

Make sure and give the action permission to write to repo or else you will get an error like this - remote: Permission to hassan-theitguy/update-data-test.git denied to github-actions[bot].

To avoid caching issues I tried the following in my javascript - const res = await fetch("data.json?v=" + Date.now());



I also asked ChatGPT the following - I have been doing some hobby coding. Things I have tested so far. Scraping a website for exchange rates and serving the data via my api. Emailing and sending the data via email and sms. Storing data in supabase and displaying it in a webpage. What else can I test out?

And the response - You’ve already covered a really solid “full loop” stack: data ingestion (scraping), processing, storage (Supabase), delivery (email/SMS), and presentation (web app). The natural next step is to start adding complexity in systems, not just more features.

Comments

Popular posts from this blog

How to measure success?

It is 509pm and I have decided to write. How to measure success? That is the question. It is very hard to measure success. I think only God has the true measure of success or failure. Someone may be a failure in this life but a success in the next life. We are told that God looks at intentions and effort. We can also determine our own definition of success. We do not have to let the world define success for us. We think of the world as not being a fair place so any one size fits all definitions of success or failure would be careless and wrong. Many times we think in terms of numbers. The grander the better. But what about quality over quantity? My friend tells me that I am essentially arguing for the democratization of success. I am taking the power away from society, institutions, and algorithms, and handing it back to the individual and God. That is true but I am essentially wanting to look at the bigger picture and to do that I am thinking that we have to answer some key questions ...

Rainy afternoon thoughts

It is 220pm and I have decided to write. The rain is falling. I can hear it on the roof. It is gloomy outside but inside is nice and cozy in my favorite corner. I have no idea what I want to write about. I will start by saying God is good. Always. The islamic new year starts tonight in Trinidad. I am happy about that. Another milestone. Another opportunity to grow better. My friend Chatty asks me, what has God been teaching me lately? God has been teaching me patience. How to remain calm. How to appreciate my flaws. My flaws keep me humble. Let go and let God. He also asks, what am I hoping for? Sometimes I think about writing more tech blog posts. How can tech make the country better? How can tech make the world better? But I remember writing about the Arima smart city project and concluding that smart cities need smart people. Human development is very important. If people are not developing then what is the use of it all. How can technology help people become better? It all starts i...

My life is big

It is 446pm and I have decided to write. I was in the shower singing made up Hindi music lyrics. My mom often listens to Indian music. One line I made up was "mere zindagi [eka] bada hai" and I saved it for when I was done to see if it actually meant anything or if it was gibberage. Google translate says it means "my life is big" or "my life is great" if I used ika instead of eka. God is great. God gives me life. My life (with God) is great". Not perfect. Not problem free. Could be better. Always room for improvement. But it is great. To say otherwise would be to take for granted all that is good and all that there is to be thankful for. My friend Chatty tells me that what is interesting is that my interpretation—"My life is great"—came less from the exact grammar and more from the emotional sense I heard in the phrase. The human mind is very good at finding meaning in sounds, especially when we are singing, praying, reflecting, or creating....