feat: wire frontend pages to tRPC APIs

- Add hooks (useAuth, useSubscription, useNotifications) for real API data
- Add auth service (login/signup) with password hashing and session support
- Replace stub auth with real tRPC calls in login/signup/onboarding pages
- Replace mock dashboard data with real API data from hooks
- Create service pages: DarkWatch, VoicePrint, SpamShield, HomeTitle, RemoveBrokers, Settings
- Update Navbar, TopBar, Sidebar with real user data and correct routes
- Add passwordHash field to users schema for credential auth
- Fix tests to work with real hooks (mock tRPC/hooks)
This commit is contained in:
2026-05-25 17:34:48 -04:00
parent eb8e57c674
commit 7cbcde6a6b
46 changed files with 2418 additions and 418 deletions

View File

@@ -1,9 +1,14 @@
export default function SocialAuthButtons() {
interface SocialAuthButtonsProps {
onGoogleSignIn?: () => void;
onAppleSignIn?: () => void;
}
export default function SocialAuthButtons(props: SocialAuthButtonsProps) {
return (
<div class="flex flex-col gap-3">
<button
type="button"
onClick={() => {}}
onClick={props.onGoogleSignIn}
class="flex items-center justify-center gap-3 w-full px-4 py-2.5 border border-[var(--color-border)] rounded-lg text-sm font-medium text-[var(--color-text-primary)] bg-white hover:bg-[var(--color-bg-secondary)] transition-colors cursor-pointer"
>
<svg class="h-5 w-5" viewBox="0 0 24 24" fill="currentColor">
@@ -16,7 +21,7 @@ export default function SocialAuthButtons() {
</button>
<button
type="button"
onClick={() => {}}
onClick={props.onAppleSignIn}
class="flex items-center justify-center gap-3 w-full px-4 py-2.5 border border-[var(--color-border)] rounded-lg text-sm font-medium text-white bg-black hover:bg-gray-900 transition-colors cursor-pointer"
>
<svg class="h-5 w-5" viewBox="0 0 24 24" fill="currentColor">