CommPractice is a scenario-based communication practice web app built with React, TypeScript, and Vite. It helps learners practice everyday conversations in a safe, low-pressure environment through interactive role-play.
- Guided scenario practice with structured checkpoints
- Airport check-in flow in voice mode
- Airport check-in flow in AAC mode
- Role-based onboarding for learners, caregivers, and therapists
- Live multiplayer matchmaking and room flow
- Optional AI-assisted feedback with a local fallback when no Groq key is configured
- React 18
- TypeScript
- Vite
- Tailwind CSS
- shadcn/ui and Radix UI
- Framer Motion
- TanStack Query
- Firebase Auth and Firestore
- Vitest and Testing Library
api/ Serverless endpoints
public/ AAC and static assets
src/components/ Reusable UI and feature components
src/data/ Scenario data
src/hooks/ Custom hooks
src/lib/ Shared client logic and storage helpers
src/pages/ Main app screens and flows
src/test/ Test setup and test files
- Node.js 18+
- npm 9+
- A Firebase project for auth and Firestore
- Clone the repository and enter the project directory.
- Install dependencies:
npm install- Copy the example environment file:
cp .env.example .env- Fill in your own environment values:
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_FIREBASE_MEASUREMENT_ID=...
VITE_GROQ_API_KEY=...- Start the development server:
npm run devThe Vite dev server runs on http://localhost:8080 in this repo.
- Multiplayer signaling uses Firebase.
- TURN credentials are fetched from
api/turn-credentials.ts. - To enable TURN on a deployed serverless runtime, set
METERED_API_KEYandMETERED_DOMAIN. - If the TURN endpoint is unavailable, the app falls back to public STUN servers.
- Open the app and log in or create a profile.
- Choose a role during registration: learner, caregiver, or therapist.
- Learners and caregivers land on the mode selection screen.
- Choose
Solo Practiceto run a guided scenario, then pick voice or AAC mode. - Choose
Multiplayerto enter matchmaking and join a live practice room. - Therapists are routed to the therapist dashboard after sign-in.
npm run devstarts the local dev servernpm run buildcreates a production buildnpm run build:devcreates a development-mode buildnpm run previewpreviews the production build locallynpm run lintruns ESLintnpm testruns the Vitest suite oncenpm run test:watchruns Vitest in watch mode
Run tests:
npm testTest files and setup are in src/test.
Production deployment is hosted on Vercel:
- Keep
.env,.vercel/,.cert/, and key/cert files out of Git. - Use your own Firebase and Metered values in local or deployment env vars.
- Review any screenshots, posters, or docs before publishing if they contain team or project-specific details.
- Li Xuanming
- Lin Muxi
- Yang Boxiang
- Yu Letian
- Zhang Jiayi