Passkeyd is a standard Next.js Typescript application. Tested and verified on Node 21.
File tree below lists the location of the most important files and folders
passkeyd
│ # (The Client) Next.js app router root
├── app
│ │ # client components (_ prefix to escape file based routing)
│ ├── _components
│ │ │ # Contains all passkeyd related components
│ │ └── auth
│ │ # Account page (logged in)
│ ├── account
│ │ # html,body,header etc.
│ ├── layout.tsx
│ │ # JWT auth middleware
│ ├── middleware.tsx
│ │ # Landing page
│ └── page.tsx
│ # Prisma schema, migrations folder and client re-export.
├── prisma
│ # (The Backend)
└── server
│ # Server actions
├── actions
│ │ # All webauthn specific server endpoints
│ ├── webauthn
│ │ ├── challenge.tsx
│ │ ├── credential.tsx
│ │ ├── login.tsx
│ │ ├── recovery.tsx
│ │ └── register.tsx
│ │ # Request recovery email
│ ├── email.tsx
│ │ # Access current session and logout actions
│ └── session.tsx
│ # Database queries and mutations
├── db
│ # Recovery helper functions
├── recovery.ts
│ # Session helper functions
└── session.ts