Skip to content

guyromb/shieldhr

Repository files navigation

ShieldHR

Legal-protection incident documentation system that guides small business owners through compliant HR reporting to prevent wrongful termination lawsuits

Build Type Monetization Score License Top Pick

Built for: Small business owners with 5-20 employees, no dedicated HR staff, in high-turnover or high-risk industries (retail, restaurants, construction, trades)

πŸš€ Live Demo β€’ πŸ“¦ GitHub β€’ πŸ› Report Bug β€’ πŸ’‘ Request Feature


⚠️ What's Built vs What's Left

This MVP was autonomously generated by MVP Factory v11 using a free-tier AI API (NVIDIA / Kimi K2.5). Simple logic runs for real. Complex external dependencies are stubbed so the app always works.

What's real and working right now:

Layer What it does
βœ… Frontend UI Fully interactive β€” forms submit, responses render, auth guard works
βœ… Input validation Every API route checks required fields, returns 400 on bad input
βœ… Calculations & scoring Algorithms (risk scores, percentages, rankings, text analysis) run in pure TypeScript
βœ… Rule-based logic Classification, tier detection, flag rules β€” all real code
βœ… Auth flow Email+password client validation β†’ localStorage token β†’ dashboard guard

What's stubbed and why:

Feature Current State Why it's stubbed How to fix it
πŸ—„οΈ Database persistence In-memory arrays (resets on restart) No DB provisioned in free tier See Step 1 below
πŸ€– AI/LLM responses Hardcoded plausible strings NVIDIA free API has strict rate limits during bulk builds See Step 2 below
πŸ” Real authentication localStorage demo token No JWT/session infra provisioned See Step 3 below
πŸ“§ Email / notifications Logged + returns {sent: true} No email service configured See Step 4 below
πŸ’³ Payments Returns demo status Stripe not configured See Step 5 below

Step 1 β€” Add a real database (15 min setup)

# Option A: Supabase (Postgres, free tier)
npm install @supabase/supabase-js
# In each route: import { createClient } from '@supabase/supabase-js'
# Replace the mock array with: const { data } = await supabase.from('table').select()

# Option B: PlanetScale (MySQL, free tier)
npm install @planetscale/database

Look for // TODO: replace with DB comments in src/app/api/**/route.ts

Step 2 β€” Enable real AI responses

// In any API route, replace the hardcoded AI string with:
const res = await fetch('https://integrate.api.nvidia.com/v1/chat/completions', {
  method: 'POST',
  headers: { 'Authorization': `Bearer ${process.env.NVIDIA_API_KEY}`,
             'Content-Type': 'application/json' },
  body: JSON.stringify({
    model: 'moonshotai/kimi-k2.5',
    messages: [{ role: 'user', content: yourPrompt }],
    max_tokens: 1024
  })
});
const { choices } = await res.json();
return NextResponse.json({ result: choices[0].message.content });

Add NVIDIA_API_KEY=your_key to .env.local

Step 3 β€” Replace demo auth with real sessions (NextAuth.js)

npm install next-auth
# 1. Create src/app/api/auth/[...nextauth]/route.ts with your provider
# 2. Replace localStorage.setItem("auth_token",...) in auth/page.tsx with signIn()
# 3. Replace localStorage.getItem("auth_token") in dashboard/page.tsx with useSession()

Step 4 β€” Add email (Resend β€” free 3000 emails/mo)

npm install resend
# Replace the { sent: true } mock in notification routes with:
# await resend.emails.send({ from: 'you@domain.com', to: email, subject, html })

Step 5 β€” Add payments (Stripe)

npm install stripe @stripe/stripe-js
# Replace demo payment routes with real Stripe checkout sessions

All the UI is already wired up. Every form already calls the right API route. You only need to swap the stubbed returns for real implementations.


🎯 The Problem

