feat: nKode React + TypeScript SPA scaffold
- React + Vite + Tailwind CSS v4 + React Router - Keypad component: 10-digit pad with dot indicators, keyboard support, haptic feel - Auth pages: Login (email → keypad), Signup (email → method → keypad/key) - Home page: session info, practice keypad - Admin dashboard: placeholder stats + user management - Developer dashboard: OIDC client registration UI placeholder - WASM client wrapper: lazy loads from /wasm/, falls back to mock client - TypeScript type declarations for nkode-client-wasm package - Dark mode with system preference detection - Auth state management with localStorage persistence + auto-expiry - Code splitting: lazy-loaded route pages (~236KB main bundle) - Inter font, clean indigo/slate design system
This commit is contained in:
19
src/types/nkode-client-wasm.d.ts
vendored
Normal file
19
src/types/nkode-client-wasm.d.ts
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Type stub for the nKode WASM package.
|
||||
* Will be replaced by real types when the package is linked via `bun link`.
|
||||
*/
|
||||
declare module 'nkode-client-wasm' {
|
||||
export class NKodeClient {
|
||||
constructor(base_url: string);
|
||||
loginCode(email: string, passcode_bytes: Uint8Array): Promise<any>;
|
||||
loginKey(email: string, secret_key_hex: string): Promise<any>;
|
||||
registerCode(email: string, passcode_bytes: Uint8Array): Promise<void>;
|
||||
registerKey(email: string, secret_key_hex: string): Promise<void>;
|
||||
static generateSecretKey(): string;
|
||||
free(): void;
|
||||
}
|
||||
|
||||
export function init(): void;
|
||||
|
||||
export default function __wbg_init(module_or_path?: any): Promise<any>;
|
||||
}
|
||||
Reference in New Issue
Block a user