Skip to content

codeforlifeee/FormBuilder_NITRR

Β 
Β 

Repository files navigation

πŸš€ NITRR Form Builder


Create modern, shareable forms with AI β€” built for NIT Raipur by the Innovation Cell.


✨ Features

  • AI-Powered Form Generation: Describe forms in natural language, generate the structure instantly.
  • Modern UI/UX: Fast, clean design with responsive layouts, smooth animations, and accessibility best practices.
  • Authentication: Powered by Clerk for secure user management.
  • Analytics & Management: View responses, track performance, manage your forms in a dashboard.
  • Collaboration Ready: Easy sharing, live links, and data export in CSV/JSON.
  • Customizable Themes: Switch between themes (light/dark/custom).
  • Mobile-Optimized: Looks perfect on mobile, tablet, and desktop.
  • Production-Grade Stack: Next.js 14, Tailwind CSS, PostgreSQL (Neon), Drizzle ORM, Clerk, Google Gemini AI.

πŸ› οΈ Tech Stack

Layer Tools / Services
Frontend Next.js 14, React 18, Tailwind CSS, Shadcn UI, DaisyUI
Auth Clerk
Backend Node.js (API routes), Drizzle ORM
Database PostgreSQL (Neon Serverless DB)
Analytics Custom-built dashboard, Radix UI, Lucide icons
AI Google Gemini API (Generative AI for form creation)
Deployment Vercel (recommended), supports .env and seamless git integration

πŸ“ Folder Structure (Detailed)

test-project/
β”‚
β”œβ”€β”€ app/                           # Main app folder, Next.js routing structure
β”‚   β”œβ”€β”€ (auth)/                    # Clerk auth pages (sign in, sign up)
β”‚   β”œβ”€β”€ _components/               # Global shared components (e.g., Header, Hero)
β”‚   β”œβ”€β”€ _data/                     # Static app data and default themes
β”‚   β”œβ”€β”€ api/                       # API endpoints (forms, submit-response, etc.)
β”‚   β”œβ”€β”€ configs/                   # DB/AI configs, Drizzle schema, AI modals
β”‚   β”œβ”€β”€ dashboard/                 # User dashboard, main form management UI
β”‚   β”‚   β”œβ”€β”€ _components/           # Dashboard-specific components (SideNav, FormList, etc.)
β”‚   β”‚   β”œβ”€β”€ responses/             # Responses management pages
β”‚   β”œβ”€β”€ edit-form/                 # Form editing interface (dynamic by [formId])
β”‚   β”‚   β”œβ”€β”€ _components/           # Editor UI logic, form controls
β”‚   β”œβ”€β”€ nitrr-form/                # Public form view ([formid] for live links)
β”‚   β”œβ”€β”€ globals.css                # Global Tailwind CSS + theming (themes, custom utilities)
β”‚   β”œβ”€β”€ layout.js                  # App-wide layout provider and meta tags
β”‚   β”œβ”€β”€ page.js                    # Home page (landing)
β”‚
β”œβ”€β”€ components/                    # Reusable UI components (button, input, dialog, etc.)
β”‚   └── ui/                        # Shadcn-styled basic UI primitives
β”œβ”€β”€ lib/                           # Utility functions for classNames, helpers
β”‚   └── utils.js                   # cn() etc.
β”œβ”€β”€ public/                        # Static assets (favicons, images, OG tags)
β”œβ”€β”€ package.json                   # NPM dependencies, scripts, engines
β”œβ”€β”€ tailwind.config.js             # Tailwind/daisy/shadcn + colors/theme plugins
β”œβ”€β”€ .env.local.example             # Example environment variables file
└── README.md                      # You're reading it!

πŸš€ Quick Start

1. Clone and Install

git clone https://github.com/codeforlifeee/FormBuilder_NITRR.git
cd test-project
npm install

2. Setup Environment

Create a .env.local in root. See .env.local.example for all variables.

# PostgreSQL Neon DB
NEXT_PUBLIC_DATABASE_URL_CONFIG=your_neon_db_url

# Clerk Auth
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
CLERK_SECRET_KEY=your_clerk_secret_key

# Google Gemini AI
NEXT_PUBLIC_GEMINI_API_KEY=your_gemini_api_key

# Optional Clerk URLs
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/dashboard
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/dashboard

3. Setup Database

npm run db:push
# or
npx drizzle-kit push

4. Start Development

npm run dev

Visit http://localhost:3000


🌈 Usage Guide

