Giter Club home page Giter Club logo

super-easy-forms's Introduction

**This is the repo for Super Easy Forms 2.0. The First Version has been moved to this other repo Super Easy Forms



Super Easy Forms is a tool that generates serverless web forms (front-end and back-end) in seconds. it leverages CloudFormation to create all of your necessary resources in the AWS cloud including a A Dynamo DB table, an API Gateway endpoint, and a Lambda function. It also automatically generates a ready-to-go html contact form that you can copy-paste into your site. the tool is fast, easy to use/integrate, and completely free as all the AWS resources created have a free tier. Version 2.0 now features increased usability, security, and flexibility.

Pre-requisites

  • Make sure you have node.js (10.x +) and npm installed. You can checkout this tutorial to install npm and node in mac, linux (debian/ubuntu).
  • Have an AWS account. If you don't have an AWS account, you can easily create one here. Don't worry, everything you do with this project will fall within the AWS free tier limit!

Installation

  1. if you dont have an existing static website project you can create a new directory mkdir project-name replacing project-name with the desired name for your project.

  2. Go into your desired project's directory cd project-name and install super easy forms npm install super-easy-forms

  3. Install the super easy forms CLI globally npm install -g super-easy-forms-cli

  4. Run the build command Run sef build -r=your-aws-region -p=profile-name from the root of your project's directory. replace profile-name with the desired name of the IAM user and your-aws-region with the desired AWS region code.

  5. Finish creating your IAM user in the AWS Console and hold on to the access keys. If you had already created your IAM user you can ignore this step and close the browser window.

  6. Update the local profile in your machine. The local profiles are stored in ~/.aws/credentials in mac/linux or in C:\Users\USER_NAME\.aws\credentials in windows. you can create/edit this file by runing sudo nano ~/.aws/credentials. add the profile keys in the format shown bellow.

     [profilename]
     aws_access_key_id = <YOUR_ACCESS_KEY_ID>
     aws_secret_access_key = <YOUR_SECRET_ACCESS_KEY>
    

Create a serverless form

  1. run sef init formname replace formname with the name you want to give to your new form. For example the domain name followed by paymentform.

  2. edit the config file saved in ./forms/formname/config.json and add values for the variables shown bellow following the same format. captcha, emailMessage and emailSubject are optional.

  3. run sef fullform formname

     {
       "email":"[email protected]",
       "formFields":{
         "fullName": {"type":"text", "label":"Full,Name", "required":true},
         "email": {"type":"email","label":"Email","required":true},
       },
       "captcha":false,
       "emailSubject":"",
       "emailMessage":"",
     }
    

    Optionally you can provide your desired values directly as CLI flags without having to edit the config file as shown in the command bellow.

    sef fullform formname [email protected] --fields=fullName=text=required,email=email=required
    

Using the API

    const SEF = require('super-easy-forms')

    SEF.CreateForm(formName, options, function(err, data){
            if(err) console.error(err)
            else{
                    //Do Something
            }
    })

super-easy-forms's People

Contributors

gkpty avatar blackfile avatar

Stargazers

Pratyush Raj avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.