This project is a form builder built with React and Node.js, designed to use PostgreSQL as the backend database. Follow the instructions below to set up your environment and run the application.
GitHub Repository: SOAR Web Form Builder
- Node.js installed (v14 or higher recommended).
- PostgreSQL installed and running (v13 or higher recommended).
- Install and run PostgreSQL.
- Create the
soar_web_formsdatabase by running these commands in your terminal:
psql -U postgresThen in the PostgreSQL prompt:
CREATE DATABASE soar_web_forms;
\qCreate a PostgreSQL user with appropriate permissions or use your existing one.
CREATE USER your_pg_username WITH PASSWORD 'your_pg_password';Grant all privileges on the database to the new user:
GRANT ALL PRIVILEGES ON DATABASE soar_web_forms TO your_pg_username;Exit the PostgreSQL prompt:
\qCreate a .env file in the project root to point to your PostgreSQL database. Example .env file:
##PostgreSQL DB Info
PG_USER=your_pg_username
PG_HOST=your_pg_ip ##127.0.0.1 unless PostgreSQL is running on a different machine
PG_DATABASE=soar_web_forms
PG_PASSWORD=your_pg_password
PG_PORT=5432
JWT_SECRET=your_jwt_secret_here ##This can be whatever you want
## Server.js port
PORT=5050
##Splunk SOAR IP
## Proxy.js ports
PROXY_TARGET=https://192.168.128.31 ##Set this to your Splunk SOAR Server
PROXY_PORT=3001 ## This might need to be changed depending on port conflictsReplace all values with your actual PostgreSQL credentials and a strong JWT secret.
Run the provided create_db.js script to automatically create all necessary tables (configuration, forms, and users) and insert default user accounts with properly hashed passwords.
node create_db.jsStart the backend servers:
node server.js
node proxy.jsSet the React app port to 3002 and start it:
set PORT=3002 & npm startPORT=3002 npm startOpen your browser and navigate to:
http://localhost:3002