Urgent.News

What's breaking now, across thousands of outlets.

Tech

Automatic Permit Expiration Alerts & AI Error Reporting in VS (NestJS + Next.js)

Automatic Permit Expiration Alerts & AI Error Reporting in VS (NestJS + Next.js) TL;DR: I added a new priority‑actions endpoint that flags construction permits expiring in ≤30 days, wired it to the Next.js UI, hardened the CI hooks (husky + pre‑push) and wrapped AI‑driven services with Sentry. The changes tighten the product’s operational safety and give us real‑time visibility into AI failures.…

The wire service details the addition of a new endpoint in the NestJS and Next.js codebase, named "Priority‑Actions," which flags construction permits expiring within a 30-day window. This feature is integrated into the Next.js User Interface (UI) and ensures the system can provide real-time visibility into permit expiration issues.

Previously, there were no notifications for permits nearing expiration, leading to delays and manual follow-ups for contractors. The new endpoint fetches permit data from a database, filtering for permits whose expiration date is within the specified number of days from the current date, and returns a simplified JSON payload containing the permit ID, contractor reference, and days remaining until expiration. This data is then displayed in the UI to give users immediate awareness of pending permit expirations.

Additionally, the implementation addresses an issue with AI-driven services by incorporating Sentry for error tracking. Previously, Groq’s LLM services did not provide any error telemetry, leading to crashes when providers throttled or returned malformed JSON. By wrapping these services in try/catch blocks and sending error reports to Sentry, the team now has better visibility into AI failures.

Furthermore, the implementation involved updating the CI pipeline to include Husky and Pre‑push hooks, ensuring code quality standards are enforced across commits. This adjustment resolved the earlier build failures on Vercel and restored necessary linting checks. The updates collectively enhance operational safety for the product while providing the necessary tools for proactive management of permit expirations and AI service reliability.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Hash Indexes: What they are and their limitations

Hash indexes are a type of database index used to speed up lookups by key. They are commonly implemented using a hash table, which uses hash function to map keys to locations where their corresponding…

  • Hash indexes speed up lookups by key using hash functions and tables.
  • They maintain hash tables in memory for fast access but can be memory-intensive.
  • Hash indexes lack efficient range query support and require WAL for crash recovery.

More from Friday 2 October →