Skip to content

Add TOS/Privacy agreement checkbox to signup and notification system - #28

Merged
2witstudios merged 5 commits into
masterfrom
claude/signup-tos-notifications-011CUgBNRJLyobJC7m3op97F
Nov 1, 2025
Merged

2witstudios merged 5 commits into
masterfrom
claude/signup-tos-notifications-011CUgBNRJLyobJC7m3op97F

Conversation

@2witstudios

Copy link
Copy Markdown
Owner

This commit implements the following features:

  1. TOS/Privacy Checkbox in Signup:

    • Added checkbox to signup form requiring users to accept TOS and Privacy Policy
    • Added client-side and server-side validation for TOS acceptance
    • Added tosAcceptedAt timestamp field to users table to track acceptance
    • Links to /tos and /privacy pages open in new tabs
  2. Database Schema Changes:

    • Added tosAcceptedAt timestamp column to users table
    • Added TOS_PRIVACY_UPDATED notification type to NotificationType enum
    • Generated migration 0005_strange_dorian_gray.sql
  3. Notification System for TOS/Privacy Updates:

    • Added TosPrivacyUpdatedNotification type to notification types
    • Created broadcastTosPrivacyUpdate() helper function to notify all users
    • Updated NotificationDropdown to handle TOS_PRIVACY_UPDATED notifications
    • Notifications link directly to the updated document (/tos or /privacy)
  4. Type Safety:

    • Updated all NotificationType definitions across the codebase
    • Added proper TypeScript types for TOS/Privacy metadata
    • All type checks passing

Files changed:

  • apps/web/src/app/auth/signup/page.tsx
  • apps/web/src/app/api/auth/signup/route.ts
  • apps/web/src/components/notifications/NotificationDropdown.tsx
  • packages/db/src/schema/auth.ts
  • packages/db/src/schema/notifications.ts
  • packages/lib/src/notifications.ts
  • packages/lib/src/notifications/types.ts
  • packages/lib/src/services/notification-email-service.ts

This commit implements the following features:

1. **TOS/Privacy Checkbox in Signup**:
   - Added checkbox to signup form requiring users to accept TOS and Privacy Policy
   - Added client-side and server-side validation for TOS acceptance
   - Added tosAcceptedAt timestamp field to users table to track acceptance
   - Links to /tos and /privacy pages open in new tabs

2. **Database Schema Changes**:
   - Added tosAcceptedAt timestamp column to users table
   - Added TOS_PRIVACY_UPDATED notification type to NotificationType enum
   - Generated migration 0005_strange_dorian_gray.sql

3. **Notification System for TOS/Privacy Updates**:
   - Added TosPrivacyUpdatedNotification type to notification types
   - Created broadcastTosPrivacyUpdate() helper function to notify all users
   - Updated NotificationDropdown to handle TOS_PRIVACY_UPDATED notifications
   - Notifications link directly to the updated document (/tos or /privacy)

4. **Type Safety**:
   - Updated all NotificationType definitions across the codebase
   - Added proper TypeScript types for TOS/Privacy metadata
   - All type checks passing

Files changed:
- apps/web/src/app/auth/signup/page.tsx
- apps/web/src/app/api/auth/signup/route.ts
- apps/web/src/components/notifications/NotificationDropdown.tsx
- packages/db/src/schema/auth.ts
- packages/db/src/schema/notifications.ts
- packages/lib/src/notifications.ts
- packages/lib/src/notifications/types.ts
- packages/lib/src/services/notification-email-service.ts
@2witstudios

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@2witstudios
2witstudios merged commit c1fe03e into master Nov 1, 2025
2 checks passed
@2witstudios
2witstudios deleted the claude/signup-tos-notifications-011CUgBNRJLyobJC7m3op97F branch November 1, 2025 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants