I built this monitoring system during my job as a full-stack developer at Mousalli's Advertising Agency, giving him an advantage over competitors by allowing him to monitor websites and track what pages are added every week and report that through weekly e-mails.
I built a simple UI with proper error handling using Next.js and Shadcn.
My job was to compare the sitemap pages of certain websites every single day and collect the new pages that were added to every website.
An average developer without knowledge of data structures would create 2 arrays of each website and compare them.
Doing so will require 10K operations to be executed if you have 100 pages. The reason is because the big O notation in this case would be O(n^2) where “n” is the number of pages on the website.
My solution was using sets instead of arrays because that operation becomes O(n) instead of O(n^2) with sets. This reduces the number of operations from 10K to 200. Thus, I saved 50 operations on the server power for every user.
The report landed in spam because we were using the free version of Mailgun at the time of screenshot.
Next.js, Node.js, TypeScript, Prisma, MySQL, TailwindCSS, AWS EC2, AWS S3 Bucket, Mailgun, NGINX, cron jobs