Coding
PromptBeginner5 minmarkdown
Markdown Converter
Agent skill for markdown-converter
21
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Sign in to like and favorite skills
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a Japanese sales simulation application (営業シミュレーション) that provides AI-powered role-playing scenarios for sales training. The system uses Dify AI platform for intelligent conversation and provides feedback on sales performance.
# Start both frontend and backend with Docker Compose docker-compose up --build # Alternative: Start services individually cd backend && python app.py # Backend on port 8000 cd react-app && npm start # Frontend on port 3000
cd react-app npm install # Install dependencies npm start # Development server (port 3000) npm run build # Production build npm test # Run tests with Jest/Testing Library
cd backend pip install -r requirements.txt # Install Python dependencies python app.py # Start Flask server (port 8000)
POST /ask - Send messages to AI simulationGET /history - Retrieve conversation historyGET /simulations - Get simulation scenariosPOST /review - Get AI feedback on conversations/react-app/src/)├── components/ # Reusable UI components │ ├── auth/ # Login/Register forms │ └── layout/ # Layout components (DashboardLayout, Chatboard) ├── pages/ # Route-level components │ ├── Login/ │ ├── Dashboard/ │ ├── SimulationSetup/ │ ├── SimulationChat/ # Main chat interface │ ├── SimulationResult/ │ └── ExistingCases/ ├── contexts/ # React Context providers (AuthContexts) ├── api/ # API communication layers │ ├── chatApi.ts # Dify chat integration (fetch-based) │ ├── http.ts # Axios client with interceptors │ └── simulations.ts # Simulation data API ├── types/ # TypeScript type definitions ├── state/ # Application state management └── themes/ # Material-UI theme configuration
/backend/)├── app.py # Main Flask application ├── db/ # Database files and utilities │ ├── database.db # SQLite database │ ├── *.json # Simulation scenario data │ └── make_init_db.py # Database initialization └── requirements.txt # Python dependencies
The codebase uses two HTTP client patterns:
/pages/[PageName]/index.ts for clean imports/components/ organized by domain/types/AuthContexts.tsx)/themes/themes/colors.ts/setup) - Configure simulation parameters/categories/:orgId/chats/:chatId) - Role-play conversation/review) - AI-generated performance feedback/sim/:id/result) - Detailed analysissimulation_status - Active simulationscontact_persons - Customer contact informationcustomers - Company/client data# Backend (.env file) DIFY_API_BASE=https://api.dify.ai # Dify platform URL DIFY_API_KEY=your_api_key # Main simulation API key DIFY_REVIEW_API_KEY=your_review_key # Review/feedback API key ENDPOINT=your_db_endpoint # Database API endpoint # Frontend REACT_APP_API_BASE=http://127.0.0.1:8000 # Backend URL
Frontend uses Jest + React Testing Library:
cd react-app npm test # Run tests npm test -- --coverage # With coverage report
/react-app/src/pages/NewPage/NewPage.tsx and export in index.tsApp.tsxSimulationChat.tsxchatApi.ts with conversation tracking via ChatStoretypes/index.tsbackend/db/backend/app.py