ShopGuard AI is a portfolio MVP that includes a simple React + TypeScript storefront and a Java Spring Boot backend, plus a standalone Java Selenium automation framework with TestNG and AI-assisted failure analysis.
- Customer, Seller, and Admin roles
- Product browsing, search, categories, cart, mock checkout, order history
- Seller product management
- Admin user/product/order overview
- JWT authentication
- Java Selenium automation with Page Object Model
- TestNG + ExtentReports reporting
- Automatic screenshot capture on failure
- AI Failure Analyzer with OpenAI fallback
- frontend/: React + Vite + TypeScript + Tailwind CSS
- backend/: Java Spring Boot REST API with H2 database
- automation/: Java Selenium TestNG framework
- React, TypeScript, Vite, Tailwind CSS
- Java, Spring Boot, Spring Security, JPA, H2
- Selenium WebDriver, TestNG, WebDriverManager, ExtentReports
- Start backend
cd backendmvn spring-boot:run
- Start frontend
cd frontendnpm install- Copy
.env.exampleto.envand setVITE_API_BASE_URLif needed, for example:VITE_API_BASE_URL=http://localhost:8080/api
npm run dev
Default frontend URL: http://localhost:5173
Default backend URL: http://localhost:8080
The frontend is wired to the backend using frontend/src/services/api.ts and supports VITE_API_BASE_URL for deployed environments.
cd automationmvn test
Set environment variable OPENAI_API_KEY to use AI failure analysis. If not set, the automation framework uses a local fallback analyzer.
- Add REST Assured API test module
- Replace H2 with MySQL
- Add GitHub Actions CI workflow