Small business owners lack HR infrastructure and legal knowledge to properly document employee misconduct, theft, or safety violations, exposing them to expensive wrongful termination litigation and regulatory penalties

  • ❌ Fear of wrongful termination lawsuits costing $50k+
  • ❌ Uncertainty about what legally constitutes 'documentation'
  • ❌ No budget for HR consultant ($150-300/hr)
  • ❌ Previous bad experiences with problem employees they couldn't fire properly
  • ❌ Anxiety about unemployment claims and regulatory audits

✨ Features

πŸ”₯ Feature 1

Jurisdiction-aware incident wizard with conditional branching logic that adapts questions based on incident type (theft/misconduct/safety) and state-specific legal requirements

⚑ Feature 2

Legally-compliant PDF report generator with embedded digital signatures, witness statement attachments, and tamper-evident audit trails

🎨 Feature 3

Compliance validation engine that scans documentation for missing legal elements (dates, witnesses, prior warnings) before allowing report finalization

πŸ” Feature 4

Corrective action plan builder with severity-based disciplinary templates and progressive discipline tracking linked to incident history

πŸ“Š Feature 5

Secure evidence portal with time-stamped photo/video uploads and chain-of-custody documentation for theft or safety incidents

πŸ€– Feature 6

Attorney-ready export formatter that packages incidents into legal-standard documentation bundles for outside counsel review

πŸ’Ž Feature 7

Employee history dashboard showing prior incidents, warnings, and performance patterns to establish documentation patterns for termination decisions

πŸ”§ Implementation Guide

A step-by-step breakdown of how each feature is built. Use this as your dev roadmap.

πŸ”₯ 1. Jurisdiction-aware incident wizard with conditional branching logic that adapts questions based on incident type

What it does: Jurisdiction-aware incident wizard with conditional branching logic that adapts questions based on incident type (theft/misconduct/safety) and state-specific legal requirements

How to implement:

Step What to do
1. API Route Create src/app/api/jurisdiction-aware-incident-wizard-with-conditional-branching-logic-that-adapts-questions-based-on-incident-type/route.ts with a POST handler
2. Input Schema Accept { userId?, ...featureParams } in the request body
3. Server Logic Process the request, call external APIs if needed, return JSON
4. UI Component Create src/components/JurisdictionawareincidentwizardwithconditionalbranchinglogicthatadaptsquestionsbasedonincidenttypeSection.tsx
5. Wire up Call /api/jurisdiction-aware-incident-wizard-with-conditional-branching-logic-that-adapts-questions-based-on-incident-type from the component using fetch on form submit

Potential enhancements:

  • ⚑ Cache repeated lookups with unstable_cache or Redis
  • πŸ”’ Add rate limiting to /api/jurisdiction-aware-incident-wizard-with-conditional-branching-logic-that-adapts-questions-based-on-incident-type (e.g. Upstash Ratelimit)
  • πŸ“± Make the UI section responsive-first (mobile breakpoints)
  • πŸ“Š Log feature usage to analytics (Plausible / PostHog)
  • πŸ§ͺ Add an integration test for the API route

⚑ 2. Legally-compliant PDF report generator with embedded digital signatures, witness statement attachments, and tamper-evident audit trails

What it does: Legally-compliant PDF report generator with embedded digital signatures, witness statement attachments, and tamper-evident audit trails

How to implement:

Step What to do
1. API Route Create src/app/api/legally-compliant-pdf-report-generator-with-embedded-digital-signatures-witness-statement-attachments-and-tamper-evident-audit-trails/route.ts with a POST handler
2. Input Schema Accept { userId?, ...featureParams } in the request body
3. Server Logic Process the request, call external APIs if needed, return JSON
4. UI Component Create src/components/LegallycompliantPDFreportgeneratorwithembeddeddigitalsignatureswitnessstatementattachmentsandtamperevidentaudittrailsSection.tsx
5. Wire up Call /api/legally-compliant-pdf-report-generator-with-embedded-digital-signatures-witness-statement-attachments-and-tamper-evident-audit-trails from the component using fetch on form submit

