Skip to content

Commit ba875e7

Browse files
authored
Merge pull request #30 from surveyjs/add-blogpost-demos
SurveyJS Form Builder in Next.js - Add sample app
2 parents d599be4 + 8b7739c commit ba875e7

25 files changed

+1643
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.*
7+
.yarn/*
8+
!.yarn/patches
9+
!.yarn/plugins
10+
!.yarn/releases
11+
!.yarn/versions
12+
13+
# testing
14+
/coverage
15+
16+
# next.js
17+
/.next/
18+
/out/
19+
20+
# production
21+
/build
22+
23+
# misc
24+
.DS_Store
25+
*.pem
26+
27+
# debug
28+
npm-debug.log*
29+
yarn-debug.log*
30+
yarn-error.log*
31+
.pnpm-debug.log*
32+
33+
# env files (can opt-in for committing if needed)
34+
.env*
35+
36+
# vercel
37+
.vercel
38+
39+
# typescript
40+
*.tsbuildinfo
41+
next-env.d.ts
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# SurveyJS Form Builder in Next.js
2+
3+
This repository contains the source code for a complete tutorial on integrating the [SurveyJS Form Builder](https://surveyjs.io/open-source) with a Next.js application.
4+
5+
## Features
6+
7+
* SurveyJS Form Builder (drag-and-drop interface)
8+
* Live preview with PDF export
9+
* Save/load survey definitions from a local storage
10+
* Custom Creator theme
11+
12+
## Related Blog Post
13+
14+
Read the full tutorial here: [Build Dynamic Forms with SurveyJS Form Builder in Next.js](http://surveyjs.io/stay-updated/blog/nextjs-form-builder).
15+
16+
## Getting Started
17+
18+
```
19+
npm install
20+
npm run dev
21+
```
22+
23+
Visit http://localhost:3000 to start using the builder.
24+
25+
## See Also
26+
27+
For more advanced examples and backend integration options, check out: [SurveyJS + Next.js Quickstart Template](https://github.com/surveyjs/surveyjs-nextjs).
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { dirname } from "path";
2+
import { fileURLToPath } from "url";
3+
import { FlatCompat } from "@eslint/eslintrc";
4+
5+
const __filename = fileURLToPath(import.meta.url);
6+
const __dirname = dirname(__filename);
7+
8+
const compat = new FlatCompat({
9+
baseDirectory: __dirname,
10+
});
11+
12+
const eslintConfig = [
13+
...compat.extends("next/core-web-vitals", "next/typescript"),
14+
];
15+
16+
export default eslintConfig;
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import type { NextConfig } from "next";
2+
3+
const nextConfig: NextConfig = {
4+
/* config options here */
5+
};
6+
7+
export default nextConfig;
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"name": "surveyjs-form-builder",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"dev": "next dev",
7+
"build": "next build",
8+
"start": "next start",
9+
"lint": "next lint"
10+
},
11+
"dependencies": {
12+
"@tailwindcss/postcss": "^4.1.11",
13+
"ace-builds": "^1.43.2",
14+
"next": "15.4.1",
15+
"react": "19.1.0",
16+
"react-dom": "19.1.0",
17+
"survey-core": "2.2.5",
18+
"survey-creator-core": "2.2.5",
19+
"survey-creator-react": "2.2.5",
20+
"survey-pdf": "2.2.5",
21+
"survey-react-ui": "2.2.5"
22+
},
23+
"devDependencies": {
24+
"@eslint/eslintrc": "^3",
25+
"@types/node": "^20",
26+
"@types/react": "^19",
27+
"@types/react-dom": "^19",
28+
"autoprefixer": "^10.4.21",
29+
"eslint": "^9",
30+
"eslint-config-next": "15.4.1",
31+
"postcss": "^8.5.6",
32+
"tailwindcss": "^4.1.11",
33+
"typescript": "^5"
34+
}
35+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const config = {
2+
plugins: ["@tailwindcss/postcss"],
3+
};
4+
5+
export default config;
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)