feat: legal consent – ToS/Privacy/Cookie, consent gate, GDPR delete/e…#122
Merged
ritik4ever merged 1 commit intoritik4ever:mainfrom Feb 26, 2026
Merged
Conversation
|
Someone is attempting to deploy a commit to the ritik4ever's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR: Legal documents, consent gate, and GDPR compliance
Summary
Adds Terms of Service, Privacy Policy, and Cookie Policy, gates app usage on consent, and implements GDPR-style data export and deletion.
Issue
/legalpages, consent checkboxes at signup, consent stored in DB, and data export/deletion.Changes
Legal documents & pages
/legal-style views –Legalcomponent forterms|privacy|cookies; reachable from landing footer and from consent modal.Consent flow
GET /api/consent/status?userId=<address>. If consent is not recorded, user is shown a consent gate (full-page) and cannot reach the dashboard until they accept.POST /api/consentand then proceeds to dashboard.onNeedsConsent(publicKey)shows the consent gate.Backend
legal_consent(user_id, terms_accepted_at, privacy_accepted_at, cookie_accepted_at, ip_address, user_agent, timestamps).recordConsent,getConsent,hasFullConsent,deleteUserData(removes consent + portfolios + rebalance history for user).GET /api/consent/status,POST /api/consent,DELETE /api/user/:address/data(JWT-protected when enabled).GDPR
DELETE /api/user/:address/data, then logs out and navigates to landing. Confirmation modal explains that consent records, portfolios, and rebalance history are permanently deleted.Acceptance criteria
How to test
closes #95