Skip to content
Dae Houlihan edited this page Apr 10, 2025 · 4 revisions

jsPsych-Firebase-Firestore-Prolific-Vite Template

Welcome to the wiki for the serverless jsPsych template. This template provides a modern development environment for building online psychology experiments using TypeScript, jsPsych, Firebase, and Prolific.

Overview

This template combines several key technologies to create a robust development environment:

  • TypeScript for type-safe JavaScript development
  • Vite for fast, modern bundling
  • jsPsych for psychology experiment flow
  • TailwindCSS for modern styling
  • Firebase/Firestore for serverless backend
  • Prolific integration for participant recruitment

Typical Development Sequence

  1. Fork the repository and run experiment locally with the mock database (simulateMockDatabase = true in appConfig.ts)
  2. Configure your IDE (VS Code recommended)
  3. Update info in appConfig.ts (name, email, etc.)
  4. Build your experiment using jsPsych
  5. Set up Firebase project and Firestore database
  6. Add Firebase credentials to creds.ts
  7. Test with Firestore by setting simulateMockDatabase = false
  8. When ready, deploy to Firebase
  9. Test data collection and retrieval in production
  10. Set up Prolific study and add completion code to creds.ts
  11. Deploy final experiment version and collect data

Quick Links

Core Documentation

Advanced Guides

Tutorials

Getting Started

  1. Fork this template: Use this template > Create a new repository
  2. Clone your fork: git clone https://github.com/YOUR-USERNAME/YOUR-REPO.git
  3. Install dependencies: yarn install (see Installation for more details)
  4. Start development server: yarn dev
  5. Open your browser to the URL shown in the terminal (usually http://localhost:5173)

See the Installation page for detailed setup instructions.

Clone this wiki locally