Giter Site home page Giter Site logo

devmahmud / next-dnd-formbuilder Goto Github PK

View Code? Open in Web Editor NEW
11.0 1.0 4.0 722 KB

Next JS drag and drop formbuilder

Home Page: https://next-dnd-formbuilder.vercel.app

License: MIT License

CSS 0.68% TypeScript 98.26% JavaScript 1.05%
approuter dnd-kit drag-and-drop nextjs server-actions shadcn-ui tailwindcss

next-dnd-formbuilder's Introduction

Next DnD FormBuilder

Next DnD FormBuilder is a drag-and-drop form builder built with Next.js, Prisma, and TypeScript. This project allows users to create dynamic forms by simply dragging and dropping form elements onto a canvas. Below is an overview of the project structure and setup instructions.

Prerequisites

Before running the project, ensure you have the following installed:

  • Node.js (v14 or higher)
  • npm or yarn
  • PostgreSQL

Setup

  1. Clone the repository:

    git clone https://github.com/devmahmud/next-dnd-formbuilder.git
  2. Install dependencies:

    npm install
    # or
    yarn
  3. For authentication, This project uses Clerk. Create a free clerk account and from Developers/API Keys you will get Publishable key and secret key for the Next.js project

  4. Set up environment variables:

    Create a .env file in the root directory and provide the following variables:

    NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=
    CLERK_SECRET_KEY=
    
    NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
    NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
    NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/
    NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/
    
    POSTGRES_PRISMA_URL=postgresql://username:password@hostname:port/database_name
    POSTGRES_URL_NON_POOLING=postgresql://username:password@hostname:port/database_name
    
    

    Ensure to replace the placeholders with your actual values.

  5. Initialize Prisma:

    npx prisma generate
    # or
    yarn prisma generate
  6. Run the development server:

    npm run dev
    # or
    yarn dev

Scripts

  • dev: Start the development server.
  • build: Build the Next.js application for production.
  • start: Start the production server.
  • lint: Lint the code using Next.js linting configurations.
  • postinstall: Generate Prisma client.

Project Structure

  • app/: Contains Next.js pages.
  • public/: Contains static assets.
  • components/: Contains All the react components for the project.
  • prisma/: Contains Prisma schema and migrations.
  • lib: Contains helper functions.
  • schema: Contains zod form schema.

Usage

  • Visit the homepage to access the drag-and-drop form builder interface.
  • Drag form elements from the toolbox onto the canvas to create your form.
  • Customize form element properties as needed.
  • Save the form configuration and integrate it with your application.

Feel free to modify and extend the project according to your requirements!

License

This project is licensed under the MIT License.

next-dnd-formbuilder's People

Contributors

dependabot[bot] avatar devmahmud avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.