Nuances of building an AI/ML Roadmap Tracker using Google Gemini’s Canvas

What you will see at the end of this blog ?

But to reach the end, you need to start somewhere right ?

This weekend I was inspired by looking at value add done by creators of https://roadmap.sh/. For those who don’t know about this website, it’s a highly popular website which gives your tailored roadmap for almost all technical topics.

However, this website is very high level and I was looking for a tracker which can fit my roadmap and have a week-wise, day-wise and phase-wise tracking.

Since the rise of AI coding apps, I decided to give Gemini’s Canvas feature a try and started giving prompts to it a general set of requirements. I already had a PDF of AI-ML roadmap tracking generated again using ChatGPT.

This the first prompt I gave:

What happens next, is surprised me, that Gemini was able to come up with a full-fledged application within minutes with a clear bisection of code and preview.

The code can be copied locally on your system and can be served on localhost.

As a developer myself, I was able to notice a few details missing. My document had links with learning for each day which was missing on the first iteration. Notes and Quick notes field was overflowing. The next prompt I gave:

Canvas started working again and generated a preview. To refine the app further, I gave the next prompt:

Next, Canvas started working again and generated a preview but this time the Links got removed. The following prompt fixed this:

Now the app was looking really good.

Next I asked Gemini:

Gemini’s response was a set of instructions on how to setup Firebase and run on NodeJS locally

The full steps are documented here: https://github.com/abhinav1592/AI-ML-Roadmap-Tracker

When I followed the steps, I got few of the following errors:

This __app_id is actually the app-id of Firebase project and and needs to be assigned manually. In later iterations of code, Gemini was able to fix this with following code:

// Determine appId: prioritize Canvas global if available, otherwise use
// localFirebaseConfig or a default
      const currentAppId = typeof window !== 'undefined' && typeof window.__app_id !== 'undefined' ? window.__app_id : firebaseConfig.appId || 'default-local-app-id';
      setAppId(currentAppId);

At each stage, Gemini was able to show the thinking after each prompt I generated and then showed reasoning behind those decisions.

Next when the app complied, on localhost, the output is looking like plain HTML page, without any beautiful rendering. This is what took most time to fix.

The problem got attributed to a package used for CSS tailwindcss. The instructions provided by Gemini and even I looked up online were:

npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p

However, the install of tailwindcss did not work as expected on my local Linux machine, it seemed that that the package is there but npx tailwindcss init -p is not able to find it.

This started a cat and mouse journey between myself and Gemini to resolve this. Sometime it suggested to clean the rpm cache and re-do the install.

Another time it suggested me to do following:

I even consulted ChatGPT for this and the result was the suggest of above two steps.

Then I decided to ask Gemini to build this app without tailwindcss package. I was surprised by the push back received from Gemini telling to me to convince me to fix the issue itself.

I actually got convinced and tried to do things one more time and when I was unable to figure out how to get away with tailwindcss, I entered the next prompt:

This time it created an App.css file and added css code there, provided me that file and refactored the existing code in App.js

The next error I got with the latest version of NodeJS was following:

This where Gemini suggested following:

The application started successfully.

Now comes the actual functionality of the app itself, whatever operation I am doing the on web app, should by default persist in the database, it means if I am adding link to my notes or marking a section complete, it should not happen that if a user is restarting the server, the entire data is lost.

To resolve above problem, my next prompt was:

This is where Gemini suggested to ensure two things:

  1. FirebaseConfig is copied correctly from the https://console.firebase.google.com/ project
  2. [This I did not knew] Set Up Firestore Security Rules

What needs to be done here is, we must go to “Firestore Database”, configure and in the Rules section add the following content and publish it:

Then Gemini went ahead and explained how the Firebase database works, that whatever you enter in the text box, even a letter leads to POST call to Firebase so that the data can persist.

The next hiccup came, that even after setting the above rules, app was not persisting the data, next Gemini suggested to allow “Anonymous” sign in Firebase Authentication.

Next, I thought of adding a Google Sign-On page:

Gemini refactored the code again and suggested me to enable Google SignOn Authentication from Firebase. Still after reloading the app, sign-on page was not coming and there few errors in NodeJS terminal. I gave again following prompt:

After the Sign On page started working, I asked Gemini to add Sign Out button as well and the final app looked what you have already seen in the start of this blogs. Entire project along with source code can be found here: https://github.com/abhinav1592/AI-ML-Roadmap-Tracker

Features of the app:

  1. Google Sign-In: Securely authenticate users using their Google accounts.
  2. Progress Tracking: Mark individual daily tasks and projects as complete.
  3. Real-time Updates: Progress is saved and updated in real-time using Firestore.
  4. Overall & Phase Progress: Visual progress bars for individual phases and the entire roadmap.
  5. Notes & Work Links: Add custom notes and links to your completed work/projects.
  6. Daily Reminders: A modal reminder to encourage consistent study.
  7. Plain CSS: Styled with simple, maintainable CSS (no complex frameworks).

Technologies used:

  1. React.js: Frontend library for building the user interface.
  2. Firebase:
    • Authentication: For user sign-in (Google Provider).
  3. Firestore:
    • NoSQL cloud database for storing user progress.
  4. Plain CSS: For all styling.
  5. NodeJS for local deployment

Learnings:

  1. NPM packages do not necessarily play well along with each other, having a set of working packages which are not breaking your UI is a hard challenge.
  2. Prompting can cut down your development time, but you still need to be very clear on what needs to be built or how should it evolve.
  3. Even with AI assistance, a solid understanding of core technologies (React, JavaScript, CSS, Firebase concepts) is essential for effective debugging, customization, and informed decision-making.
  4. Utilizing Firebase is also an option for end to end project. They even have a studio which I have not explored.
  5. Software development is an iterative process, involving continuous refinement, debugging, and feature addition (e.g., adding a sign-out button, daily reminders).

Leave a Reply

Your email address will not be published. Required fields are marked *