DEV Community

Cover image for Security, Cloud Costs, and Bugs: How I solved the Developer's Three Biggest Nightmares in a single app
Saurabh Mhatre
Saurabh Mhatre

Posted on

Security, Cloud Costs, and Bugs: How I solved the Developer's Three Biggest Nightmares in a single app

This is a submission for the Algolia Agent Studio Challenge: Consumer-Facing Non-Conversational Experiences

What I Built

DevSolve Preview

Introducing DevSolve
DevSolve is a "Smart Helper" for software developers. It works like a specialised search engine that scans our project files and instantly gives us the answers we need to keep our app safe by checking vulnerabilities in npm packages, cheap by checking for cloud costs, and bug-free by giving solutions to common console errors.

Instead of forcing us to chat with an AI or look through endless pages of documentation, DevSolve looks at our work and proactively tells us three things:

  1. Is our code safe?
    It looks at the npm packages our app uses and compares them against a global list of known security threats. If an npm package we’re using is "broken" or dangerous, DevSolve flags it and tells us exactly which version we can use to fix it.

  2. How much will app deployment cost?
    Building in the "cloud" (like AWS) can get expensive fast. DevSolve reads our infrastructure plans(Terraform IaC snippet) and instantly estimates our monthly bill. It’s like having a price tag appear on our code before we buy it.

  3. Why is the app broken?
    When our code crashes, it usually leaves a messy "error log." DevSolve cleans up that mess by checking console log errors, finding the specific error code, and showing us the official fix from the documentation so we can get back to work faster.

  4. How healthy is my entire project? (Stack Health Advisor)
    This is the "Control Room" of the app. By selecting our framework and infrastructure, we get a bird’s-eye view of our project's health. It provides a letter grade (like an A+) based on security, tells us our total estimated cost, and gives us a stability score based on common error patterns.

Demo

We can find the app demo here:- DevSolve Link

Also, here's a video demonstration of app's features:-

DevSolve is divided into four sections:-

1. Vulnerabilities check
Most developers only check for vulnerabilities when a build fails or an automated email arrives. The Vulnerabilities section is the "security guard" of our app, which instantly highlights if an npm package used in our app is compromised by instantly checking the package.json.

When users visits the vulnerabilities section, we show them the option to either paste package.json from their app into the app or search for vulnerabilities from the search bar. A list of common vulnerabilities is shown in list view below search as well:-

Vulnerabilities first screen

Once the user pastes package.json, we show compromised packages if there are any, along with a solution to fix the package on the right side panel:-

Vulnerability solution

2. Smart Error Analysis
Documentation is often thousands of pages long. When our app crashes, we don't have time to read; we need to fix it. DevSolve turns messy error logs into instant solutions.

What it does:
The Error Analysis tool acts as an intelligent bridge between our broken code and the official fix. It allows us to:

Paste Raw Logs: We can simply paste console error output or a cryptic error message directly into the analyser.

Automatic Extraction: The app instantly "scans" the text to identify specific error codes (like 401 Unauthorised or 500 Internal Server Error).

Proactive Diagnostics: Once an error is found, the Auto-Diagnostic sidebar immediately pulls the "Truth Layer" solution from the documentation.

We can directly paste the error log or search for specific error codes when we open this section. Also list of common errors are shown in the list below:-

Error Analysis section

When the user pastes a console error in the search section, the app automatically shows the error caused and the solution to fix the error:-

Console error

3. Cloud Cost Estimation & Risk
Cloud pricing is notoriously complex and often leads to 'bill shock' at the end of the month. DevSolve brings financial transparency directly into our code editor.

What it does:
The Cloud Cost tool acts as a real-time financial auditor for our infrastructure. Instead of manually checking provider pricing pages, we can:

Analyse IaC Snippets: User can paste Terraform or CloudFormation code directly into the analyser or search for current prices of components using search.

Analyse IaC first screen

Once the user pastes the Terraform IAC snippet, we get smart analysis as shown below:-

IAC snippet

Automatic Resource Detection: The app identifies specific resources, such as an aws_instance of type t3.medium, and instantly matches it to its current market price.

Visual Cost Estimates: As seen in the screenshots, the app generates a clean report showing the provider, region, and exact monthly cost for each resource.

Key Feature: Risk Prevention
DevSolve doesn't just show us prices, it helps us avoid expensive mistakes before they happen.

4.Stack Health Advisor
Choosing the right technology is only half the battle; knowing how that stack performs in the real world is the other. The Stack Health Advisor gives us an instant 'Pulse Check' on our architectural choices.

The Stack Health Advisor acts as a strategic consultant for our project. By selecting our primary components, we get an immediate breakdown of three critical factors:

  1. Security Risk: It assigns a letter grade (like an A+) to our stack. It proactively checks if our specific framework version has any known vulnerabilities that haven't been patched yet.

  2. Monthly Cost: It calculates our estimated infrastructure spend based on the components we have selected (e.g., AWS EC2 vs. ElastiCache). This helps us see the financial impact of our technical choices in real-time.

  3. Stability Index: It provides a percentage-based stability score by cross-referencing our stack against common error patterns in the app's knowledge base. A high score means the user's chosen tools are historically reliable and well-documented.

Stack advisor

