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.