This project consists of a React frontend and an Express backend providing an AI-driven Mandarin chat tutoring experience. Learners progress through levels (beginner, intermediate, advanced, progression), practice conversation, and receive instant feedback, including optional English and pinyin output.
UI Components Used:
- Node.js 18+
- pnpm
- A Firebase project with Authentication and Firestore enabled
- An OpenAI API key
Frontend (.env file at frontend/.env): VITE_FIREBASE_API_KEY= VITE_FIREBASE_AUTH_DOMAIN= VITE_FIREBASE_PROJECT_ID= VITE_FIREBASE_STORAGE_BUCKET= VITE_FIREBASE_MESSAGING_SENDER_ID= VITE_FIREBASE_APP_ID= VITE_API_BASE_URL= Example: http://localhost:8080
Backend (.env file at backend/.env): PORT=8080 OPENAI_API_KEY=
- Clone the repo: git clone
- Install dependencies in each directory: In frontend/ run: pnpm install In backend/ run: pnpm install
cd frontendpnpm run dev- Opens at http://localhost:5173
cd backendpnpm run devorpnpm run start- API server at http://localhost:8080
- Sign up or log in via the frontend.
- Choose a chat mode.
- Read the generated scenario.
- Type your Mandarin message. (speaking not yet available)
- Receive AI responses at your level.
- Toggle English + pinyin output as needed.
- End session to get detailed feedback and per-message grading.
- Review results and new words learned.