Skip to content

Asitkumar6205/smart_form

Repository files navigation

Mini Survey Form

A simple React + TypeScript + Vite project styled with TailwindCSS.
The app collects answers from users, validates inputs with Zod, and logs them as an object { questionId: answer }.


📸 Screenshots

Form Validation Example

Validation Errors

Survey Submission

Survey Submission Survey Submission

Mobile View Responsiveness

Survey Submission

🚀 Tech Stack


📦 Setup Instructions

1. Clone the Repository

git clone https://github.com/Asitkumar6205/smart_form.git
cd smart_form

2. Install dependencies

npm install

3. Run the development server

npm run dev

//The app will be available at:
//👉 http://localhost:8080

4. Build for production

npm run build

5. Preview production build

npm run preview

🧪 Example Data Logging

On form submission, the app collects answers into an object like this:

{
  age-group: "18-25",
  company: "Rosa Tech",
  contact-method: "Email",
  email: "sdeasit2@gmail.com",
  frequency: "Weekly",
  full-name: "Asit Kumar",
  interests: ['Technology', 'Sports', 'Travel', 'Music', 'Reading'],
  services: ['Development', 'Consulting']
}

📂 Project Structure

project-root/
├── public/ # Static assets (favicon, etc.)
├── src/
│ ├── components/ # Reusable components
│ ├── App.tsx # Main app component
│ ├── main.tsx # Entry point
│ └── index.css # Tailwind styles
├── tsconfig.json
├── vite.config.ts
├── tailwind.config.js
└── package.json

About

View Live ⬇️

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published