Server-less real-time dyadic chat app platform for psychology experiments.
Built for the Shared Reality hackathon group at 2023 MIND (https://github.com/hawkrobe/shared-reality). Original chat platform located here.
- Svelte 5 - Frontend framework
- Firebase - Database, auth & hosting
- TailwindCSS + DaisyUI - Styling
- Vite - Build tool
- Node.js (v18 or higher recommended)
- npm (comes with Node.js)
- A Firebase project (for database and hosting)
- Clone this repository:
git clone https://github.com/cosanlab/shared-reality-chat.git
cd shared-reality-chat- Install dependencies:
npm install- Create a
.envfile from the example:
cp .env.example .env-
Configure your environment variables in
.env:- Firebase config (required): Get these from your Firebase Console under Project Settings > General > Your apps > Web app
- LogRocket (optional): For session replay and debugging
- Prolific completion code (optional): For participant recruitment platform integration
Start the development server:
npm run devThe app will be available at http://localhost:3000
Build for production:
npm run buildPreview the production build locally:
npm run serveThe app is configured for Firebase Hosting with GitHub Actions CI/CD:
- Merges to
mainbranch trigger automatic deployment - Pull requests get preview deployments
To deploy manually, install the Firebase CLI and run:
npm install -g firebase-tools
firebase login
firebase deployKey configuration options in src/utils.js:
taskVersion- Version string for tracking experiment versionsmatchType- Matching algorithm:"high","low", or"random"NO_CHAT- Set totruefor no-chat vignette versionDEBUG_MODE- Set totrueto use separate dev collections in Firestore