Potential enhancements:

  • ⚑ Cache repeated lookups with unstable_cache or Redis
  • πŸ”’ Add rate limiting to /api/legally-compliant-pdf-report-generator-with-embedded-digital-signatures-witness-statement-attachments-and-tamper-evident-audit-trails (e.g. Upstash Ratelimit)
  • πŸ“± Make the UI section responsive-first (mobile breakpoints)
  • πŸ“Š Log feature usage to analytics (Plausible / PostHog)
  • πŸ§ͺ Add an integration test for the API route

🎨 3. Compliance validation engine that scans documentation for missing legal elements

What it does: Compliance validation engine that scans documentation for missing legal elements (dates, witnesses, prior warnings) before allowing report finalization

How to implement:

Step What to do
1. API Route Create src/app/api/compliance-validation-engine-that-scans-documentation-for-missing-legal-elements/route.ts with a POST handler
2. Input Schema Accept { userId?, ...featureParams } in the request body
3. Server Logic Process the request, call external APIs if needed, return JSON
4. UI Component Create src/components/CompliancevalidationenginethatscansdocumentationformissinglegalelementsSection.tsx
5. Wire up Call /api/compliance-validation-engine-that-scans-documentation-for-missing-legal-elements from the component using fetch on form submit

Potential enhancements:

  • ⚑ Cache repeated lookups with unstable_cache or Redis
  • πŸ”’ Add rate limiting to /api/compliance-validation-engine-that-scans-documentation-for-missing-legal-elements (e.g. Upstash Ratelimit)
  • πŸ“± Make the UI section responsive-first (mobile breakpoints)
  • πŸ“Š Log feature usage to analytics (Plausible / PostHog)
  • πŸ§ͺ Add an integration test for the API route

πŸ” 4. Corrective action plan builder with severity-based disciplinary templates and progressive discipline tracking linked to incident history

What it does: Corrective action plan builder with severity-based disciplinary templates and progressive discipline tracking linked to incident history

How to implement:

Step What to do
1. API Route Create src/app/api/corrective-action-plan-builder-with-severity-based-disciplinary-templates-and-progressive-discipline-tracking-linked-to-incident-history/route.ts with a POST handler
2. Input Schema Accept { userId?, ...featureParams } in the request body
3. Server Logic Process the request, call external APIs if needed, return JSON
4. UI Component Create src/components/CorrectiveactionplanbuilderwithseveritybaseddisciplinarytemplatesandprogressivedisciplinetrackinglinkedtoincidenthistorySection.tsx
5. Wire up Call /api/corrective-action-plan-builder-with-severity-based-disciplinary-templates-and-progressive-discipline-tracking-linked-to-incident-history from the component using fetch on form submit

Potential enhancements:

  • ⚑ Cache repeated lookups with unstable_cache or Redis
  • πŸ”’ Add rate limiting to /api/corrective-action-plan-builder-with-severity-based-disciplinary-templates-and-progressive-discipline-tracking-linked-to-incident-history (e.g. Upstash Ratelimit)
  • πŸ“± Make the UI section responsive-first (mobile breakpoints)
  • πŸ“Š Log feature usage to analytics (Plausible / PostHog)
  • πŸ§ͺ Add an integration test for the API route

πŸ“Š 5. Secure evidence portal with time-stamped photo/video uploads and chain-of-custody documentation for theft or safety incidents

What it does: Secure evidence portal with time-stamped photo/video uploads and chain-of-custody documentation for theft or safety incidents

How to implement:

Step What to do
1. API Route Create src/app/api/secure-evidence-portal-with-time-stamped-photo-video-uploads-and-chain-of-custody-documentation-for-theft-or-safety-incidents/route.ts with a POST handler
2. Input Schema Accept { userId?, ...featureParams } in the request body
3. Server Logic Process the request, call external APIs if needed, return JSON
4. UI Component Create src/components/SecureevidenceportalwithtimestampedphotovideouploadsandchainofcustodydocumentationfortheftorsafetyincidentsSection.tsx
5. Wire up Call /api/secure-evidence-portal-with-time-stamped-photo-video-uploads-and-chain-of-custody-documentation-for-theft-or-safety-incidents from the component using fetch on form submit

