@suman-jangili/dpdpa_checklist
v2.0.0
Published
Hosts a modern serverless architecture (Netlify + Neon + Prisma) and react+vite frontend for Indian organizations.
Readme
DPDPA Compliance Tracker
Open-source compliance tool for India's Digital Personal Data Protection Act (DPDPA) 2023.
Serverless architecture, type-safe, zero maintenance costs. Track checklist items and compliance status effortlessly.
Features
| Feature | Description | | :--- | :--- | | 📋 Interactive Checklists | Create, view, update compliance items per organization | | 🎯 Status Tracking | Not Started → In Progress → Completed → Review Pending | | 🔐 Secure Backend | Serverless Express API on Netlify Functions | | 🗄️ Scalable Database | Neon serverless PostgreSQL | | ✅ Type-Safe | Full TypeScript from Frontend to Backend | | 🚀 Zero Ops | Deployed via GitHub Actions to Netlify | | 🌐 OAuth Authentication | GitHub & Proton (OAuth-only, no local passwords) | | 🧹 Automated Data Retention | Scheduled cleanup jobs for GDPR/DPDPA compliance | | 📊 Compliance Dashboards | Visual analytics with Recharts |
Tech Stack
| Layer | Technology | |:--- |:--- | | Frontend | React 19 + Vite 8 + TypeScript 6 | | Routing | React Router DOM v7 | | State | Context API + Hooks | | Charts | Recharts v3 | | Styling | Tailwind CSS v4 + PostCSS | | Backend | Express 5 + Netlify Functions | | ORM | Prisma Client 6.x (schema generation) | | Database | Neon PostgreSQL | | Auth | OAuth (GitHub/Proton) — No local passwords | | Hosting | Netlify (CDN + Serverless) | | Scheduled Jobs | Netlify Scheduled Functions (daily retention cleanup) |
Getting Started
Prerequisites
| Requirement | Version | | :--- | :--- | | Node.js | ≥20 (required for Vite 8) | | npm | Latest | | GitHub / Neon / Netlify Accounts | Free tier sufficient |
Installation
# Clone repository
git clone https://github.com/sumanjangili/dpdpa-checklist-generator.git
cd dpdpa-checklist-generator
# Install dependencies
npm install
# Set up environment variables (create .env):
DATABASE_URL="postgresql://..."
GITHUB_CLIENT_ID=""
GITHUB_CLIENT_SECRET=""
FRONTEND_URL="http://localhost:8888"
NETLIFY_SITE_URL="http://localhost:8888"
NODE_ENV="development"
ENCRYPTION_KEY="<64-char-hex-key>"
KEY_VERSION="1"
ADMIN_EMAILS="[email protected]"
# Push schema to database
npx prisma db push
# Start dev server
npm run dev
> **Note:** Use http://localhost:8888 for both FRONTEND_URL and NETLIFY_SITE_URL in local development. Visit http://localhost:8888 in your browser.Build Configuration (Netlify)
| Setting | Value | | :--- | :--- | | Build Command | npm run db:generate && npm run build | | Publish Directory | dist | | Functions Directory | functions (Auto-detected by netlify.toml) | | Node Version | 20 (specified in .nvmrc and package.json) | | NPM Flags | --legacy-peer-deps |
3. Environment Variables (Netlify dashboard)
| Variable | Value | | :--- | :--- | | DATABASE_URL | Neon PostgreSQL connection string | | GITHUB_CLIENT_ID | OAuth app credentials | | GITHUB_CLIENT_SECRET | OAuth app credentials | | FRONTEND_URL | Production URL after deploy | | NETLIFY_SITE_URL | Auto-filled by Netlify | | NODE_ENV | production (do not delete) | | ENCRYPTION_KEY | 64-character hex encryption key | | KEY_VERSION | 1 (rotation identifier) | | ADMIN_EMAILS | Comma-separated admin emails |
⚠️ Never commit .env files to git! Use Netlify's secret management.
Security & Privacy
| Control | Implementation | | :--- | :--- | | Secrets Protection | Environment variables injected during build/deploy only | | Transport Encryption | TLS 1.3 enforced via Netlify | | Session Management | HTTP-only cookies (7-day expiry) | | Input Validation | Zod schemas + type checking | | Rate Limiting | 100 req/15min in production(disabled in dev) | | CORS | Environment-gated (localhost only in dev) | | Auth Strategy | OAuth-only (no password hashing) | | Erasure Compliance | Soft delete + encrypted field clearing | | Audit Logging | All data access logged to dataAccessLog table | | Retention Jobs | Scheduled automated cleanup (configurable policies) |
Compliance Documentation: See /docs/compliance/ folder for GDPR/DPDPA audit checklists, DPIA report, incident response plan, and vendor risk assessments. Legal analyses available in docs/legal/.
Deployment to Netlify
- Repository Setup
Connect GitHub repo to Netlify during import wizard.
- Environment Variables
Add all required secrets in Site settings → Environment variables.
- Build Configuration
Verify netlify.toml is present with correct settings (auto-detected).
- OAuth Callback URLs
Update your OAuth provider apps:
| Provider | Production Callback URL | | :--- | :--- | | GitHub | https://dpdpa-compliance.netlify.app/api/auth/github/callback | | Proton | https://dpdpa-compliance.netlify.netlify.app/api/auth/proton/callback |
- Verify
After deployment:
- ✅ Frontend: https://dpdpa-compliance.netlify.app
- ✅ API: https://dpdpa-compliance.netlify.app/api/...
- ✅ Health Check: https://dpdpa-compliance.netlify.app/api/health
Scheduled Retention Jobs
Daily automated data cleanup runs at 02:00 UTC via Netlify Scheduled Functions.
| Job Type | Description | | :--- | :--- | | Session Auto-Purge | Deletes expired sessions (immediate, regardless of policy) | | Access Log Cleanup | Anonymizes or deletes old access logs per policy | | Audit Log Cleanup | Anonymizes audit trails (configurable retention) | | Custom Policies | Admin-defined retention rules via /api/admin/retention-policies |
Manual trigger available at: /api/admin/retention-jobs/run
Contributing
Contributions are welcome! Please read CONTRIBUTING.md for guidelines.
- Fork the repo
- Create your feature branch (git checkout -b feature/AmazingFeature)
- Commit your changes (git commit -m 'Add some AmazingFeature')
- Push to the branch (git push origin feature/AmazingFeature)
- Open a Pull Request
Documentation Index
Compliance
- Cross-Document Linkage Map
- Regulatory Matrix
- DPIA Report
- GDPR Audit Checklist
- Incident Response Plan
- Vendor Risk Assessments
Legal
Governance
Changelog
v0.1.0 (2026-07-19)
| Fix | Description | | :--- | :--- | | Build Tools | Moved Prisma, TypeScript, Vite, Tailwind to dependencies for Netlify compatibility | | Dependency Hoisting | Added explicit react-is dependency (transitive peer dep for Recharts) | | OAuth Migration | Deprecated local auth, OAuth-only flow (GitHub/Proton) | | Retention Jobs | Automated scheduled cleanup with configurable policies | | Erasure Workflow | Complete A→B→C→D erasure pipeline with audit logg |i | CORS | Environment-gated (localhost only in development) | | Session Storage | Added IP address tracking to sessions | | Rate Limiting | Applied to data routes and auth endpoints separately | | Admin Gating | Frontend AdminRoute wrapper with isAdmin flag | | Prisma Version | Pinned to v6.19.3 (avoids breaking changes in v7.x) |
Sensitive Document Storage
⚠️ Operational versions of security documents are stored separately from Git:
| Document | Repository Location | Operational Location |
|----------|--------------------|---------------------|
| Breach Playbook | docs/compliance/breach-playbook-template.md | Proton Drive: /vault/prod/breach-playbook/ |
| Risk Register | docs/RISK-REGISTER.md | Proton Drive: /vault/prod/risk-register/ |
| Vendor DPAs | docs/legal/processor-agreement-templates/ | Proton Drive: /vault/prod/vendor-contracts/ |
| Encryption Keys | ❌ Not stored in docs | AWS KMS / HashiCorp Vault |
Why? Templates are safe for collaboration; operational versions contain real employee contacts and require access control.
Known Limitations
| Limitation | Mitigation | | :--- | :--- | | Netlify Function Timeout | 10-second default for scheduled functions; batch processing implemented | | Large Dataset Performance | Batch deletion (100 records/batch) in retention jobs | | Prisma Cold Starts | Connection warming on init; retry logic for transient failures | | Chunk Size Warning | Single bundle >500KB — acceptable for MVP; code-splitting recommended for scale |
License
This project is released under the MIT License – See LICENSE for details.
Built with ❤️ for India's Digital Privacy Future | DPDPA Compliance Tracker v0.1.0
Last updated: July 19, 2026