Creating Forms:

  1. Login/signup via Clerk (supports SSO, email, social)
  2. Click Create New Form
  3. Use AI-powered input: type β€œCreate an event registration form for Webinar with fields for Name, Email, Phone, Department”
  4. Edit any fields visually (drag/drop, reorder, add/remove)
  5. Save, share the form link, view analytics

Managing Responses:

  • See all submitted responses in dashboard
  • Export as CSV/JSON
  • View summary stats, analytics

Live Sharing:

  • Copy form link, distribute to NITRR community
  • Anyone can fill out without needing an account

🧩 Key Components & Customization

  • Themes: Add or edit themes in app/_data/Themes.jsx
  • AI Config: Tune model or prompt in app/configs/AiModals.js
  • UI: All base UI in components/ui (button.jsx, input.jsx, dialog.jsx, etc.)
  • API: Custom routes in app/api/forms/[id] (CRUD), app/api/submit-response (POST)

πŸ“¦ Project Structure Visual (Sample)

app/
β”œβ”€β”€ _components/
β”‚   β”œβ”€β”€ Header.jsx
β”‚   β”œβ”€β”€ Hero.jsx
β”‚   └── ...
β”œβ”€β”€ dashboard/
β”‚   β”œβ”€β”€ _components/
β”‚   β”‚   β”œβ”€β”€ SideNav.jsx
β”‚   β”‚   β”œβ”€β”€ FormList.jsx
β”‚   β”‚   β”œβ”€β”€ FormListItem.jsx
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ layout.jsx
β”‚   └── page.jsx
β”œβ”€β”€ edit-form/
β”‚   β”œβ”€β”€ [formId]/
β”‚   β”‚   └── page.jsx
β”‚   └── _components/
β”‚       β”œβ”€β”€ Controller.jsx
β”‚       β”œβ”€β”€ FormUi.jsx
β”‚       └── FieldEdit.jsx
β”œβ”€β”€ nitrr-form/
β”‚   └── [formid]/page.jsx
└── ...

πŸ“ Environment Variables Reference

Variable Description
NEXT_PUBLIC_DATABASE_URL_CONFIG Neon Postgres connection string
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY Clerk public key for front-end
CLERK_SECRET_KEY Clerk back-end secret
NEXT_PUBLIC_GEMINI_API_KEY Google Gemini API Key for AI forms

πŸ“œ API Endpoints

GET   /api/forms            # List all forms (user)
POST  /api/forms            # Create new form
GET   /api/forms/[id]       # Get specific form (single)
PUT   /api/forms/[id]       # Update form
DELETE/api/forms/[id]       # Delete form
POST  /api/submit-response  # Submit user response

πŸ§ͺ Database Schema Overview

CREATE TABLE jsonForms (
  id SERIAL PRIMARY KEY,
  jsonform TEXT NOT NULL,
  createdBy VARCHAR(255) NOT NULL,
  createdAt VARCHAR(255) NOT NULL,
  updatedAt VARCHAR(255),
  theme VARCHAR(100) DEFAULT 'light'
);

CREATE TABLE userResponses (
  id SERIAL PRIMARY KEY,
  jsonResponse TEXT NOT NULL,
  createdBy VARCHAR(255) DEFAULT 'anonymous',
  createdAt VARCHAR(255) NOT NULL,
  formId INTEGER REFERENCES jsonForms(id)
);

πŸ“Έ Screenshots

(Replace these with real screenshots as your app deploys!)

  • Landing Page
  • Dashboard
  • Form Editor
  • Mobile Experience

✨ Roadmap

  • Advanced Analytics & charts
  • Form Templates & presets
  • Team/Multi-user editing
  • File uploads, advanced validations
  • Webhooks, notifications
  • Custom theme builder

🀝 Contributing

  • Fork this repo, create a new branch, submit a pull request!
  • For major changes, open a GitHub Issue to discuss your proposal first.
  • See CONTRIBUTING.md for guidelines.

🏫 Project Team

Project By: Innovation Cell, NIT Raipur Organization: Innovation Cell, NIT Raipur


πŸ“„ License

MIT License – see LICENSE file for details.


πŸ“¬ Contact & Support


Made with ❀️ at NIT Raipur β€” Powering the future of college forms with AI

About

An open-source, customizable form builder for clubs and committees. Admins can easily create, manage, and deploy forms for events, registrations, surveys, and more. This tool simplifies form creation, offering a user-friendly interface for all organizational needs. Perfect for enhancing admin efficiency and accessibility.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 97.8%
  • CSS 2.2%