Potential enhancements:

  • ⚑ Cache repeated lookups with unstable_cache or Redis
  • πŸ”’ Add rate limiting to /api/secure-evidence-portal-with-time-stamped-photo-video-uploads-and-chain-of-custody-documentation-for-theft-or-safety-incidents (e.g. Upstash Ratelimit)
  • πŸ“± Make the UI section responsive-first (mobile breakpoints)
  • πŸ“Š Log feature usage to analytics (Plausible / PostHog)
  • πŸ§ͺ Add an integration test for the API route

πŸ€– 6. Attorney-ready export formatter that packages incidents into legal-standard documentation bundles for outside counsel review

What it does: Attorney-ready export formatter that packages incidents into legal-standard documentation bundles for outside counsel review

How to implement:

Step What to do
1. API Route Create src/app/api/attorney-ready-export-formatter-that-packages-incidents-into-legal-standard-documentation-bundles-for-outside-counsel-review/route.ts with a POST handler
2. Input Schema Accept { userId?, ...featureParams } in the request body
3. Server Logic Process the request, call external APIs if needed, return JSON
4. UI Component Create src/components/AttorneyreadyexportformatterthatpackagesincidentsintolegalstandarddocumentationbundlesforoutsidecounselreviewSection.tsx
5. Wire up Call /api/attorney-ready-export-formatter-that-packages-incidents-into-legal-standard-documentation-bundles-for-outside-counsel-review from the component using fetch on form submit

Potential enhancements:

  • ⚑ Cache repeated lookups with unstable_cache or Redis
  • πŸ”’ Add rate limiting to /api/attorney-ready-export-formatter-that-packages-incidents-into-legal-standard-documentation-bundles-for-outside-counsel-review (e.g. Upstash Ratelimit)
  • πŸ“± Make the UI section responsive-first (mobile breakpoints)
  • πŸ“Š Log feature usage to analytics (Plausible / PostHog)
  • πŸ§ͺ Add an integration test for the API route

πŸ’Ž 7. Employee history dashboard showing prior incidents, warnings, and performance patterns to establish documentation patterns for termination decisions

What it does: Employee history dashboard showing prior incidents, warnings, and performance patterns to establish documentation patterns for termination decisions

How to implement:

Step What to do
1. API Route Create src/app/api/employee-history-dashboard-showing-prior-incidents-warnings-and-performance-patterns-to-establish-documentation-patterns-for-termination-decisions/route.ts with a POST handler
2. Input Schema Accept { userId?, ...featureParams } in the request body
3. Server Logic Process the request, call external APIs if needed, return JSON
4. UI Component Create src/components/EmployeehistorydashboardshowingpriorincidentswarningsandperformancepatternstoestablishdocumentationpatternsforterminationdecisionsSection.tsx
5. Wire up Call /api/employee-history-dashboard-showing-prior-incidents-warnings-and-performance-patterns-to-establish-documentation-patterns-for-termination-decisions from the component using fetch on form submit

Potential enhancements:

  • ⚑ Cache repeated lookups with unstable_cache or Redis
  • πŸ”’ Add rate limiting to /api/employee-history-dashboard-showing-prior-incidents-warnings-and-performance-patterns-to-establish-documentation-patterns-for-termination-decisions (e.g. Upstash Ratelimit)
  • πŸ“± Make the UI section responsive-first (mobile breakpoints)
  • πŸ“Š Log feature usage to analytics (Plausible / PostHog)
  • πŸ§ͺ Add an integration test for the API route

πŸ—οΈ How It Works

