https://github.com/roundtableAI/roundtable-js Skip to content Navigation Menu Toggle navigation Sign in * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + GitHub Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions By size + Enterprise + Teams + Startups By industry + Healthcare + Financial services + Manufacturing By use case + CI/CD & Automation + DevOps + DevSecOps * Resources Topics + AI + DevOps + Security + Software Development Explore + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Enterprise + Enterprise platform AI-powered developer platform Available add-ons + Advanced Security Enterprise-grade security features + GitHub Copilot Enterprise-grade AI features + Premium Support Enterprise-grade 24/7 support * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} roundtableAI / roundtable-js Public * Notifications You must be signed in to change notification settings * Fork 2 * Star 98 Open-source research-grade programmatic survey software surveys.roundtable.ai License Apache-2.0 license 98 stars 2 forks Branches Tags Activity Star Notifications You must be signed in to change notification settings * Code * Issues 9 * Pull requests 1 * Actions * Security * Insights Additional navigation options * Code * Issues * Pull requests * Actions * Security * Insights roundtableAI/roundtable-js This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main BranchesTags Go to file Code Folders and files Name Name Last commit Last commit message date Latest commit History 73 Commits assets/images assets/images examples examples library library CODE_OF_CONDUCT.md CODE_OF_CONDUCT.md CONTRIBUTING.md CONTRIBUTING.md LICENSE LICENSE README.md README.md index.js index.js package-lock.json package-lock.json package.json package.json webpack.config.cjs webpack.config.cjs View all files Repository files navigation * README * Code of conduct * Apache-2.0 license Roundtable Logo Roundtable Programmatic survey software Cloud editor # Documentation GitHub Stars NPM Downloads Hacker News Cloud Editor Twitter Follow Join Slack LinkedIn Follow RoundtableJS is an open-source JavaScript library for building complex surveys, forms, and data annotation tasks. It's designed to be simple but completely customizable. We make it easy to add complex logic (e.g. branching, skipping, looping), modify question types, and fully customize the design. Features * Designed for the Modern Web: We're designed in JavaScript and leverage its asynchronous functionality for managing survey logic. For example, rather than determining this logic based on callbacks that trigger when a page is submitted, our library builds the timeline in an async function which means the logic flows intuitively from top to bottom. * Developer-Friendly: We are open-source and API-first. The idea for RoundtableJS arose by seeing how difficult it was to integrate Roundtable's API into other survey software. We want the open-source offering to include a robust plugin ecosystem where people can introduce new question types, integrate with tools like CRMs, and control how data is stored and processed. * AI-Native Functionality: Our cloud offering has AI-native features such as natural language programming and automated fraud detection. We're continuously expanding our AI features. Let us know what tools you'd like to see! [?] Examples Here are some example surveys built with RoundtableJS. All code is in the examples/studies directory. * Customer Feedback Survey * Product Market Fit Survey * Book a Demo Form * Enterprise Market Research Survey * Data Annotation Task Quick Start Installation Option 1: npm 1. Install roundtable-js using npm: npm install roundtable-js Option 2: Git 1. Clone the repository: git clone https://github.com/roundtableAI/roundtable-js.git 2. Navigate to the project directory: cd roundtable-js 3. Include the necessary files in your project. Option 3: CDN 1. Include the following script tag in your HTML: Usage 1. Import the necessary modules in your JavaScript file for npm or Git installations: import Survey from 'roundtable-js/core/survey.js'; import SingleSelect from 'roundtable-js/question_types/singleSelect.js'; For CDN installation, ensure the script is loaded and use the global RoundtableJS object: const { Survey, SingleSelect } = RoundtableJS; 2. Create a survey instance and add pages with questions: // Define an asynchronous function to run the survey async function runSurvey() { // Create a new Survey instance with a specific participant ID const survey = new Survey({ participantId: 'participant_123' }); // Define the first question as a single-select question with two options const question1 = new SingleSelect({ id: 'question1', text: 'A question', options: ['Option 1', 'Option 2'], }); // Define the second question as a single-select question with two options const question2 = new SingleSelect({ id: 'question2', text: 'A second question', options: ['Option 1', 'Option 2'], }); // Show the first page with the first question and wait for it to be answered await survey.showPage({ id: 'page1', elements: [question1] }); // This code runs only after the first page is completed console.log('Page 1 completed'); // Show the next page with the second question and wait for it to be answered await survey.showPage({ id: 'page2', elements: [question2] }); // Finish the survey once all pages are completed and display an end message survey.finishSurvey('Thank you for completing the survey!'); } // Start the survey by calling the runSurvey function runSurvey(); 3. Set up your HTML: