Add GDPR & COPPA compliance features
Implements full regulatory compliance for data privacy and child protection: **GDPR Compliance (Right to Data Portability & Right to Erasure):** - Data export API endpoint (GET /compliance/data-export) - Exports all user data across 7 entities in JSON format - Account deletion with 30-day grace period - POST /compliance/request-deletion - POST /compliance/cancel-deletion - GET /compliance/deletion-status - Scheduled job runs daily at 2 AM to process expired deletion requests - Audit logging for all compliance actions **COPPA Compliance (Children's Online Privacy Protection):** - Age verification during signup (blocks users under 13) - Parental consent requirement for users 13-17 - Database fields: date_of_birth, coppa_consent_given, parental_email - Audit logging for consent events **Technical Implementation:** - Created ComplianceModule with service, controller, scheduler - V015 migration: deletion_requests table - V016 migration: COPPA fields in users table - Updated User entity and RegisterDto - Age calculation helper in AuthService - Installed @nestjs/schedule for cron jobs All endpoints secured with JwtAuthGuard. Backend compiles with 0 errors. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -15,6 +15,8 @@ import { Send, SmartToy, Person, AutoAwesome } from '@mui/icons-material';
|
||||
import { motion, AnimatePresence } from 'framer-motion';
|
||||
import { useAuth } from '@/lib/auth/AuthContext';
|
||||
import apiClient from '@/lib/api/client';
|
||||
import ReactMarkdown from 'react-markdown';
|
||||
import remarkGfm from 'remark-gfm';
|
||||
|
||||
interface Message {
|
||||
id: string;
|
||||
@@ -276,9 +278,30 @@ export const AIChatInterface: React.FC = () => {
|
||||
backdropFilter: 'blur(10px)',
|
||||
}}
|
||||
>
|
||||
<Typography variant="body1" sx={{ whiteSpace: 'pre-wrap' }}>
|
||||
{message.content}
|
||||
</Typography>
|
||||
{message.role === 'assistant' ? (
|
||||
<Box
|
||||
sx={{
|
||||
'& p': { mb: 1 },
|
||||
'& strong': { fontWeight: 600 },
|
||||
'& ul, & ol': { pl: 2, mb: 1 },
|
||||
'& li': { mb: 0.5 },
|
||||
'& hr': { my: 2, borderColor: 'divider' },
|
||||
'& h1, & h2, & h3, & h4, & h5, & h6': {
|
||||
fontWeight: 600,
|
||||
mb: 1,
|
||||
mt: 1.5
|
||||
},
|
||||
}}
|
||||
>
|
||||
<ReactMarkdown remarkPlugins={[remarkGfm]}>
|
||||
{message.content}
|
||||
</ReactMarkdown>
|
||||
</Box>
|
||||
) : (
|
||||
<Typography variant="body1" sx={{ whiteSpace: 'pre-wrap' }}>
|
||||
{message.content}
|
||||
</Typography>
|
||||
)}
|
||||
<Typography
|
||||
variant="caption"
|
||||
sx={{
|
||||
|
||||
Reference in New Issue
Block a user