How roberto8695/captcha-accesible works
Project type and purpose
• This is a Next.js (v13+) React application focused on building an accessible CAPTCHA system with advanced audio/voice features.
• The README confirms it was bootstrapped with create-next-app and runs purely as a Next.js front-end (no separate “backend” folder or API routes).
• The many Markdown files (e.g., VOICE_IMPROVEMENTS.md, SOLUCION_GOOGLE_VOICE.md) and custom hooks (useSpeech*, useAccessibility) indicate the core feature: generating and playing CAPTCHAs via the Web Speech API and/or Google TTS, with a fallback for local voices.
File structure
• src/app/ → Next.js App Router:
• page.tsx (home)
• captchasordos/page.tsx (the accessible CAPTCHA route)
• layout.tsx, globals.css
• src/components/ → UI components responsible for:
• Rendering the visual CAPTCHA (CaptchaComponent.tsx)
• Rendering and switching to an accessible version (AccessibleCaptchaComponent.tsx)
• A selection modal (CaptchaSelectionModal.tsx)
• Hover tests and sound feedback modules (HoverTestComponent.tsx, SoundFeedback*.tsx)
• src/hooks/ → Business-logic hooks abstracting speech and accessibility:
• useAccessibility.ts
• Multiple speech hooks: useSpeech.ts, useSpeechGoogleOptimized.ts, useSpeechSimple.ts, etc.
• Other top-level files: Next.js configs (next.config.ts, postcss.config.mjs), linting, package.json, and a public/ folder for static assets.
README for additional insights
• Confirms use of Next.js, fonts optimization via next/font.
• No mention of custom API routes or external servers—implies speech integration occurs client-side via browser APIs or direct calls to external TTS services.
Essential details to capture
• File-system routing under src/app and how it translates to endpoints.
• Distinction between SSR-rendered pages and client‐only logic in hooks.
• The dual-path audio generation (browser’s Web Speech API vs. Google TTS).
• How static assets (public folder, optimized fonts) fit into the serving pipeline.