DEV Community

Ghala Hnad
Ghala Hnad

Posted on

How I Built a Cement Price Tracker Using HTML, CSS & JS (No Framework, No API)

In the construction industry, timing and budgeting are everything. But there's one surprisingly frustrating issue that affects millions of builders, contractors, and homeowners across countries like India and Pakistan — there’s no simple way to check updated cement prices online.

Yes, you read that right.

If you’ve ever tried to build a home or manage a construction project, you’ve probably noticed how cement prices vary wildly from region to region, and even between local dealers in the same city. You’ll find prices on WhatsApp, through word of mouth, or by calling up suppliers one by one — but rarely in a structured, updated, and trustworthy format.

This gave me an idea:

“What if I built a tool that simply tracked cement prices in one place — fast, clean, and easy to use?”

As someone with an interest in both technology and local business, I saw this as a chance to apply basic web development skills to solve a real-world, underserved problem.

So, I created a simple, beginner-friendly web app that displays cement price listings, lets you compare brands, and even calculate costs per bag, ton, or truckload — all using basic HTML, CSS, and JavaScript.

In this post, I’ll show you:

Why this problem needed solving

How I approached it with zero frameworks or APIs

What I learned while building it

And how even small tools can create real value for niche communities.

The Problem: Price Confusion in the Cement Market

When people think of construction challenges, they imagine material shortages, labor issues, or design changes. But few realize one of the most basic and ongoing problems is simply this:

“What is the actual price of cement today — and is that price fair?”

In India, Pakistan, and many developing regions, cement prices are highly volatile. They can change weekly — sometimes even daily — depending on:

Brand (UltraTech, ACC, Dalmia, Ambuja, etc.)

Location (metro cities vs. rural districts)

Dealer margins and transport costs

Bulk purchase quantity

Yet there's no centralized system where a contractor or homeowner can quickly check accurate rates across different brands and regions.

Instead, people rely on:

Dealer calls and SMS messages

WhatsApp forwards and voice notes

Visiting hardware shops in person

Old websites with outdated info

This isn't just inconvenient — it’s costly.

A price difference of even ₹10–₹20 per 50kg bag can mean a loss of thousands of rupees over a full construction project. And for contractors or daily buyers, this lack of price visibility makes it harder to plan, negotiate, or budget correctly.

A Simple Tool Can Help
I realized that even a basic, transparent cement price listing website could solve this for thousands of people.
Not a big database. Not a full marketplace.
Just a clean, easy-to-use dashboard with regularly updated prices by brand and region.

That’s where it started — with a simple question:

“Why isn’t anyone doing this yet?”

The Solution I Built: A Simple, Frontend-Based Cement Price Tracker

Once I understood the pain point — that people simply couldn't find updated, reliable cement prices online — I decided to build something simple, clean, and useful.

The result?
👉 a lightweight web tool that helps users:

📌 Check the latest cement prices

🧱 Compare different brands

💰 Calculate the total cost based on quantity

💱 Convert prices with a currency selector

🛠️ Why I Chose a Frontend-Only Approach
As a beginner in web development, I didn't want to get lost in server-side code, APIs, or databases just yet. So I asked myself:

“What’s the simplest possible version of this tool that still delivers real value?”

I settled on using just:

HTML for structure

CSS for styling and layout

JavaScript for interactivity and calculations

No frameworks, no libraries, no backend.

🧪 Features I Implemented
Here’s what the site currently does (and how it helps):

✅ Manual Price Listings
Users can view manually updated cement prices for popular brands like UltraTech, Ambuja, ACC, Dalmia, and more.

💹 Total Cost Calculator
Enter the price per bag and quantity — the site instantly shows the total amount. Great for quick budgeting.

🌍 Currency Selector
Since construction costs are tracked in multiple currencies (especially by NRIs), I added a simple currency selector to convert costs.

📱 Mobile-Friendly UI
The layout is responsive and clean — accessible on mobile devices where most contractors do their browsing.

🎯 Focus on Simplicity, Not Perfection
I didn’t try to build a full-scale cement marketplace. I focused on solving just one problem well:
“Let users view and calculate cement prices quickly.”

The goal was usability, not complexity.

And to my surprise, early users — even non-tech people — appreciated the clarity and speed of the site. That alone validated the effort.

The Tech Stack (Beginner-Friendly)

One of the best parts of building website and especially Cement calculator was realizing that I didn’t need a complex tech stack to solve a real-world problem.

As a beginner, I stuck to just the basics — and they worked surprisingly well.

🧰 Tools I Used:

  • HTML – for the structure and layout of the website
  • CSS – for styling, spacing, fonts, and responsiveness
  • Vanilla JavaScript – for all the interactivity (calculations, dropdowns, updates)
  • No React. No Node.js. No backend framework.
  • Just pure frontend code, hosted on a static site.
    📦 Key Functionalities I Coded

  • Here are a few practical things I built using only JavaScript:
    ✅ Price Calculator
    Let users input cement price per bag and number of bags — then instantly calculate the total cost:

const price = document.getElementById("price").value;
const qty = document.getElementById("qty").value;
const total = price * qty;
document.getElementById("result").innerText = `Total Cost: ₹${total}`;

Enter fullscreen mode Exit fullscreen mode

✅ Currency Selector
I created a dropdown menu that lets users switch between INR, PKR, and USD for approximate conversion:

const currency = document.getElementById("currency").value;
const rates = { INR: 1, PKR: 3.3, USD: 0.012 };
const converted = total * rates[currency];

Enter fullscreen mode Exit fullscreen mode

✅ Responsive UI with CSS Flexbox
No framework needed — I used Flexbox for mobile and desktop layout adjustments. Example:

.container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
@media (min-width: 768px) {
  .container {
    flex-direction: row;
  }
}

Enter fullscreen mode Exit fullscreen mode

🧠 Hosting & Deployment
I deployed the site using GitHub Pages for free.

Simple, fast-loading, and easy to maintain.

Building CementsPrice.com taught me that:

What I Learned

  • Simplicity matters – I didn’t need React or a backend to create value.
  • Real problems > fancy code – A basic price calculator solved a real need.
  • Niche tools work – Focusing on cement buyers helped reach a specific audience.
  • SEO isn’t optional – Launching is just the start; indexing and sharing matter.
  • Small wins feel big – Watching users interact with something I built was incredibly rewarding.

What’s Next / Roadmap

  • Automated Updates  Integrate a small scraper/API so prices refresh daily without manual edits.
  • Location Filter  Let users select their city/region and instantly see local dealer rates.
  • Alert System  Email/WhatsApp pings when a chosen brand’s price drops or rises beyond a set threshold.
  • Open‑Source Release   Publish the code on GitHub so others can add brands, currencies, and improvements.
  • Mobile‑First UI Polish  Tighten up touch targets and offline caching for contractors on‑site.

Top comments (0)