GithubHelp home page GithubHelp logo

bhavik-goplani / rps-survey Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 469 KB

๐Ÿ”ฌ The RPS Survey Platform facilitates research on decision-making dynamics in Rock-Paper-Scissors, exploring programmed probabilities and the generalized matching law to understand player behavior effectively.

Home Page: https://rps-survey.info/

JavaScript 1.22% TypeScript 97.95% CSS 0.83%
postgresql research-project supabase typescript nextjs

rps-survey's Introduction

Overview

The RPS Survey Platform is a web application designed to facilitate research into human decision-making processes, specifically within the context of the Rock/Paper/Scissors (RPS) game. This platform serves as a critical tool for the Applied Behavioral Science Lab at KU, enabling the exploration of the generalized matching law โ€” a principle that describes how individuals allocate their responses in situations where they are presented with concurrent choices.

The research conducted through this platform involves adult human subjects participating in a simulated RPS game against a computerized opponent. The opponent's responses are based on programmed probabilities that vary across different blocks of trials, allowing researchers to observe and analyze patterns in human response allocation.

The platform addresses the needs of researchers in conducting surveys and collecting data from participants. It provides a user-friendly interface for researchers to create surveys, analyze results, and manage participants. Additionally, participants can access the platform to take surveys and contribute data. Below, you'll find information about the project, including its features, database schema, and usage flow.

Note: This project was built for the Applied Behavioral Science Lab at KU to conduct the generalized matching law research.

Features

  • Survey Creation: Researchers can create and customize surveys according to their research needs.
  • Participant Management: Researchers can manage participants, including creation and deletion.
  • Role-Based Authentication: Implemented role-based authentication to provide different access levels for researchers and participants.
  • Data Collection: Utilized local storage and periodic batch data saving to ensure smooth data collection.
  • Data Analysis: Provides a view in Postgres to export as a CSV and perform data analysis.

Database Schema

Below is the schema of the PostgreSQL database used in the project:

Screen Shot 2024-03-08 at 12 34 14 PM

Flow of the Research Platform

  1. Requirements Gathering: Identified three main challenges - data integrity, participant user experience, and enabling participant access to the platform.
  2. Database Modeling: Utilized data normalization techniques to ensure data integrity, scalability, and simplified querying process.
  3. Role-Based Authentication: The platform implements role-based authentication with two roles: researcher and participant. This is managed in the auth schema of PostgreSQL, with two functions for creating and deleting participants. This gives role-based access to the API endpoints and database tables, ensuring that participants can access the platform to take part in surveys.
  4. Researcher point of view: Created a user-friendly dashboard for researchers to create surveys and links for participants.
  5. Participant point of view: Participants get an email with credentials to log in and participate in the survey. Data gets saved in local storage and is periodically sent in batches to the database even in the event of browser closure or interruptions.
  6. Deployment: The project is built using Next.js & Supabase and hosted using Vercel at RPS Survey App

Technologies Used

  • Next.js
  • PostgreSQL
  • Supabase
  • React
  • Typescript
  • HTML/CSS

rps-survey's People

Contributors

bhavik-goplani avatar

Watchers

 avatar

rps-survey's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.