<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: prabanjan Sakthibabu</title>
    <description>The latest articles on DEV Community by prabanjan Sakthibabu (@prabanjan_sakthibabu_62e1).</description>
    <link>https://dev.to/prabanjan_sakthibabu_62e1</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4092923%2F12e4e98d-568c-4775-90fb-6af97a27c4a3.jpg</url>
      <title>DEV Community: prabanjan Sakthibabu</title>
      <link>https://dev.to/prabanjan_sakthibabu_62e1</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/prabanjan_sakthibabu_62e1"/>
    <language>en</language>
    <item>
      <title>TalentForge AI — Building a Production-Ready Authenticated AI App on Cloud Run</title>
      <dc:creator>prabanjan Sakthibabu</dc:creator>
      <pubDate>Mon, 31 Aug 2026 19:26:37 +0000</pubDate>
      <link>https://dev.to/prabanjan_sakthibabu_62e1/talentforge-ai-building-a-production-ready-authenticated-ai-app-on-cloud-run-31d3</link>
      <guid>https://dev.to/prabanjan_sakthibabu_62e1/talentforge-ai-building-a-production-ready-authenticated-ai-app-on-cloud-run-31d3</guid>
      <description>&lt;h1&gt;
  
  
  TalentForge AI — Building a Production-Ready Authenticated AI App on Cloud Run
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Submission for #AccelerateAIwithCloudRun&lt;/strong&gt; — Beyond the Personal Gemini Journal starter&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Live Demo (Cloud Run):&lt;/strong&gt; &lt;code&gt;https://talentforge-ai-xxxx-uc.a.run.app&lt;/code&gt; &lt;em&gt;(or see Walkthrough Video below)&lt;/em&gt;&lt;br&gt;
&lt;strong&gt;Repo:&lt;/strong&gt; &lt;code&gt;https://github.com/prabanjan127/talentforge-ai&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;Demo Video:&lt;/strong&gt; &lt;code&gt;https://youtu.be/XXXX&lt;/code&gt; / &lt;strong&gt;Blog:&lt;/strong&gt; You are reading it — publish this to Medium/Dev.to/Hashnode and use that URL for submission&lt;br&gt;
&lt;strong&gt;Firestore Rules:&lt;/strong&gt; &lt;code&gt;firestore.rules:3&lt;/code&gt; — per-user isolation &lt;code&gt;users/{uid}&lt;/code&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  1. What We Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;TalentForge AI&lt;/strong&gt; is an authenticated AI Career Coach, not a generic journal. It helps users land jobs faster with 4 Gemini-powered modes, all secured per-user:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Resume Review (ATS)&lt;/strong&gt; — Match score 0-100, missing keywords, 3-5 bullet rewrites&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cover Letter Generator&lt;/strong&gt; — 250-word tailored letter from resume + JD&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gap Analysis&lt;/strong&gt; — 30-60-90 day learning plan with courses/projects&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mock Interview Chat&lt;/strong&gt; — Strict hiring manager, one question at a time, feedback after each answer&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;History persists in &lt;code&gt;users/{uid}/applications&lt;/code&gt; (Firestore) and is deletable. All Gemini calls are server-side on Cloud Run.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why beyond starter:&lt;/strong&gt; Custom AI Studio system instructions per mode (&lt;code&gt;backend/src/services/gemini.js:15&lt;/code&gt;), interview chat with history, hardened auth, single Cloud Run service serving Vite React + Express.&lt;/p&gt;
&lt;h2&gt;
  
  
  2. Architecture
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[Vite React 19] -- Firebase Auth (Google SSO) --&amp;gt; [Express 5 on Cloud Run]
   |  Bearer ID Token                           | verifyIdToken (firebase-admin)
   |                                            |--&amp;gt; Gemini 3.6-flash (AI Studio)
   |                                            |--&amp;gt; Firestore users/{uid}/applications
   Dockerfile multi-stage: frontend build -&amp;gt; backend serves dist
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Frontend:&lt;/strong&gt; &lt;code&gt;frontend/&lt;/code&gt; Vite + React Router + Firebase Client SDK + Tailwind 3. &lt;code&gt;frontend/src/firebase.js:5&lt;/code&gt; + &lt;code&gt;frontend/src/contexts/AuthContext.jsx:12&lt;/code&gt; (demo fallback &lt;code&gt;demo-token&lt;/code&gt; for keyless preview)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backend:&lt;/strong&gt; &lt;code&gt;backend/&lt;/code&gt; Express + &lt;code&gt;firebase-admin/app:cert&lt;/code&gt; (&lt;code&gt;backend/src/config/firebase.js:9&lt;/code&gt;) + &lt;code&gt;@google/generative-ai&lt;/code&gt;. Serves frontend dist, health at &lt;code&gt;/health&lt;/code&gt; (&lt;code&gt;backend/src/index.js:19&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security:&lt;/strong&gt; &lt;code&gt;helmet&lt;/code&gt;, &lt;code&gt;cors&lt;/code&gt;, &lt;code&gt;authMiddleware&lt;/code&gt; (&lt;code&gt;backend/src/middleware/auth.js:1&lt;/code&gt;), Firestore rules deny all except owner, Gemini key never exposed to client (Secret Manager / env var), &lt;code&gt;morgan&lt;/code&gt; logging&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stability:&lt;/strong&gt; Input validation, try/catch on Gemini + Firestore (best-effort in demo), loading states, &lt;code&gt;/api/health&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  3. Gemini via AI Studio — Custom Instructions
&lt;/h2&gt;

&lt;p&gt;Designed in AI Studio, exported to &lt;code&gt;backend/src/services/gemini.js:15&lt;/code&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;resumeReview&lt;/code&gt;: FAANG hiring manager + ATS, returns Score, Missing Keywords, Bullet Improvements, Verdict (markdown)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;coverLetter&lt;/code&gt;: Professional coach, 250-300 words, professional enthusiastic&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;gapAnalysis&lt;/code&gt;: Career strategist, 30-60-90 plan with resources&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;mockInterview&lt;/code&gt;: Strict supportive hiring manager, one Q at a time, feedback loop&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Model: &lt;code&gt;gemini-3.6-flash&lt;/code&gt; (tested via &lt;code&gt;https://generativelanguage.googleapis.com/v1beta/models?key=...&lt;/code&gt; — &lt;code&gt;gemini-1.5-flash&lt;/code&gt; deprecated, &lt;code&gt;2.5&lt;/code&gt; no longer available to new users).&lt;/p&gt;

&lt;p&gt;Edit: AI Studio → New Prompt → System Instructions → paste → Test → copy to &lt;code&gt;SYSTEM_INSTRUCTIONS&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  4. Walkthrough — Screenshots / Video Script
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Record with Loom / OBS, 2-3 min:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;0:00 — Show &lt;code&gt;http://localhost:8080&lt;/code&gt; or Cloud Run URL. Demo banner if &lt;code&gt;DEMO_MODE=true&lt;/code&gt; (&lt;code&gt;frontend/src/components/Navbar.jsx:8&lt;/code&gt;).&lt;br&gt;
0:20 — &lt;strong&gt;Login:&lt;/strong&gt; Click &lt;code&gt;Sign in with Google&lt;/code&gt; (&lt;code&gt;frontend/src/pages/Login.jsx:15&lt;/code&gt;), Firebase Auth popup, redirect to &lt;code&gt;/&lt;/code&gt; (ProtectedRoute &lt;code&gt;frontend/src/components/ProtectedRoute.jsx:1&lt;/code&gt;).&lt;br&gt;
0:40 — &lt;strong&gt;Profile:&lt;/strong&gt; Enter Target Role &lt;code&gt;Software Engineer&lt;/code&gt;, paste resume + JD. Show prefilled example.&lt;br&gt;
1:00 — &lt;strong&gt;Resume Review:&lt;/strong&gt; Click &lt;code&gt;Resume Review&lt;/code&gt; → Gemini thinking → markdown result with Score 78/100, missing keywords &lt;code&gt;React 19, Cloud Run&lt;/code&gt;, bullet rewrites. Network tab shows &lt;code&gt;POST /api/ai/resume-review&lt;/code&gt; with &lt;code&gt;Authorization: Bearer &amp;lt;ID_TOKEN&amp;gt;&lt;/code&gt;.&lt;br&gt;
1:20 — &lt;strong&gt;Cover Letter + Gap Analysis:&lt;/strong&gt; Click each, show generated markdown, then &lt;code&gt;History (Firestore)&lt;/code&gt; panel on right updates — proves per-user persistence &lt;code&gt;users/{uid}/applications&lt;/code&gt;.&lt;br&gt;
1:40 — &lt;strong&gt;Mock Interview:&lt;/strong&gt; Click &lt;code&gt;Mock Interview&lt;/code&gt; tab → send &lt;code&gt;Hi I'm ready&lt;/code&gt; → Gemini asks Q1, answer, get feedback + Q2 — show chat history passed to &lt;code&gt;backend/src/routes/ai.js:75&lt;/code&gt; &lt;code&gt;generate(..., history)&lt;/code&gt;.&lt;br&gt;
2:00 — &lt;strong&gt;Firestore Rules:&lt;/strong&gt; Show &lt;code&gt;firestore.rules&lt;/code&gt; + Firebase Console Firestore Data &lt;code&gt;users/demo-user-123/applications&lt;/code&gt; — only owner sees it.&lt;br&gt;
2:20 — &lt;strong&gt;Cloud Run:&lt;/strong&gt; Show &lt;code&gt;gcloud run deploy&lt;/code&gt; logs or Console → Cloud Run → Service &lt;code&gt;talentforge-ai&lt;/code&gt; → URL → &lt;code&gt;curl /health&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Screenshots to include in blog:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Login page with Google SSO&lt;/li&gt;
&lt;li&gt;Dashboard with 3 textarea + 4 buttons + History panel&lt;/li&gt;
&lt;li&gt;Resume Review output markdown&lt;/li&gt;
&lt;li&gt;Mock interview chat&lt;/li&gt;
&lt;li&gt;Firestore console with &lt;code&gt;users/{uid}&lt;/code&gt; path&lt;/li&gt;
&lt;li&gt;Cloud Run service URL + health JSON&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  5. Local Run
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Firebase setup: console.firebase.google.com → Auth (Google) → Firestore → Web app config&lt;/span&gt;
&lt;span class="nb"&gt;cp &lt;/span&gt;frontend/.env.example frontend/.env  &lt;span class="c"&gt;# fill VITE_FIREBASE_*&lt;/span&gt;
&lt;span class="nb"&gt;cp &lt;/span&gt;backend/.env.example backend/.env    &lt;span class="c"&gt;# fill GEMINI_API_KEY, FIREBASE_SERVICE_ACCOUNT, DEMO_MODE=false&lt;/span&gt;

&lt;span class="nb"&gt;cd &lt;/span&gt;frontend &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; npm run build
&lt;span class="nb"&gt;cd&lt;/span&gt; ../backend &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; npm start  &lt;span class="c"&gt;# http://localhost:8080&lt;/span&gt;
&lt;span class="c"&gt;# or dev: npm run dev in both&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Test: &lt;code&gt;curl http://localhost:8080/health&lt;/code&gt; → &lt;code&gt;{"status":"ok"}&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  6. Deploy to Cloud Run
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Console (no gcloud permission needed):&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Enable APIs: &lt;code&gt;console.cloud.google.com/apis/library/firestore.googleapis.com?project=target-13bf5&lt;/code&gt; → Enable (same for &lt;code&gt;run.googleapis.com&lt;/code&gt;, &lt;code&gt;cloudbuild.googleapis.com&lt;/code&gt;, &lt;code&gt;artifactregistry.googleapis.com&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Firestore → Create database → Production → us-central1&lt;/li&gt;
&lt;li&gt;Cloud Run → Create Service → Continuously deploy from source → Connect &lt;code&gt;github.com/prabanjan127/talentforge-ai&lt;/code&gt; → Dockerfile → Region &lt;code&gt;us-central1&lt;/code&gt; → Allow unauthenticated → Env vars &lt;code&gt;GEMINI_MODEL=gemini-3.6-flash&lt;/code&gt;, &lt;code&gt;FIREBASE_PROJECT_ID=target-13bf5&lt;/code&gt; → Secrets &lt;code&gt;GEMINI_API_KEY&lt;/code&gt;, &lt;code&gt;FIREBASE_SERVICE_ACCOUNT&lt;/code&gt; (Secret Manager) → Deploy&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;CLI (after &lt;code&gt;gcloud auth login&lt;/code&gt; as owner):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gcloud builds submit &lt;span class="nt"&gt;--tag&lt;/span&gt; gcr.io/target-13bf5/talentforge-ai
gcloud run deploy talentforge-ai &lt;span class="nt"&gt;--image&lt;/span&gt; gcr.io/target-13bf5/talentforge-ai &lt;span class="nt"&gt;--platform&lt;/span&gt; managed &lt;span class="nt"&gt;--region&lt;/span&gt; us-central1 &lt;span class="nt"&gt;--allow-unauthenticated&lt;/span&gt; &lt;span class="nt"&gt;--port&lt;/span&gt; 8080 &lt;span class="nt"&gt;--set-env-vars&lt;/span&gt; &lt;span class="nv"&gt;GEMINI_MODEL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;gemini-3.6-flash,FIREBASE_PROJECT_ID&lt;span class="o"&gt;=&lt;/span&gt;target-13bf5 &lt;span class="nt"&gt;--set-secrets&lt;/span&gt; &lt;span class="nv"&gt;GEMINI_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;gemini-key:latest,FIREBASE_SERVICE_ACCOUNT&lt;span class="o"&gt;=&lt;/span&gt;firebase-sa:latest
curl https://talentforge-ai-xxxx.run.app/health
firebase deploy &lt;span class="nt"&gt;--only&lt;/span&gt; firestore:rules
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  7. Security &amp;amp; Evaluation
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Authenticity:&lt;/strong&gt; 4 modes + chat beyond starter&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Usability:&lt;/strong&gt; Google SSO, ProtectedRoute, error-free flows&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stability:&lt;/strong&gt; Server verifies ID token, handles Gemini 404/403, Firestore disabled fallback, health checks&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security:&lt;/strong&gt; &lt;code&gt;firestore.rules&lt;/code&gt; per-user, API keys server-only, &lt;code&gt;helmet&lt;/code&gt;, ID token auth&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  8. Submission Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Cloud Run Live URL: &lt;code&gt;https://talentforge-ai-xxxx-uc.a.run.app&lt;/code&gt; (replace after deploy)&lt;/li&gt;
&lt;li&gt;Social Post: Publish this blog to Medium/Dev.to with &lt;code&gt;#AccelerateAIwithCloudRun&lt;/code&gt; + video &lt;code&gt;https://youtu.be/XXXX&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Repo: &lt;code&gt;https://github.com/prabanjan127/talentforge-ai&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Built by following Codelab “Build a User-Authenticated AI Application with Custom Instructions on Google AI Studio &amp;amp; Cloud Run” then extended with hardened security and unique career features.&lt;/em&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  AccelerateAIwithCloudRun #Firebase #CloudRun #Gemini #AIStudio
&lt;/h1&gt;

</description>
      <category>ai</category>
      <category>cloud</category>
      <category>gemini</category>
      <category>googlecloud</category>
    </item>
    <item>
      <title>AI Security Log Auditor</title>
      <dc:creator>prabanjan Sakthibabu</dc:creator>
      <pubDate>Tue, 25 Aug 2026 18:44:35 +0000</pubDate>
      <link>https://dev.to/prabanjan_sakthibabu_62e1/ai-security-log-auditor-548h</link>
      <guid>https://dev.to/prabanjan_sakthibabu_62e1/ai-security-log-auditor-548h</guid>
      <description>&lt;h1&gt;
  
  
  AI Security Log Auditor
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;Manual log triage takes 15+ minutes and misses stealthy bursts. This dashboard ingests raw Syslog/Nginx/auth.log/Suricata logs, redacts credentials client-side, clusters anomalies with lightweight heuristics, and streams structured threat JSON (threatLevel, attackVector, mitreTechniqueId, confidence, remediation) into an interactive cyber-terminal for instant iptables/fail2ban/nginx mitigations.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Live Demo:&lt;/strong&gt; &lt;code&gt;https://ai-security-auditor-one.vercel.app&lt;/code&gt; · &lt;strong&gt;Video:&lt;/strong&gt; &lt;em&gt;(Unlisted YouTube link)&lt;/em&gt; · &lt;strong&gt;Blog:&lt;/strong&gt; &lt;em&gt;(Dev.to/Hashnode link)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/docs%2Fscreenshot-dashboard.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/docs%2Fscreenshot-dashboard.png" alt="Dashboard" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/docs%2Fscreenshot-terminal.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/docs%2Fscreenshot-terminal.png" alt="Terminal" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Architecture
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;flowchart LR
  A["Raw Logs&amp;lt;br/&amp;gt;Syslog / Nginx / auth.log"] --&amp;gt; B["Ingestion &amp;amp; Sanitization&amp;lt;br/&amp;gt;redact credentials&amp;lt;br/&amp;gt;cluster anomalies"]
  B --&amp;gt; C["Structured Prompt&amp;lt;br/&amp;gt;threatLevel, attackVector, mitreId"]
  C --&amp;gt; D["AI Inference&amp;lt;br/&amp;gt;Gemini Flash / Ollama"]
  D --&amp;gt; E["Risk &amp;amp; Remediation&amp;lt;br/&amp;gt;Health = 100 - C*25 - W*10"]
  E --&amp;gt; F["Angular Signals&amp;lt;br/&amp;gt;metrics / table / terminal"]
  F --&amp;gt; G["Dark Cyber UI"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Pipeline highlight file mapping:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;src/app/models/security.model.ts:1&lt;/code&gt; — &lt;code&gt;LogEntry&lt;/code&gt;, &lt;code&gt;ThreatReport&lt;/code&gt;, &lt;code&gt;MitreTechnique&lt;/code&gt;, &lt;code&gt;RemediationAction&lt;/code&gt;, &lt;code&gt;DashboardMetrics&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;src/app/services/log-generator.service.ts:32&lt;/code&gt; — &lt;code&gt;getAttackPresets()&lt;/code&gt; / &lt;code&gt;getSampleLogsByPreset()&lt;/code&gt; / &lt;code&gt;parseRawLogLines()&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;src/app/services/ai-auditor.service.ts:18&lt;/code&gt; — &lt;code&gt;ingestLogs()&lt;/code&gt; → &lt;code&gt;mitreMap&lt;/code&gt; (&lt;code&gt;T1110.001&lt;/code&gt;, &lt;code&gt;T1190&lt;/code&gt;, &lt;code&gt;T1046&lt;/code&gt;, &lt;code&gt;T1078&lt;/code&gt;) + &lt;code&gt;buildRemediation()&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;src/app/components/dashboard/dashboard.component.html:20&lt;/code&gt; — metric bar, &lt;code&gt;src/app/components/dashboard/dashboard.component.html:32&lt;/code&gt; drag-drop zone &lt;code&gt;(dragover)/(drop)&lt;/code&gt;, &lt;code&gt;src/app/components/dashboard/dashboard.component.html:145&lt;/code&gt; remediation terminal&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Tech Stack
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Layer&lt;/th&gt;
&lt;th&gt;Choice&lt;/th&gt;
&lt;th&gt;Why&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Frontend&lt;/td&gt;
&lt;td&gt;Angular 17+ standalone, TypeScript, &lt;code&gt;CommonModule&lt;/code&gt; + &lt;code&gt;FormsModule&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Reactive signals/services, strict types&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Styling&lt;/td&gt;
&lt;td&gt;Bootstrap 5.3 + SCSS (&lt;code&gt;src/app/app.scss:1&lt;/code&gt;, &lt;code&gt;src/app/components/dashboard/dashboard.component.scss:1&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Terminal dark theme &lt;code&gt;#0a0f1d&lt;/code&gt;, &lt;code&gt;#1e293b&lt;/code&gt; cards, glowing badges&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Icons&lt;/td&gt;
&lt;td&gt;Font Awesome 4.7 (&lt;code&gt;angular.json:36&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;fa-shield&lt;/code&gt;, &lt;code&gt;fa-terminal&lt;/code&gt;, &lt;code&gt;fa-bug&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AI&lt;/td&gt;
&lt;td&gt;Gemini 2.0 Flash (cloud) / Ollama Llama 3.1 8B local&lt;/td&gt;
&lt;td&gt;Spec schema: &lt;code&gt;threatLevel&lt;/code&gt;/&lt;code&gt;attackVector&lt;/code&gt;/&lt;code&gt;mitreTechniqueId&lt;/code&gt;/&lt;code&gt;confidenceScore&lt;/code&gt;/&lt;code&gt;remediationCommands&lt;/code&gt; — fallback heuristic already ships&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Build&lt;/td&gt;
&lt;td&gt;Angular CLI &lt;code&gt;ng build&lt;/code&gt; / &lt;code&gt;ng test&lt;/code&gt; (Vitest)&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;angular.json:43&lt;/code&gt; budgets &lt;code&gt;700kB/14kB&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Recommended models per spec: &lt;strong&gt;Gemini 2.0 Flash&lt;/strong&gt; (1M context, sub-second) for hosted; &lt;strong&gt;Ollama (Qwen 2.5 Coder)&lt;/strong&gt; for air-gapped — logs never leave browser.&lt;/p&gt;

&lt;h2&gt;
  
  
  Features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Ingestion:&lt;/strong&gt; drag-drop, browse, 6 presets (Full 49 / SSH 15 / SQLi 8 / Recon 5 / API 1 / Clean 20), paste raw text — all via &lt;code&gt;src/app/components/dashboard/dashboard.component.ts:55&lt;/code&gt; &lt;code&gt;onDragOver/onDrop/handleFile&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sanitization:&lt;/strong&gt; client-side redaction before any AI call (&lt;code&gt;sanitizedTokensCount&lt;/code&gt; in header)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Metrics:&lt;/strong&gt; Total Ingested / Critical / Warning / Health &lt;code&gt;100-(C×25+W×10)&lt;/code&gt; with conic ring &lt;code&gt;healthColor()&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Threat Intel:&lt;/strong&gt; filterable table (search IP/vector/MITRE, severity &amp;amp; vector dropdown) — selectable row opens inspector with &lt;code&gt;aiAnalysis&lt;/code&gt;, MITRE link, IoCs, raw redacted line&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Terminal:&lt;/strong&gt; per-threat &lt;code&gt;iptables&lt;/code&gt;/&lt;code&gt;fail2ban&lt;/code&gt;/&lt;code&gt;ufw&lt;/code&gt;/&lt;code&gt;nginx&lt;/code&gt; with &lt;strong&gt;Copy&lt;/strong&gt;, &lt;strong&gt;Run (Sim)&lt;/strong&gt;, &lt;strong&gt;Copy All&lt;/strong&gt;, &lt;strong&gt;Export .sh&lt;/strong&gt; (&lt;code&gt;downloadScript()&lt;/code&gt;), simulated stdout&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Quick Start
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# prerequisites: Node 20+, npm 10+&lt;/span&gt;
git clone https://github.com/prabanjan127/ai-security-auditor.git
&lt;span class="nb"&gt;cd &lt;/span&gt;ai-security-auditor
npm &lt;span class="nb"&gt;install&lt;/span&gt;          &lt;span class="c"&gt;# installs bootstrap@5.3.8 + font-awesome@4.7.0 per angular.json:33&lt;/span&gt;
ng serve             &lt;span class="c"&gt;# http://localhost:4200 — dashboard auto-loads Full Attack Suite&lt;/span&gt;
ng &lt;span class="nb"&gt;test&lt;/span&gt;              &lt;span class="c"&gt;# 2/2 passing (src/app/app.spec.ts:1)&lt;/span&gt;
npm run build        &lt;span class="c"&gt;# → dist/ai-security-auditor/browser/&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Try it:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Click &lt;strong&gt;Load Sample Attack Logs&lt;/strong&gt; or any preset pill.&lt;/li&gt;
&lt;li&gt;Or drop a &lt;code&gt;.log&lt;/code&gt; (e.g. &lt;code&gt;auth.log&lt;/code&gt; with &lt;code&gt;Failed password for invalid user admin from 203.0.113.5&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Filter by &lt;code&gt;CRITICAL&lt;/code&gt;, search &lt;code&gt;203.0.113&lt;/code&gt;, select a row → copy &lt;code&gt;sudo iptables -A INPUT -s 203.0.113.5 -p tcp --dport 22 -j DROP&lt;/code&gt; from terminal.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Deploy
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Vercel (recommended)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm i &lt;span class="nt"&gt;-g&lt;/span&gt; vercel
vercel &lt;span class="nt"&gt;--prod&lt;/span&gt;  &lt;span class="c"&gt;# uses vercel.json (output: dist/ai-security-auditor/browser)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;vercel.json&lt;/code&gt; already contains SPA rewrite &lt;code&gt;/(.*) → /index.html&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Netlify / GitHub Pages
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run build
&lt;span class="c"&gt;# Netlify: drag dist/ai-security-auditor/browser&lt;/span&gt;
&lt;span class="c"&gt;# GH Pages: npx angular-cli-ghpages --dir=dist/ai-security-auditor/browser&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Project Links (replace before submit)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;code&gt;https://github.com/prabanjan127/ai-security-auditor&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Live Demo:&lt;/strong&gt; &lt;code&gt;https://ai-security-auditor-one.vercel.app&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Blog (Dev.to/Hashnode):&lt;/strong&gt; paste draft from prompt + screenshots above&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Video (Unlisted YouTube):&lt;/strong&gt; 0:00 problem / 0:30 upload demo / 1:30 architecture&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How It Works (for blog/video)
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Ingest&lt;/strong&gt; — drop &lt;code&gt;.log&lt;/code&gt; → &lt;code&gt;LogGeneratorService.parseRawLogLines()&lt;/code&gt; clusters anomalies.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sanitize&lt;/strong&gt; — &lt;code&gt;sanitizeLine()&lt;/code&gt; redacts &lt;code&gt;Bearer&lt;/code&gt;/&lt;code&gt;api_key&lt;/code&gt; before inference.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Infer&lt;/strong&gt; — structured prompt expects &lt;code&gt;{threatLevel, attackVector, mitreTechniqueId, confidenceScore, remediationCommands}&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Score&lt;/strong&gt; — &lt;code&gt;calculateDashboardMetrics()&lt;/code&gt; → health.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Display&lt;/strong&gt; — &lt;code&gt;DashboardComponent&lt;/code&gt; binds via &lt;code&gt;applyFilters()&lt;/code&gt; / &lt;code&gt;selectReport()&lt;/code&gt;; terminal streams &lt;code&gt;terminalOutput[]&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  License
&lt;/h2&gt;

&lt;p&gt;MIT — showcase project; not for production firewall automation without review.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>security</category>
    </item>
  </channel>
</rss>
