From a98548b624ef61bb4275c936662b3cc5c44ff64c Mon Sep 17 00:00:00 2001 From: jslyonnais <6282845+jslyonnais@users.noreply.github.com> Date: Wed, 18 Feb 2026 14:39:19 -0500 Subject: [PATCH 01/19] move form page to views --- src/components/Forms/SignIn/index.ts | 2 ++ src/components/Forms/SignIn/index.tsx | 1 - src/components/Forms/SignUp/index.ts | 3 ++- src/routes/auth/signin.tsx | 4 ++-- src/routes/auth/signup.tsx | 4 ++-- .../Forms/SignIn/SignInForm.tsx => views/SignInView.tsx} | 5 ++--- .../Forms/SignUp/SignUpForm.tsx => views/SignUpView.tsx} | 8 +++++--- 7 files changed, 15 insertions(+), 12 deletions(-) create mode 100644 src/components/Forms/SignIn/index.ts delete mode 100644 src/components/Forms/SignIn/index.tsx rename src/{components/Forms/SignIn/SignInForm.tsx => views/SignInView.tsx} (84%) rename src/{components/Forms/SignUp/SignUpForm.tsx => views/SignUpView.tsx} (78%) diff --git a/src/components/Forms/SignIn/index.ts b/src/components/Forms/SignIn/index.ts new file mode 100644 index 0000000..756a7e3 --- /dev/null +++ b/src/components/Forms/SignIn/index.ts @@ -0,0 +1,2 @@ +export * from './SignInCredsForm' +export * from './SignInMfaForm' diff --git a/src/components/Forms/SignIn/index.tsx b/src/components/Forms/SignIn/index.tsx deleted file mode 100644 index fbf76cf..0000000 --- a/src/components/Forms/SignIn/index.tsx +++ /dev/null @@ -1 +0,0 @@ -export * from './SignInForm' diff --git a/src/components/Forms/SignUp/index.ts b/src/components/Forms/SignUp/index.ts index 0d400e8..843ba6d 100644 --- a/src/components/Forms/SignUp/index.ts +++ b/src/components/Forms/SignUp/index.ts @@ -1 +1,2 @@ -export * from './SignUpForm' +export * from './SignUpCredsForm' +export * from './SignUpVerificationForm' diff --git a/src/routes/auth/signin.tsx b/src/routes/auth/signin.tsx index 478f0c8..fdf911a 100644 --- a/src/routes/auth/signin.tsx +++ b/src/routes/auth/signin.tsx @@ -1,6 +1,6 @@ import { createFileRoute, useNavigate } from '@tanstack/react-router' import { useUser } from '@clerk/clerk-react' -import { SignInForm } from '@/components/Forms/SignIn' +import { SignInView } from '@/views/SignInView' import { RoutesPath } from '@/types/routes' export const Route = createFileRoute(RoutesPath.SIGN_IN)({ @@ -16,7 +16,7 @@ function RouteComponent() { return (
- +
) diff --git a/src/routes/auth/signup.tsx b/src/routes/auth/signup.tsx index 105862e..2965538 100644 --- a/src/routes/auth/signup.tsx +++ b/src/routes/auth/signup.tsx @@ -1,5 +1,5 @@ import { createFileRoute } from '@tanstack/react-router' -import { SignUpForm } from '@/components/Forms/SignUp' +import { SignUpView } from '@/views/SignUpView' import { RoutesPath } from '@/types/routes' export const Route = createFileRoute(RoutesPath.SIGN_UP)({ @@ -10,7 +10,7 @@ function RouteComponent() { return (
- +
) diff --git a/src/components/Forms/SignIn/SignInForm.tsx b/src/views/SignInView.tsx similarity index 84% rename from src/components/Forms/SignIn/SignInForm.tsx rename to src/views/SignInView.tsx index 64334af..18ca384 100644 --- a/src/components/Forms/SignIn/SignInForm.tsx +++ b/src/views/SignInView.tsx @@ -1,5 +1,4 @@ -import { SignInMfaForm } from './SignInMfaForm' -import { SignInCredsForm } from './SignInCredsForm' +import { SignInCredsForm, SignInMfaForm } from '@/components/Forms/SignIn' import { Card, CardContent, @@ -10,7 +9,7 @@ import { import { m } from '@/paraglide/messages' import { useSignIn } from '@/hooks/useSignIn' -export const SignInForm = () => { +export const SignInView = () => { const signIn = useSignIn() const { requiresMfa } = signIn diff --git a/src/components/Forms/SignUp/SignUpForm.tsx b/src/views/SignUpView.tsx similarity index 78% rename from src/components/Forms/SignUp/SignUpForm.tsx rename to src/views/SignUpView.tsx index 0577362..8e3586f 100644 --- a/src/components/Forms/SignUp/SignUpForm.tsx +++ b/src/views/SignUpView.tsx @@ -1,10 +1,12 @@ -import { SignUpCredsForm } from './SignUpCredsForm' -import { SignUpVerificationForm } from './SignUpVerificationForm' +import { + SignUpCredsForm, + SignUpVerificationForm, +} from '@/components/Forms/SignUp' import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card' import { m } from '@/paraglide/messages' import { useSignUp } from '@/hooks/useSignUp' -export const SignUpForm = () => { +export const SignUpView = () => { const signUp = useSignUp() const { pendingVerification } = signUp From 4d7888298602b86079f53dd2d6933f0136249a7f Mon Sep 17 00:00:00 2001 From: jslyonnais <6282845+jslyonnais@users.noreply.github.com> Date: Wed, 18 Feb 2026 14:57:30 -0500 Subject: [PATCH 02/19] demo page + nav --- messages/en.json | 2 ++ messages/fr.json | 2 ++ src/components/Layouts/LayoutAside.tsx | 5 ++- .../Layouts/Navigation/MainNavigation.tsx | 35 +++++++++++++++++++ .../Layouts/Navigation/NavigationLink.tsx | 24 +++++++++++++ src/routeTree.gen.ts | 24 +++++++++++-- src/routes/demo/encrypt.tsx | 20 +++++++++++ src/types/routes.ts | 1 + 8 files changed, 107 insertions(+), 6 deletions(-) create mode 100644 src/components/Layouts/Navigation/MainNavigation.tsx create mode 100644 src/components/Layouts/Navigation/NavigationLink.tsx create mode 100644 src/routes/demo/encrypt.tsx diff --git a/messages/en.json b/messages/en.json index 2542f46..c98008b 100644 --- a/messages/en.json +++ b/messages/en.json @@ -1,6 +1,8 @@ { "$schema": "https://inlang.com/schema/inlang-message-format", "navigation": { + "dashboard": "Dashboard", + "encrypt": "Encryption Demo", "logout": "Logout" }, "sign_in": { diff --git a/messages/fr.json b/messages/fr.json index 7e32395..567672b 100644 --- a/messages/fr.json +++ b/messages/fr.json @@ -1,6 +1,8 @@ { "$schema": "https://inlang.com/schema/inlang-message-format", "navigation": { + "dashboard": "Tableau de bord", + "encrypt": "Démo de chiffrement", "logout": "Se déconnecter" }, "sign_in": { diff --git a/src/components/Layouts/LayoutAside.tsx b/src/components/Layouts/LayoutAside.tsx index b7d8897..f26f175 100644 --- a/src/components/Layouts/LayoutAside.tsx +++ b/src/components/Layouts/LayoutAside.tsx @@ -1,9 +1,9 @@ import { UserNavigation } from './Navigation' +import { MainNavigation } from './Navigation/MainNavigation' import { Sidebar, SidebarContent, SidebarFooter, - SidebarGroup, SidebarHeader, } from '@/components/ui/sidebar' @@ -12,8 +12,7 @@ export const LayoutAside = () => { - - + diff --git a/src/components/Layouts/Navigation/MainNavigation.tsx b/src/components/Layouts/Navigation/MainNavigation.tsx new file mode 100644 index 0000000..8612b60 --- /dev/null +++ b/src/components/Layouts/Navigation/MainNavigation.tsx @@ -0,0 +1,35 @@ +import { LayoutDashboardIcon, MessageSquareLockIcon } from 'lucide-react' +import { useNavigate } from '@tanstack/react-router' +import { NavigationLink } from './NavigationLink' +import { + SidebarGroup, + SidebarGroupContent, + SidebarMenu, +} from '@/components/ui/sidebar' +import { m } from '@/paraglide/messages' +import { RoutesPath } from '@/types/routes' + +export const MainNavigation = () => { + const navigate = useNavigate() + return ( + + + + navigate({ to: RoutesPath.HOME.toString() })} + icon={} + label={m['navigation.dashboard']()} + /> + + navigate({ to: RoutesPath.DEMO_ENCRYPT.toString() })} + icon={} + label={m['navigation.encrypt']()} + /> + + + + ) +} diff --git a/src/components/Layouts/Navigation/NavigationLink.tsx b/src/components/Layouts/Navigation/NavigationLink.tsx new file mode 100644 index 0000000..9ff58f8 --- /dev/null +++ b/src/components/Layouts/Navigation/NavigationLink.tsx @@ -0,0 +1,24 @@ +import { SidebarMenuButton, SidebarMenuItem } from '@/components/ui/sidebar' + +type NavigationLinkProps = { + icon?: React.ReactNode + label: string + onClick?: () => void + tooltip: string +} + +export const NavigationLink = ({ + tooltip, + onClick, + icon, + label, +}: NavigationLinkProps) => { + return ( + + + {icon} + {label} + + + ) +} diff --git a/src/routeTree.gen.ts b/src/routeTree.gen.ts index 718da20..10dd35f 100644 --- a/src/routeTree.gen.ts +++ b/src/routeTree.gen.ts @@ -10,6 +10,7 @@ import { Route as rootRouteImport } from './routes/__root' import { Route as IndexRouteImport } from './routes/index' +import { Route as DemoEncryptRouteImport } from './routes/demo/encrypt' import { Route as AuthSignupRouteImport } from './routes/auth/signup' import { Route as AuthSigninRouteImport } from './routes/auth/signin' @@ -18,6 +19,11 @@ const IndexRoute = IndexRouteImport.update({ path: '/', getParentRoute: () => rootRouteImport, } as any) +const DemoEncryptRoute = DemoEncryptRouteImport.update({ + id: '/demo/encrypt', + path: '/demo/encrypt', + getParentRoute: () => rootRouteImport, +} as any) const AuthSignupRoute = AuthSignupRouteImport.update({ id: '/auth/signup', path: '/auth/signup', @@ -33,30 +39,34 @@ export interface FileRoutesByFullPath { '/': typeof IndexRoute '/auth/signin': typeof AuthSigninRoute '/auth/signup': typeof AuthSignupRoute + '/demo/encrypt': typeof DemoEncryptRoute } export interface FileRoutesByTo { '/': typeof IndexRoute '/auth/signin': typeof AuthSigninRoute '/auth/signup': typeof AuthSignupRoute + '/demo/encrypt': typeof DemoEncryptRoute } export interface FileRoutesById { __root__: typeof rootRouteImport '/': typeof IndexRoute '/auth/signin': typeof AuthSigninRoute '/auth/signup': typeof AuthSignupRoute + '/demo/encrypt': typeof DemoEncryptRoute } export interface FileRouteTypes { fileRoutesByFullPath: FileRoutesByFullPath - fullPaths: '/' | '/auth/signin' | '/auth/signup' + fullPaths: '/' | '/auth/signin' | '/auth/signup' | '/demo/encrypt' fileRoutesByTo: FileRoutesByTo - to: '/' | '/auth/signin' | '/auth/signup' - id: '__root__' | '/' | '/auth/signin' | '/auth/signup' + to: '/' | '/auth/signin' | '/auth/signup' | '/demo/encrypt' + id: '__root__' | '/' | '/auth/signin' | '/auth/signup' | '/demo/encrypt' fileRoutesById: FileRoutesById } export interface RootRouteChildren { IndexRoute: typeof IndexRoute AuthSigninRoute: typeof AuthSigninRoute AuthSignupRoute: typeof AuthSignupRoute + DemoEncryptRoute: typeof DemoEncryptRoute } declare module '@tanstack/react-router' { @@ -68,6 +78,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof IndexRouteImport parentRoute: typeof rootRouteImport } + '/demo/encrypt': { + id: '/demo/encrypt' + path: '/demo/encrypt' + fullPath: '/demo/encrypt' + preLoaderRoute: typeof DemoEncryptRouteImport + parentRoute: typeof rootRouteImport + } '/auth/signup': { id: '/auth/signup' path: '/auth/signup' @@ -89,6 +106,7 @@ const rootRouteChildren: RootRouteChildren = { IndexRoute: IndexRoute, AuthSigninRoute: AuthSigninRoute, AuthSignupRoute: AuthSignupRoute, + DemoEncryptRoute: DemoEncryptRoute, } export const routeTree = rootRouteImport ._addFileChildren(rootRouteChildren) diff --git a/src/routes/demo/encrypt.tsx b/src/routes/demo/encrypt.tsx new file mode 100644 index 0000000..2179bc8 --- /dev/null +++ b/src/routes/demo/encrypt.tsx @@ -0,0 +1,20 @@ +import { Layout } from '@/components/Layouts' +import { ProtectedRoutes } from '@/components/ProtectedRoutes' +import { RoutesPath } from '@/types/routes' +import { createFileRoute } from '@tanstack/react-router' + +export const Route = createFileRoute(RoutesPath.DEMO_ENCRYPT)({ + component: RouteComponent, +}) + +function RouteComponent() { + return ( + + +
+

Encrypt

+
+
+
+ ) +} diff --git a/src/types/routes.ts b/src/types/routes.ts index b9e570a..0552425 100644 --- a/src/types/routes.ts +++ b/src/types/routes.ts @@ -2,4 +2,5 @@ export enum RoutesPath { HOME = '/', SIGN_IN = '/auth/signin', SIGN_UP = '/auth/signup', + DEMO_ENCRYPT = '/demo/encrypt', } From ba2267a9151e2e23f5356b12ee9cdf4fb35391b7 Mon Sep 17 00:00:00 2001 From: jslyonnais <6282845+jslyonnais@users.noreply.github.com> Date: Wed, 18 Feb 2026 15:08:13 -0500 Subject: [PATCH 03/19] crypt form --- src/components/ui/textarea.tsx | 18 +++++++++++ src/routes/demo/encrypt.tsx | 5 ++- src/views/EncryptDemoView.tsx | 58 ++++++++++++++++++++++++++++++++++ 3 files changed, 78 insertions(+), 3 deletions(-) create mode 100644 src/components/ui/textarea.tsx create mode 100644 src/views/EncryptDemoView.tsx diff --git a/src/components/ui/textarea.tsx b/src/components/ui/textarea.tsx new file mode 100644 index 0000000..7f21b5e --- /dev/null +++ b/src/components/ui/textarea.tsx @@ -0,0 +1,18 @@ +import * as React from "react" + +import { cn } from "@/lib/utils" + +function Textarea({ className, ...props }: React.ComponentProps<"textarea">) { + return ( +