Skip to content

feat(platform): improve contributor integrity, privacy and governance - #14

Merged
ashishsinghbora merged 1 commit into
mainfrom
feat/platform-governance-hardening
Oct 30, 2026
Merged

ashishsinghbora merged 1 commit into
mainfrom
feat/platform-governance-hardening

Conversation

@ashishsinghbora

Copy link
Copy Markdown
Contributor

Summary

Implements comprehensive privacy-by-default safeguards, student self-service GDPR data controls (portability export and permanent erasure), strict contributor progression metric verification, and professional open-source governance policies.

Changes

  • Privacy by Default (src/lib/db/schema.ts, drizzle/0006_privacy_and_governance.sql):
    • Changed default user profile state from public to private (is_public = false).
    • Added public_consent_given_at timestamp column to track explicit user opt-in.
    • People directory (/people) and public passports strictly filter out private accounts.
  • Student Data Rights (GDPR Data Portability & Erasure):
    • Added GET /api/user/export: returns full JSON archive of all personal records, contributions, claims, and badges with attachment header.
    • Added POST /api/user/delete: self-service permanent account erasure with cascade and audit logging.
    • Enhanced SettingsForm.tsx with explicit consent description, data export button, and delete account action.
  • Progression & Metric Integrity (src/lib/metrics/contributor-metrics.ts, src/lib/passport/index.ts):
    • Completed issue claims must be associated with verified, official TechNexusOrg projects before awarding progression credit.
    • Public Contributor Passports strictly exclude contributions from unapproved projects.
  • Community Governance Documentation:
    • PRIVACY.md: Transparent privacy policy covering OAuth scopes, data usage, GDPR rights, and legal review notice.
    • CODE_OF_CONDUCT.md: Contributor Covenant adapted for student engineering community standards and clear enforcement guidelines.
    • .github/ISSUE_TEMPLATE/: Added standardized bug_report.md, feature_request.md, and confidential security_report.md.
    • .github/pull_request_template.md: Standardized PR template with verification checklist.
  • Automated Tests:
    • Added src/lib/privacy.test.ts testing privacy defaults, consent timestamps, and metric integrity.

Architecture

Separates private user records from public passport projections. Enforces consent gates at the query layer and ensures only verified, official contributions count toward progression.

Security & Privacy Considerations

  • Eliminates non-consensual indexing of student profiles.
  • Provides immediate erasure capabilities for compliance with modern privacy standards.
  • Prevents progression manipulation through claims on unapproved repositories.

Database Migrations

  • Migration file: drizzle/0006_privacy_and_governance.sql
  • Rollback: ALTER TABLE users ALTER COLUMN is_public SET DEFAULT true; ALTER TABLE users DROP COLUMN public_consent_given_at;

Testing

  • npm run lint: passed with 0 errors.
  • npm run typecheck: passed with 0 errors.
  • npm test: 83 passed across 19 test files.
  • npm run build: 21 routes built successfully.

Related Issues

Fixes #13

Copilot AI balanced review requested due to automatic review settings October 30, 2026 01:49
@ashishsinghbora ashishsinghbora added documentation Improvements or additions to documentation priority: high High priority issue backend Backend API & services frontend Frontend UI & UX database Database schema, migrations & queries testing Automated tests and QA labels Oct 30, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@ashishsinghbora ashishsinghbora self-assigned this Oct 30, 2026
@ashishsinghbora
ashishsinghbora force-pushed the feat/platform-governance-hardening branch from 8727c1c to 90ad185 Compare October 30, 2026 01:55
@ashishsinghbora
ashishsinghbora merged commit 92e1749 into main Oct 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Backend API & services database Database schema, migrations & queries documentation Improvements or additions to documentation frontend Frontend UI & UX priority: high High priority issue testing Automated tests and QA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(platform): improve contributor integrity, privacy and governance

2 participants