# agent-test **Repository Path**: hello_lyy/agent-test ## Basic Information - **Project Name**: agent-test - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-02-08 - **Last Updated**: 2026-02-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Aura E-Commerce Platform > Spring AI powered e-commerce platform with intelligent agent capabilities [![Java](https://img.shields.io/badge/Java-17-orange)](https://openjdk.org/) [![Spring Boot](https://img.shields.io/badge/Spring%20Boot-3.2-green)](https://spring.io/projects/spring-boot) [![React](https://img.shields.io/badge/React-19.2-blue)](https://react.dev/) [![License](https://img.shields.io/badge/License-MIT-yellow)](LICENSE) --- ## ๐Ÿ“‹ Project Overview **Aura** is a demonstration e-commerce platform showcasing **10 core Spring AI Agent capabilities**: 1. โœ… **Prompt Engineering** - Brand personality 2. โœ… **RAG** - Product manual Q&A (PDF) 3. โœ… **Memory** - Multi-layer conversation memory 4. โœ… **Function Calling** - 8 core functions 5. โœ… **Complex Task** - Multi-step workflows 6. โœ… **Multi-Agent** - Agent collaboration 7. โœ… **Planning** - Task planning (ReAct) 8. โœ… **Tool Chain** - Tool orchestration 9. โœ… **Error Handling** - Smart error recovery 10. โœ… **Reflection** - Self-improvement --- ## ๐Ÿš€ Quick Start ### Prerequisites - **Java 17+** - **Node.js 18+** - **MySQL 8.0+** - **Maven 3.8+** - **OpenAI API Key** ### 1. Clone Repository ```bash git clone cd aura-quiet-living ``` ### 2. Setup Backend ```bash cd aura-backend # Configure environment cp .env.example .env # Edit .env and add your OPENAI_API_KEY and DB_PASSWORD # Create database mysql -u root -p < src/main/resources/data.sql # Run backend mvn spring-boot:run ``` Backend will start at `http://localhost:8080` ### 3. Setup Frontend ```bash cd .. # Back to root npm install npm run dev ``` Frontend will start at `http://localhost:5173` ### 4. Verify Open browser: `http://localhost:5173` --- ## ๐Ÿ“ Project Structure ``` aura-quiet-living/ โ”œโ”€โ”€ aura-backend/ # Spring Boot backend โ”‚ โ”œโ”€โ”€ src/main/java/com/aura/ โ”‚ โ”‚ โ”œโ”€โ”€ config/ # Configuration โ”‚ โ”‚ โ”œโ”€โ”€ controller/ # REST API โ”‚ โ”‚ โ”œโ”€โ”€ service/ # Business logic โ”‚ โ”‚ โ”œโ”€โ”€ repository/ # Data access โ”‚ โ”‚ โ”œโ”€โ”€ model/ # Entities & DTOs โ”‚ โ”‚ โ””โ”€โ”€ ai/ # AI agents & functions โ”‚ โ”œโ”€โ”€ src/main/resources/ โ”‚ โ”‚ โ”œโ”€โ”€ application.yml # Config file โ”‚ โ”‚ โ”œโ”€โ”€ data.sql # Database init โ”‚ โ”‚ โ””โ”€โ”€ manuals/ # Product PDFs โ”‚ โ””โ”€โ”€ pom.xml โ”‚ โ”œโ”€โ”€ aura-frontend/ # React frontend โ”‚ โ”œโ”€โ”€ components/ # React components โ”‚ โ”œโ”€โ”€ services/ # API services โ”‚ โ”œโ”€โ”€ types.ts # TypeScript types โ”‚ โ”œโ”€โ”€ package.json โ”‚ โ””โ”€โ”€ vite.config.ts โ”‚ โ”œโ”€โ”€ documents/ # All documentation โ”‚ โ”œโ”€โ”€ ARCHITECTURE.md # Architecture handbook โ”‚ โ”œโ”€โ”€ DEVELOPMENT_STANDARDS.md โ”‚ โ”œโ”€โ”€ ๅ›ข้˜Ÿๅˆ†ๅทฅ่ฏฆ็ป†ๆ–นๆกˆ.md โ”‚ โ”œโ”€โ”€ ๅ›ข้˜Ÿๅˆ†ๅทฅไธŽGitๅทฅไฝœๆต.md โ”‚ โ”œโ”€โ”€ ็ซ‹้กนไธŽๅฏ่กŒๆ€งๅˆ†ๆž.md โ”‚ โ””โ”€โ”€ ๅผ€ๅ‘่ง„่Œƒ.md โ”‚ โ”œโ”€โ”€ README.md # This file โ””โ”€โ”€ README_CN.md # Chinese README ``` --- ## ๐Ÿ› ๏ธ Technology Stack ### Backend - **Spring Boot 3.2** - Application framework - **Spring AI** - AI integration - **OpenAI (gpt-4o-mini)** - LLM - **MySQL 8.0** - Database - **SimpleVectorStore** - Vector storage for RAG - **Apache PDFBox** - PDF processing ### Frontend - **React 19.2** - UI framework - **TypeScript** - Type safety - **Vite** - Build tool - **Tailwind CSS** - Styling --- ## ๐Ÿ“š Documentation - **[Team Assignment (Detailed)](./documents/ๅ›ข้˜Ÿๅˆ†ๅทฅ่ฏฆ็ป†ๆ–นๆกˆ.md)** - Detailed 6-person team assignment โญ - **[Team Assignment & Git Workflow](./documents/ๅ›ข้˜Ÿๅˆ†ๅทฅไธŽGitๅทฅไฝœๆต.md)** - Git workflow and collaboration - **[Project Proposal](./documents/็ซ‹้กนไธŽๅฏ่กŒๆ€งๅˆ†ๆž.md)** - Project proposal and feasibility analysis (CN) - **[Development Standards (CN)](./documents/ๅผ€ๅ‘่ง„่Œƒ.md)** - Chinese development standards - **[DEVELOPMENT_STANDARDS.md](./documents/DEVELOPMENT_STANDARDS.md)** - English development standards - **[ARCHITECTURE.md](./documents/ARCHITECTURE.md)** - Complete architecture handbook (100+ pages) - **[aura-backend/README.md](./aura-backend/README.md)** - Backend development guide - **[aura-frontend/README.md](./aura-frontend/README.md)** - Frontend development guide - **[README_CN.md](./documents/README_CN.md)** - ไธญๆ–‡็‰ˆ README --- ## ๐ŸŽฏ Key Features ### E-Commerce - Product catalog with 6 premium products - Shopping cart - Order management - Mock payment (auto-success) ### AI Agent - **Intelligent Chat** - Natural conversation with brand personality - **Product Recommendations** - Context-aware suggestions - **Order Assistance** - Query status, modify address - **Knowledge Base** - Answer questions from product manuals (PDF) - **Multi-step Tasks** - Handle complex requests automatically --- ## ๐Ÿงช Testing ### Backend Tests ```bash cd aura-backend mvn test ``` ### Frontend Tests ```bash npm test ``` --- ## ๐Ÿ“Š API Endpoints ### Products - `GET /api/products` - List all products - `GET /api/products/{id}` - Get product details - `GET /api/products/search?q={keyword}` - Search products ### Orders - `POST /api/orders` - Create order (mock payment) - `GET /api/orders/{orderNumber}` - Get order details ### AI Assistant - `POST /api/ai/chat` - Send message to AI - `GET /api/ai/chat/history/{sessionId}` - Get chat history --- ## ๐ŸŽฌ Demo Scenarios See [ARCHITECTURE.md - Section 9](./ARCHITECTURE.md#9-ๆผ”็คบ่„šๆœฌ) for detailed demo scripts. **Quick Examples:** 1. **RAG**: "Aura Harmony ็š„่“็‰™ไผ ่พ“่ท็ฆปๆ˜ฏๅคšๅฐ‘๏ผŸ" 2. **Memory**: "ๆˆ‘ๆ”ถๅˆฐ็š„่ฟ™ไธช้ขœ่‰ฒไธๅฏน" (after mentioning an order) 3. **Function Calling**: "ๅธฎๆˆ‘็œ‹็œ‹่ฎขๅ•็Šถๆ€" 4. **Complex Task**: "ๆŠŠ่ฎขๅ•้€ๅˆฐๆ–ฐๅœฐๅ€ XXX" --- ## ๐Ÿ‘ฅ Team - **6 people**, **8-9 days** - See [ARCHITECTURE.md - Section 8](./ARCHITECTURE.md#8-ๅผ€ๅ‘่ฎกๅˆ’) for team division --- ## ๐Ÿ” Environment Variables Create `.env` files: **Backend** (`aura-backend/.env`): ```bash OPENAI_API_KEY=sk-your-api-key-here DB_PASSWORD=your-mysql-password ``` **Frontend** (`.env.local`): ```bash VITE_API_BASE_URL=http://localhost:8080/api ``` --- ## ๐Ÿ› Troubleshooting ### Backend won't start - Check MySQL is running - Verify `OPENAI_API_KEY` in `.env` - Check port 8080 is available ### Frontend can't connect to backend - Verify backend is running on port 8080 - Check CORS configuration in `application.yml` ### AI responses are slow - Normal for first request (cold start) - Check OpenAI API status - Consider using `gpt-3.5-turbo` for faster responses --- ## ๐Ÿ“ License MIT License - see [LICENSE](LICENSE) file --- ## ๐Ÿ™ Acknowledgments - [Spring AI](https://docs.spring.io/spring-ai/reference/) - [OpenAI](https://platform.openai.com/) - [React](https://react.dev/) --- ## ๐Ÿ“ž Support For questions or issues: - Check [ARCHITECTURE.md](./ARCHITECTURE.md) - Review [DEVELOPMENT_STANDARDS.md](./DEVELOPMENT_STANDARDS.md) - Open an issue on GitHub --- **Built with โค๏ธ by the Aura Team**