How rishitsamala/voicesearch works
Project type & purpose (from file tree + README)
This is a server-rendered Java web application built with Spring Boot + Spring MVC + Spring Security, using JSP views and browser-side Web Speech API to:
• voice input (speech-to-text) in the browser,
• submit the resulting text as a search request to the server,
• return search results that are read back via voice-over (text-to-speech) in the browser.
It’s deployed (per README) on AWS Elastic Beanstalk.
Architecture implied by the file structure
Key layers/components visible in the repo:
Backend (Spring Boot / MVC / Security)
• ApplicationConfig.java, ViewResolverConfig.java: application + MVC view resolution (JSP).
• SecurityConfig.java, SecurityUserDetailsService.java: Spring Security authn/authz and user details integration.
• web/SearchController.java: MVC controller endpoints for the search pages/flows.
• model/SearchForm.java: MVC form-backing object / request model for search input.
• domain/User.java: persistent domain entity (likely JPA).
• repo/UserRepo.java: persistence adapter (Spring Data repository).
• service/UserService.java: business/service layer for user operations (and potentially used by security).
Frontend (JSP + JS)
• Views: src/main/webapp/WEB-INF/views/*.jsp
login.jsp, dashboard.jsp, personSearch.jsp, vehicleSearch.jsp
• JS (voice features):
voiceSearch.js, voicePersonSearch.js, voiceVehicleSearch.js (+ all.js)
• CSS: bootstrap.min_2017.css
Configuration / Build / Runtime
• pom.xml: Maven build, dependencies (Spring Boot, Spring Security, Spring MVC, JSP support, likely JPA).
• application.properties: environment configuration (server, DB, security, etc).
Web UI (JSP pages)
• login.jsp, dashboard.jsp, personSearch.jsp, vehicleSearch.jsp
Client Voice Layer (JavaScript)
• Web Speech API (SpeechRecognition + SpeechSynthesis) invoked by:
• voiceSearch.js
• voicePersonSearch.js
• voiceVehicleSearch.js
Spring Boot Application (Elastic Beanstalk instance)
• Spring MVC
• SearchController
• SearchForm
• ViewResolverConfig
• Spring Security
• SecurityConfig
• SecurityUserDetailsService
• Service Layer
• UserService
• Repository Layer
• UserRepo
• Domain
• User
AWS Elastic Beanstalk (hosting/runtime)
• ALB / EC2 / Auto Scaling as a single “Elastic Beanstalk Environment” boundary.
Architectural patterns to highlight (explicitly label them)
• Layered architecture: Controller → Service → Repository → DB
• Server-side rendered MVC: JSP via view resolver
• Security as cross-cutting concern: filter chain before MVC
• Client-enhanced UI: voice input/output is browser-side via Web Speech API; server does not do speech processing
Don’t overthink: split into more components rather than fewer
For this repo, accuracy comes from explicitly separating:
• Voice capture/voice playback (browser) from search handling (server)
• Security filter chain from controller
• JSP rendering from controller logic
• User persistence path (UserDetailsService → UserService → UserRepo → DB)