This is the Java code behind Integrate SurveyJS with Java, as a Spring Boot application you can run example by example. Each example of that page has a page here that runs the real SurveyJS component against these controllers, with a short "Try this" list, a live request log, a "What the server stored" panel and the code that just ran. SurveyJS has no backend of its own, so treat these as starting points for your own app.
- SurveyJS demos: app.demos.surveyjs.io
- Backend integration examples on the SurveyJS website: surveyjs.io/backend-integration/examples
- The same examples for other platforms: PHP (Laravel), ASP.NET Core, Node.js (Express), Python (FastAPI), Next.js
There is no hosted catalog for this repository yet.
You need a JDK 21 or later. Maven isn't a prerequisite: the Maven wrapper (mvnw) downloads it on the first run. Docker runs the SurveyJS service for the four Run Server-Side Workflows examples, and Node.js 22 or later is only for the browser tests, the CSS build and the contract test (see Prerequisites).
git clone https://github.com/surveyjs/surveyjs-java-spring-boot.git
cd surveyjs-java-spring-boot
.\mvnw spring-boot:run # http://127.0.0.1:8000git clone https://github.com/surveyjs/surveyjs-java-spring-boot.git
cd surveyjs-java-spring-boot
./mvnw spring-boot:run # http://127.0.0.1:8000The first start creates and seeds the H2 database in storage/database/. java -jar target/surveyjs-java-spring-boot.jar (after ./mvnw -DskipTests package) is the same app. Run either from the repository root: the app reads shared/ and surveyjs-integration.json from there, and stops with "Run the app from the repository root (shared/CONTRACT not found)" anywhere else.
- Fill Forms Together and Edit Forms Together use WebSocket relays that run inside the app, on its port (
/ws/rooms/<id>and/ws/forms/<id>). There is nothing else to start. - Run Server-Side Workflows (validate, lint, PDF, extract) call the SurveyJS service, SurveyJS Server. Start it with
docker compose up -d surveyjs(it listens onhttp://localhost:3010), setVALIDATE_RESPONSES=trueandLINT_DEFINITIONS=trueinsettings.envto switch Validate Responses and Lint JSON Schemas on, then restart the app. Extract Responses from Documents also needs an AI provider for the service (SURVEYJS_AI_PROVIDERinsettings.env, its key in.env, which you copy from.env.example). - The tests:
./mvnw test: the JUnit tests, about a minute, no browser and no network (the service is mocked). The build compiles with-Xlint:deprecation -Werror, so a deprecated API fails it../mvnw -q -DskipTests package exec:java@contract: the shared contract test against the jar and a fresh database (SERVICE=onwith the service running;"-Dexec.args=--smoke"for the smoke test;"-Dexec.args=--steps save-response,dashboard"for some examples).npm ci,npx playwright install chromiumonce, thennpm run test:browser(after./mvnw -q -DskipTests package): the shared Playwright specs../mvnw -q test-compile exec:java@check: the manifest, the regions,shared/and the pins.
Before anything else starts, the app checks that nothing answers on its port, and once it is up it logs the folder it serves and its <branch>@<commit>:
Serving C:\src\surveyjs-java-spring-boot (main@4a96b83) on http://127.0.0.1:8000
- A JDK 21 or later (Temurin 25 recommended), with
javaonPATHorJAVA_HOMEset.-
Without one,
mvnwstops with Maven's own "The JAVA_HOME environment variable is not defined correctly". -
With an older JDK, the Maven Enforcer stops the build:
[ERROR] Rule 0: org.apache.maven.enforcer.rules.version.RequireJavaVersion failed with message: [ERROR] Java 21 or newer is required. Install a JDK 21+ and set JAVA_HOME. -
java -jaron an older JVM fails with "UnsupportedClassVersionError: io/surveyjs/Application has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 61.0": the jar was compiled for Java 21 (class file version 65), and thatjavais older (61 is Java 17). Checkjava -version.
-
- Maven comes with the wrapper: the first
./mvnwdownloads Maven 3.10.1 into~/.m2/wrapper, which needs internet access once. - Docker for the SurveyJS service (
docker compose up -d surveyjs). Without it, the four Run Server-Side Workflows examples answer503"SurveyJS service is not running at http://localhost:3010", and everything else works. - Node.js 22 or later, only for the browser tests, the CSS build and the contract and smoke tests (they are
shared/*.mjs).npm cion an older Node stops with npm's ownEBADENGINEerror (enginesinpackage.json,engine-strictin.npmrc). Running the app never needs Node.
On Windows:
-
Install Temurin 25 from adoptium.net or with
winget install EclipseAdoptium.Temurin.25.JDK.javaonPATHis enough for the wrapper. The installer can also setJAVA_HOME(its "Set JAVA_HOME variable" feature, which is not selected by default); check withecho $env:JAVA_HOME. -
After installing a JDK or Node, restart your editor, not only its terminal: VS Code's terminals inherit VS Code's environment, so a terminal in an editor started before the install doesn't see the new
PATH. To refresh the current PowerShell terminal instead:$env:Path = [Environment]::GetEnvironmentVariable('Path','Machine') + ';' + [Environment]::GetEnvironmentVariable('Path','User') java -version
-
.\mvnwrunsmvnw.cmd, a batch file. AfterCtrl+Cstops the app, cmd may ask "Terminate batch job (Y/N)?": answerY. -
mvnw packagecan't replacetarget/surveyjs-java-spring-boot.jarwhilejava -jarruns it. Stop the app first;spring-boot:rundoesn't lock the jar. -
The app listens on
127.0.0.1by default (APP_HOST), so Windows Defender Firewall doesn't ask whether Java may accept network connections. -
Set a variable for one run like this, or put it in
settings.env:$env:APP_PORT=8001; .\mvnw spring-boot:run
APP_PORT=8001 ./mvnw spring-boot:run
Tomcat reports a busy port only after the whole application context has started, and by then this app has created and seeded its database; a second copy in the same folder fails earlier still, on H2's file lock. So the app connects to its port before Spring creates anything, and stops in Boot's usual failure block:
***************************
APPLICATION FAILED TO START
***************************
Description:
Port 8000 is already in use. Another copy of this app (another checkout or branch?) may be running. Stop it, or set APP_PORT.
Action:
Stop the other copy (README: Stop everything), or start this one on another port, for example with APP_PORT=8001.
Under spring-boot:run, Maven adds its own lines after it ("BUILD FAILURE", "Process terminated with exit code: 1").
Ctrl+C in the terminal, then docker compose down for the service. To find a server left running in another terminal or checkout:
Get-NetTCPConnection -LocalPort 8000 -State Listen | Select-Object OwningProcess
Stop-Process -Id <OwningProcess>lsof -i :8000
kill <PID>- Check the branch out in its own folder, with
git worktree add ../surveyjs-java-spring-boot-pr <branch>(for a pull request,git fetch origin pull/<number>/head:pr-<number>first) or a second clone. Each checkout has its own.env,storage/andtarget/. Two checkouts never share aDATA_DIR: H2 locks its files. - Run one checkout on the default port at a time: stop the other one first, or start the second with
APP_PORT=8001. - The SurveyJS service is shared:
docker-compose.ymlnames its projectsurveyjs-java, so every checkout manages the same container. - The page says which checkout answered: "Running
<branch>@<commit>" under the catalog's footer buttons and at the end of every example's Description panel.
docker compose up --build # http://127.0.0.1:8000, with the SurveyJS service next to itThe image (Dockerfile) builds the jar with the Maven wrapper on eclipse-temurin:25.0.5_8-jdk and runs it on eclipse-temurin:25.0.5_8-jre as a non-root user, with java -jar as PID 1, so docker compose stop shuts it down gracefully. Next to the jar it copies shared/, surveyjs-integration.json and the example sources the Code tab shows. Its environment sets APP_HOST=0.0.0.0, DATA_DIR=/app/storage and SPRING_PROFILES_ACTIVE=production (templates cached, no error details, no banner, logs on stdout); real environment variables win over settings.env, which the image includes. .env isn't copied into the image: docker compose passes the private keys in. It creates and seeds the database on its first start. Its one volume, /app/storage, holds the database, the uploads, the visitor sandboxes and the relay snapshots. GET /up answers 200 {"status":"ok"} without touching the database.
One process, many visitors. Run one JVM per data volume: the relay rooms, the countries cache and the demo's AI counter live in its memory, and H2 lets one process open the database anyway. Concurrency comes from virtual threads (spring.threads.virtual.enabled=true): an extraction that waits up to 120 seconds for the service parks its virtual thread, and other visitors are served meanwhile. Scaling out to several processes or hosts needs a shared room store (Redis pub/sub, for example) and a server database (PostgreSQL with a text column; jsonb normalizes the document); both are out of scope here.
On Windows, Docker Compose 5 can't build a service from a git URL (failed to evaluate path "https://github.com/…"), which the surveyjs service is: it hands the URL to the builder as a file path. Let Compose print the build and give it to the builder yourself, then start without building:
docker compose build --print | docker buildx bake -f -
docker compose up -d --no-buildLinux and macOS (and CI) build with docker compose up --build as above.
server.forward-headers-strategy=native makes Tomcat's RemoteIpValve trust X-Forwarded-For, X-Forwarded-Proto and X-Forwarded-Port from its internal proxies (loopback and private address ranges, which cover Docker's networks). Behind a TLS proxy, the pages' absolute URLs and the relays' wss:// URLs then use the scheme the visitor sees, the relays' origin check compares the page's origin with it, and the demo's Secure cookies work. In your own production, set server.tomcat.remoteip.internal-proxies to the proxy's address and don't publish the app's port. The relays are on the app's own host and port, so the proxy needs no extra route, only WebSocket upgrades passed through on /ws/. For Traefik, next to your entry point and TLS labels:
services:
app:
labels:
- traefik.http.routers.surveyjs.rule=Host(`example.com`)
- traefik.http.services.surveyjs.loadbalancer.server.port=8000Traefik passes WebSocket upgrades on by default; nginx needs proxy_set_header Upgrade $http_upgrade; and proxy_set_header Connection "upgrade"; on /ws/. RELAY_URL and EDIT_RELAY_URL are only needed when /ws/ is served from another origin. The SurveyJS service stays internal (expose: ["3000"]): only the app calls it.
config/SurveyJsProperties.java is one @ConfigurationProperties("surveyjs") record, bound once and injected; no other class reads the environment. application.properties maps the cross-platform variable names to it (surveyjs.service-url=${SURVEYJS_SERVICE_URL:http://localhost:3010}), so environment variables, the two settings files and the contract runner use the same words as the other platforms. settings.env is committed and holds every setting except the private keys. .env is git-ignored and holds only the private keys: SURVEYJS_LICENSE_KEY, AI_API_KEY, OPENAI_API_KEY and ANTHROPIC_API_KEY (copy .env.example to it). Spring Boot reads both as properties files (spring.config.import=optional:file:settings.env[.properties],optional:file:.env[.properties]): KEY=value lines, no export, and quotes are taken literally. Variables set in the environment win, then .env, then settings.env. Switches accept 1, true, on or yes; a blank value means unset.
| Variable | Default | What it does |
|---|---|---|
APP_PORT, APP_HOST |
8000, 127.0.0.1 |
Where the app listens. |
DATA_DIR |
storage |
The H2 database, uploads, sandboxes and relay snapshots. |
SURVEYJS_SERVICE_URL |
http://localhost:3010 |
The SurveyJS service (docker compose up -d surveyjs). In Compose, the app uses http://surveyjs:3000. |
VALIDATE_RESPONSES |
false |
Validate Responses: ValidateResponseController replaces SaveResponseController. |
LINT_DEFINITIONS |
false |
Lint JSON Schemas: LintDefinitionController replaces the PUT of CreatorLoadSaveController. |
SURVEYJS_AI_PROVIDER, SURVEYJS_AI_MODEL, SURVEYJS_OLLAMA_BASE_URL, OPENAI_API_KEY, ANTHROPIC_API_KEY |
empty | Extract Responses from Documents: Compose passes them to the service as AI_PROVIDER, AI_MODEL and OLLAMA_BASE_URL (openai, anthropic or ollama). The app reads them only for the page's banner. |
AI_BASE_URL, AI_API_KEY, AI_MODEL |
OpenAI, empty, gpt-4o-mini |
Translate with AI: any OpenAI-compatible /chat/completions endpoint. Without a key, /api/translate answers 501. |
SURVEYJS_LICENSE_KEY |
empty | Calls setLicenseKey() on every page. Without it, the commercial components show a licence banner. The service at its pinned revision ignores it, so server PDFs carry the SurveyJS alert banner. |
RELAY_URL, EDIT_RELAY_URL |
empty | The relays' origin when a proxy serves /ws/ elsewhere, for example wss://example.com. Empty: the page's own origin. |
DEMO_MODE |
false |
The hosted demo's visitor sandboxes (below). |
SURVEYJS_BUILD |
from git | The <branch>@<commit> the pages show as "Running …". Deploys set it themselves. |
SURVEYJS_DOCS, SURVEYJS_GITHUB |
the Java docs page, this repository | Where the pages link. |
Each example is two or three files you can read on their own. The full explanation is in the docs.
src/main/java/io/surveyjs/examples/<Pascal>Controller.java: the example's@RestController(or@Controller), the server code the docs show.ValidateResponseControllerandSaveResponseController, andLintDefinitionControllerandCreatorLoadSaveController, are swapped by the switches (@ConditionalOnSwitch).FillTogetherRelay.javaandEditTogetherRelay.javaare the two relays, rawTextWebSocketHandlers; their rooms are inrelay/.shared/client/<slug>.js: the example's client code, a plain ES module, the same file on every platform.src/main/resources/templates/examples/<slug>.html: the example's page (Thymeleaf with the Layout Dialect): its description, the "Try this" list and the component.integration/: small helpers some controllers call, so the code the docs show stays about SurveyJS. They aren't demo code:StoredJson.java:write(),insertResponse(),put()and the UTC timestamp (see below).SurveyJsService.java:post(path, body, timeout)with itsRestClientper timeout, the 503, 504 and 502 when the service doesn't answer, and the logging.AiTranslation.java: the call to your OpenAI-compatible provider.FileType.java,FileStore.java,TtlCache.java: file types by their first bytes, uploads on disk, and the countries cache.
security/(User, theUserStorebehind Spring Security,Permissions.canReadFile(),SecurityConfig),storage/(the H2DataSourceand the seeder),web/(the error shapes and the request size limit) andconfig/.
To copy an example, copy its controller and the helpers it imports. The code the docs show is cut from these files between // #region sjs:<slug>.server and // #endregion (and // #region sjs:<slug>.client in the client modules). surveyjs-integration.json lists every example's files and regions; exec:java@check verifies them. The controllers use JdbcClient with plain parameterized SQL, and no JPA entities, so that a response stays visibly one JSON document; Spring Data JDBC or JPA with a JSON text column works just as well.
shared/ holds what every platform repository uses byte for byte: the client modules, the form definitions, samples and seed data, the page UI (shared/ui/), and the contract, smoke and browser tests. It is a copy of surveyjs-php-laravel's shared/ at the commit in shared/UPSTREAM; exec:java@check compares it with shared/SHA256SUMS. Don't edit it here: send a fix to that repository, then copy shared/ again. .gitattributes keeps it in LF on Windows checkouts too, or every hash would fail.
The text in an example's Description panel is the description fragment of src/main/resources/templates/examples/<slug>.html. It can hold several paragraphs, links and other markup:
<th:block layout:fragment="description">
<p>Your custom description.</p>
<p>More details with <strong>formatting</strong>.</p>
</th:block>The "Try this" list is the try fragment; the layout is templates/layouts/example.html. The catalog cards use need from surveyjs-integration.json for their "Use when" text. Thymeleaf caches the templates, and there is no DevTools, so restart the app to see an edit. Rebuild the stylesheet too (see Front end) if you used a Tailwind class no other template uses.
A response, a definition, saved progress and variable presets are each one JSON document, stored as text and returned as stored.
@RequestBody JsonNode, not a DTO. A Spring developer reaches for a record or POJO there, but binding to a class drops the keys it doesn't declare and coerces values. The storing handlers take Jackson'sJsonNodeinstead, which keeps every key,{},[{}],null,"", whitespace inside strings and1.0. A comment in each handler says why. Translate with AI stores nothing, so it reads a record.- Jackson as Boot configures it. The controllers use the auto-configured
JsonMapper(Jackson 3); it rejectsNaNand trailing tokens, which answer400 { "error": "The request body is not valid JSON" }.StoredJson.write()writes"naïve — 東京"as it is. Digits beyond a double are rounded, as the browser'sJSON.parserounds them. CLOBcolumns. The documents areCLOB, never H2'sJSONtype, whose values come back as bytes.- Dates are strings.
created_atis ISO 8601 UTC to the second (2026-11-17T13:36:06Z, fromInstant), so the dashboard's date filters are string comparisons.LocalDateTimehas no zone, andOffsetDateTime.toString()writes the local offset and nanoseconds. - Under
/api, every error is{ "error": … }, also Spring's own (web/ApiErrors.javafor what a handler raises,web/ErrorPages.javafor what never reaches one): a 404, a 405 (withAllow), a 415, a bad query parameter (limit=abc) as400, an upload over the limit as413.
The examples store their tables in H2, the pure-Java database, embedded in the app's JVM in file mode (storage/database/surveyjs.mv.db). Nothing to install, and the SQL is the plain SQL the docs show. storage/DatabaseConfig.java builds the URL from DATA_DIR:
jdbc:h2:file:<DATA_DIR>/database/surveyjs;NON_KEYWORDS=KEY;DATABASE_TO_LOWER=TRUE;DB_CLOSE_ON_EXIT=FALSE
NON_KEYWORDS=KEY lets the contract's key columns be column names; DATABASE_TO_LOWER=TRUE returns column labels in lower case (form_id), as other databases do. schema.sql creates the tables at every start (spring.sql.init.mode=always) and storage/Seeder.java seeds them from shared/seed/. A production app uses Flyway or Liquibase for its schema; Spring Boot configures either.
-
Look inside with SQL while the app is stopped (H2 locks the files while it runs), with H2's shell from your Maven repository:
java -cp ~/.m2/repository/com/h2database/h2/2.4.240/h2-2.4.240.jar org.h2.tools.Shell \ -url "jdbc:h2:file:./storage/database/surveyjs;NON_KEYWORDS=KEY" -user sa
java -cp "$env:USERPROFILE\.m2\repository\com\h2database\h2\2.4.240\h2-2.4.240.jar" org.h2.tools.Shell -url "jdbc:h2:file:./storage/database/surveyjs;NON_KEYWORDS=KEY" -user sa
Then
SELECT id, form_id, data FROM responses ORDER BY id DESC LIMIT 5;. -
Fields inside a document. H2 has no
->>and noJSON_VALUE, so where the examples filter on a field of the stored answers (the claim owner'scustomer_email), they select the rows in SQL and compare the field after reading the document. It reads the same on any database. -
After a Spring Boot upgrade, a newer H2 may refuse an old database file. Delete
storage/database/: the app creates and seeds a new one on start. -
PostgreSQL instead: replace the
DataSourcebean with Boot'sspring.datasource.*properties, keep the document columnstext(jsonbreorders keys and drops duplicate ones), and useGENERATED BY DEFAULT AS IDENTITYids asschema.sqldoes.
Spring Security signs in the user and checks the permission, as it would in your app:
- The demo user.
demo/DemoUserFilter.javaruns in the security filter chain and signs the request in as the user itsdemo_usercookie names, through theUserDetailsServiceover theuserstable (security/UserStore.java). Handlers take@AuthenticationPrincipal User user, which isnullwhen signed out. In your app, that filter's place is taken by.formLogin(),.oauth2Login()or.oauth2ResourceServer(jwt -> …). - The edit-forms permission is an authority. The
PUThandlers of Load and Save Form JSON Schemas, Lint JSON Schemas and Variable Presets declare@PreAuthorize("hasAuthority('edit-forms')")(@EnableMethodSecurity); a refusal answers403 { "error": "You don't have editor rights: only editors can change forms" }, signed out too. - Stateless. No session (
SessionCreationPolicy.STATELESS, noJSESSIONID), no login form and no basic auth; every request is permitted, and the examples answer401and403themselves. - CSRF is off, because the demo signs in by a cookie the page sets, not a session. A real app with a session cookie keeps CSRF on and sends its token:
CookieCsrfTokenRepositorywith theX-XSRF-TOKENheader, which the client'sfetchcalls must then send. - The firewall rejects paths such as
/shared/../.envwith404; Spring Security's default headers stay (X-Frame-Options: DENY,X-Content-Type-Options: nosniff). The/shared/and/css/files are sent withCache-Control: no-cache, so the browser revalidates them instead of Security's defaultno-store.
Locally, everyone shares one database, storage/database/ (delete storage/ to start over).
On a hosted demo (DEMO_MODE=true), each visitor gets a private H2 database and uploads folder, created and seeded on first use, chosen by a demo_sid cookie, and kept until it has been unused for 24 hours (an hourly @Scheduled task in the app, demo/SandboxPruner.java). The "Open a second window" link in Fill Forms Together and Edit Forms Together carries that id (?join=), so whoever opens it works in the same copy and the same relay rooms. The demo also caps uploads at 5 MB and the AI examples at 20 calls per visitor per day, counted in this process. None of this is in the example code: demo/SandboxDataSource.java routes each request's connections to its visitor's database, so the controllers don't change.
- The pages are Thymeleaf templates with the Layout Dialect (
src/main/resources/templates/), autoescaped. Each page diffs against its Blade source in the reference repository in template syntax only, with the Tailwind class strings unchanged. Inline JSON (the page config,window.FORM_DEFINITION,window.FORM_VARIABLES) is written withth:inline="javascript", which writes maps, records andJsonNodes as JSON and escapes</script>; no value from the database is everth:utext. - The site stylesheet is Tailwind CSS v4 without Preflight:
styles/site.cssimportstailwindcss/theme.css(static),tailwindcss/utilities.cssandshared/ui/theme.css.npm run cssbuilds it intosrc/main/resources/static/css/site.csswith@tailwindcss/cli; the app serves it at/css/site.css. The output is committed, so running the app never needs Node; CI rebuilds it and fails on a difference. Rebuild it after editing a template. The Tailwind standalone binary builds the same file without Node:tailwindcss -i styles/site.css -o src/main/resources/static/css/site.css --minify. - The client code is the shared ES modules in
shared/client/andshared/ui/, loaded unchanged with<script type="module">and an import map (pages/Frontend.java). No Maven artifact carries SurveyJS's 3.x browser builds (WebJars stop atsurvey-core1.12 and have no Creator), so every specifier points to unpkg: the SurveyJS packages at the version inshared/surveyjs-version.json(fesm/*.mjs), andchart.js,@kurkle/color,lodash-esand highlight.js at pinned versions. There is no bundler. - To self-host them, copy each package's
fesm/files (and the CSS the pages load) intosrc/main/resources/static/vendor/<package>@<version>/, serve that folder, and pointUNPKGinpages/Frontend.javaat it. Don't mix the script-tag builds (survey.core.jsand friends) with the ES modules on one page: they would load SurveyJS twice. - The Code tab highlights the Java regions with highlight.js's
javalanguage, whichshared/ui/code-highlight.jsregisters; the import map has an entry for every language that file imports. - The forms use the SurveyJS Tailwind adapter (
survey-core/themes/adapters/tailwind4.css). No page callsapplyTheme(): its inline styles would override the adapter.
The controllers only use the request, the database and the response, so they port in a few lines. Save Responses in Jakarta REST, as Quarkus writes it, taking the same JsonNode for the same reason:
@POST
@Path("/api/responses")
@Consumes(MediaType.APPLICATION_JSON)
public Response saveResponse(JsonNode body) { // a JsonNode, not a DTO: the answers keep every key
if (!body.path("formId").isTextual() || !body.has("data")) {
return Response.status(400).entity(Map.of("error", "Expected { formId, data }")).build();
}
int id = storedJson.insertResponse(body.get("formId").asText(), body.get("data"));
return Response.status(201).entity(Map.of("id", id)).build();
}Only the annotations and the response type change (Quarkus still ships Jackson 2, hence isTextual() and asText()).
These examples must not be used as a real service as they are. They don't cover authentication, authorization, user management, access levels and other security aspects of a real survey service. The places where real checks go are marked:
@PreAuthorize("hasAuthority('edit-forms')")on the saving handlers, andPermissions.canReadFile(user, file)insecurity/Permissions.java: who may save definitions and presets, and who may read an uploaded file.demo/DemoUserFilter.javainsecurity/SecurityConfig.java: the demo version reads ademo_usercookie; your app authenticates there with form login, OAuth2 login or a JWT resource server. With a real session, turn CSRF back on.
When you copy an example into your app, leave out the demo-only code: the io.surveyjs.demo package (and its lines in security/SecurityConfig.java, web/WebConfig.java, relay/RelayConfig.java and storage/DatabaseConfig.java), relay/RoomKey.java's sandbox keys, pages/, templates/, shared/ui/ (the page frame, its tabs and highlighting, the fonts and site images) and shared/client/host.js (its mountSurvey() is one line: renderSurvey(survey, element) from survey-js-ui).
The code in this repository is available under the MIT licence.
The examples use SurveyJS Form Library, which is MIT-licensed as well. The examples marked "Commercial" in the Licence column above also use SurveyJS Survey Creator, Dashboard or PDF Generator, which are commercial products. You can integrate them and evaluate their functionality without a licence. Production use requires a developer licence for each developer who works with the SurveyJS APIs or implements the integration. See the SurveyJS Licensing FAQ and the End-User License Agreement.