FormViewer.js 1.0.1 Guide: https://innovastudio.com/formbuilderai-guide (Section "Form Viewer using FormViewer.js") If you have Source Code package (Super license), please refer to: README-SOURCECODE.txt for additional information. _____________________________________________ Before Running the Exanples: 1. Obtain an API key from OpenAI or OpenRouter: https://openai.com or https://openrouter.ai or both (recommended) - With OpenAI, you can use the image generation model. - With OpenRouter, you can use various LLMs Update the .env file with your API key. OPENAI_API_KEY=YOUR_API_KEY OPENROUTER_API_KEY=YOUR_API_KEY Or if you're using PHP, update the api/config.php file with your API key: $OPENAI_API_KEY = 'YOUR_API_KEY'; $OPENROUTER_API_KEY = 'YOUR_API_KEY'; 2. Obtain an API key for from Fal.ai: https://fal.ai Update the .env file with your API key. FAL_API_KEY=YOUR_API_KEY Or if you're using PHP, update the api/config.php file with your API key: $FAL_API_KEY = 'YOUR_API_KEY'; 3. Obtain an API key for AWS S3 storage (optional): Update the .env file with your S3 storage credentials. AWS_KEY=YOUR_KEY AWS_SECRET=YOUR_SECRET AWS_BUCKET=BUCKET_NAME AWS_URL=http://BUCKET_NAME.s3-website-us-east-1.amazonaws.com AWS_PREFIX= #Specify a directory here (optional) AWS_REGION=us-east-1 Or if you're using PHP, update the api/config.php file: $AWS_KEY = 'YOUR_KEY'; $AWS_SECRET = 'YOUR_SECRET'; $AWS_BUCKET = 'BUCKET_NAME'; $AWS_URL = 'http://BUCKET_NAME.s3.us-east-1.amazonaws.com'; $AWS_REGION = 'us-east-1'; $prefix = ""; // Specify a directory here (optional) $localSave = true; For PHP: - Download the AWS SDK for PHP phar file (aws.phar) from https://github.com/aws/aws-sdk-php/releases and copy it to your project's public/api/ directory. - Live storage is needed for FAL to access uploaded files (e.g., for image-to-video generation, etc.). We suggest using AWS S3 storage, or you can host the example on your server. _____________________________________________ RUNNING THE EXAMPLES You can choose to run the HTML, PHP or JavaScript project examples: A. To try the HTML example: 1. Unzip the project files:    - formviewer/ 2. Open terminal, go to the project directory and install the required server dependencies. The example is using Node.js server. > cd formviewer > npm install Note: To run this command, you need to have NPM installed. Download & install NPM from https://nodejs.org/en/download/. 3. Run the server: > node server.js 4. Open from your browser: http://localhost:8082/example1.html http://localhost:8082/example2.html http://localhost:8082/example3.html B. To try the PHP Example, open from your browser: http://localhost/.../public/example2.php http://localhost/.../public/example3.php If you're using Visual Studio Code, you can use the PHP Server extension. C. To try the JavaScript project, install the dependencies and start the project: > npm install > npm start A browser window will be opened with the example running. Note: The code for this project is: src/index.js The project is using Node.js server: server.js - IMPORTANT: Please add your own security to the API endpoints (public/api/)! _____________________________________________ SUPPORT: Email us at: support@innovastudio.com