In the above example, the Stack Health Advisor is evaluating a Vue.js frontend running on an AWS t3.medium instance. We can see an 'A+' security rating, a $30 monthly cost estimate, and a 98% stability index. This bird's-eye view allows leads and architects to validate their stack's health in seconds, ensuring the project remains secure and within budget.

Algolia AI Agent Studio integration
I was also able to integrate Algolia AI Agent Studio filter suggestions API locally in the app to show filters in error analysis section, as shown in below screenshot:-

Agent Studio Integration

For this, I created an AI agent in Algolia Agents studio section using a modified instructions prompt to filter data from error codes related Algolia index based on search query(error code) inserted by the user.

This allowed me to test the agent capabilities in agent studio sandbox as shown below:-

Test Sandbox

Then filterSuggestions option was added in widgets code section to show filter suggestions to the end user.

The filter suggestions can be used by the users for intelligent, deeper search of error codes and similar filter suggestions can be also added in other three sections of the app as well.

Due to a rate limit issue on the free-tier provided by AI API providers, I did not deploy it on netlify app link mentioned earlier in the article.

How I Used Algolia Agent Studio

In the Vulnerabilities section, Algolia's Custom Search acts as the high-speed "lookup engine" that connects your project dependencies to the sample data pulled from GitHub Advisory Database. It transforms a simple list of packages into a live security report by handling the complex matching logic behind the scenes. For the sample app, I inserted a few vulnerabilities in Algolia's index, which can be later populated with more comprehensive database entries for in depth vulnerabilities search.

In the error analysis section, I used Algolia's Custom Search Function to intercept every keystroke in the Error Analysis bar. If the input matches a known error pattern, we use Optional Filters to boost troubleshooting guides to the top, ensuring the most helpful 'Fix' is always what the user sees first.

For the Cloud Cost section, I used Algolia to index some sample cloud pricing tiers. I implemented a custom HCL/YAML parser that extracts resource types and regions from pasted snippets. These are then sent as search queries to Algolia, which retrieves the most accurate, region-specific pricing data.

In the stack health advisor section, I used Algolia’s multipleQueries feature to fire off three simultaneous searches every time a user changes their stack. One query checks the security index for framework risks, another hits the pricing index for cost, and the third searches the error base for stability issues. We then aggregate these results into a single, easy-to-read dashboard.

To fit the hackathon category, I used Agent Studio to create proactive filter suggestions:
For example, when a user searches for an error like "401," the Agent doesn't just show the error results; it proactively retrieves additional filters and displays them as the primary filters below the search input.

Agent Studio Integration

Why Fast Retrieval Matters

In a developer tool like DevSolve, fast retrieval isn't just a "nice-to-have" feature; it is the core engine that enables a Non-Conversational experience.

1. Maintaining "Flow State"
Developers work in a high-concentration "flow state." Every second spent waiting for a spinner or a slow AI response is a moment where that focus can break and flow state goes away.

Instant Feedback: Algolia provides search results in milliseconds, meaning the moment a developer pastes an error log, the fix is already there.

Zero Latency: Unlike LLMs that "stream" text slowly, fast retrieval allows the UI to update as fast as the users can blink.

2. Enabling "Proactive" Intelligence
For a tool to be proactive, it must be faster than the user's next thought.

Real-Time Auditing: In our Security section, the "Agent" must cross-reference lot of vulnerabilities instantly to flag a risk before the developer moves to the next file.

Dynamic Costing: As seen in your Cloud Costs section, fast retrieval allows the "price tag" to update instantly as soon as the user pastes the IAC snippet, making financial impact immediate and visible.

3. Accuracy Over Hallucination
Fast retrieval allows us to query a Verified Source of Truth (like the GitHub Advisory Database) rather than relying on a generative model's memory.

Precision: Speed allows us to perform multiple "behind-the-scenes" searches simultaneously, checking security, cost, and stability all at once, without slowing down the user interface.

Reliability: When the fix appears instantly from a trusted index, the developer trusts the tool more than an AI assistant that might guess the answer or give incorrect or outdated solutions.

I chose Algolia because, in development, speed is a feature. By reducing retrieval time, DevSolve disappears into the background of the workflow. It doesn't feel like a separate 'search step'; it feels like our code is simply telling us what it needs to be safe and cost-effective.

Conclusion

DevSolve is built on a simple premise: developer tools should be proactive. By focusing on high-speed retrieval over conversation, we’ve created a "Truth Layer" that respects a developer's most valuable asset: their time.

The Algolia Advantage
Using Algolia allowed us to turn complex datasets like the GitHub Advisory Database and Cloud Pricing Lists into instant, actionable insights.

Speed as a Feature: By delivering results in milliseconds, we ensure that security and cost checks happen during the workflow, not after.

Precision over Hallucinations: Because we query a verified index, the "Fixes" provided are always accurate and backed by documentation.

Beyond the Hackathon
While DevSolve solves the "Three Nightmares" of security, costs, and bugs today, the architecture is ready for more. The next steps for this project include:

Multi-Cloud Support: Expanding the pricing index to include Google Cloud and Azure for cross-provider comparisons.

Collaborative Health Reports: Allowing teams to share Stack Health Advisor scores to standardize best practices across an organization.

Thank you for exploring DevSolve. I hope this project inspires you as a reader to build such tools that prioritize the "Source of Truth" and empower developers to build with more confidence and less friction.

That's it from my end for today. See you all in the next article 👋

Top comments (0)