User Request
      β”‚
      β–Ό
  Next.js Edge ──► API Route ──► Business Logic ──► Data Store
      β”‚                               β”‚
  React UI ◄────────────────── Response / JSON
      β”‚
  Real-time UI Update

🎯 Who Is This For?

Attribute Details
Audience Small business owners with 5-20 employees, no dedicated HR staff, in high-turnover or high-risk industries (retail, restaurants, construction, trades)
Tech Level 🟑 Medium
Pain Level High
Motivations Protect personal/business assets from litigation β€’ Create legally defensible paper trails
Price Willingness medium

πŸ§ͺ Validation Results

MVP Factory Validation Report β€” 2026-03-04
═══════════════════════════════════════════════════════

βœ… PASS  Market Demand             β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘ 8/10
βœ… PASS  Competition Gap           β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘ 8/10
βœ… PASS  Technical Feasibility     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘ 9/10
βœ… PASS  Monetization Potential    β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘ 7/10
βœ… PASS  Audience Fit              β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘ 9/10

─────────────────────────────────────────────────────
         OVERALL SCORE  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘ 8.2/10
         VERDICT        🟒 BUILD β€” Strong market opportunity
         TESTS PASSED   5/5
═══════════════════════════════════════════════════════

Why this works: Strong Reddit validation (732 upvotes, 678 comments) proves acute demand. Clear blue ocean: existing HR tools target enterprise or are generic templates without legal guardrails. High-stakes B2B problem justifies SaaS pricing ($39-49/month) as 'legal insurance.' Technical implementation straightforward with document generation libraries. Main risk is sporadic usage (incidents are rare), but retention solved by positioning as 'always-ready compliance vault' and adding employee record-keeping features for ongoing use.

Unique angle: πŸ’‘ Legal guardrails approach: Unlike template libraries, this actively prevents legal mistakes by enforcing documentation standards in real-time during emotional/stressful incidents, specifically designed for non-HR small business owners

Competitors analyzed: BambooHR (expensive, complex enterprise features, not incident-focused), LegalZoom (static templates only, no guidance or validation), HRdirect/SmartBiz (compliance forms without interactive guidance or state-specific logic)

πŸ› οΈ Tech Stack

Next.js 14 App Router + TypeScript + TailwindCSS + Lucide-react
Layer Technology Purpose
πŸ–₯️ Frontend Next.js 14 App Router React framework
🎨 Styling TailwindCSS Utility-first CSS
πŸ”— Backend Next.js API Routes Serverless endpoints
πŸ’Ύ Data Server-side logic Business processing
πŸš€ Deploy Vercel Edge deployment

πŸš€ Getting Started

Web App / SaaS

# Clone & install
git clone https://github.com/guyromb/shieldhr.git
cd shieldhr
npm install

# Start development
npm run dev
# β†’ http://localhost:3000

# Build for production
npm run build
npm start

Environment Variables (create .env.local)

# Add your keys here
NEXT_PUBLIC_APP_NAME=ShieldHR

πŸ“Š Market Opportunity

Signal Data
πŸ”΄ Problem Severity High
πŸ“ˆ Market Demand 8/10
πŸ† Competition Gap 8/10 β€” Blue ocean 🌊
πŸ’° Monetization 7/10
🎯 Model πŸ’³ Paid Subscription
πŸ“£ Source reddit community signal

🀝 Contributing

Contributions are welcome! Here's how:

  1. Fork the repo
  2. Create your branch: git checkout -b feature/amazing-feature
  3. Commit: git commit -m 'Add amazing feature'
  4. Push: git push origin feature/amazing-feature
  5. Open a Pull Request

πŸ“„ License

MIT License β€” see LICENSE for details.


Discovered from reddit Β· Built 2026-03-04 Β· Powered by MVP Factory v11

Autonomously researched, validated & generated β€” zero human code written

About

ShieldHR - Legal-protection incident documentation system that guides small business owners through compliant HR reporting to prevent wrongful termination lawsuits

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors