A modern web application for creating and managing intelligent questionnaires, built with React and Node.js, deployed on Vercel.
- 📝 Create and manage questionnaires
- 🎯 Dynamic question flow based on answers
- 📊 Session tracking and answer collection
- 🎨 Modern, responsive UI
- ☁️ Serverless deployment on Vercel
IntelliQ/
├── api/ # Vercel serverless functions
│ ├── questionnaire/ # Questionnaire endpoints
│ ├── question/ # Question endpoints
│ ├── doanswer/ # Answer submission endpoints
│ ├── getsessionanswers/ # Session answer retrieval
│ ├── getquestionanswers/ # Question answer retrieval
│ └── questionnaires.js # List all questionnaires
├── frontend/ # React frontend application
│ ├── src/
│ │ └── components/ # React components
│ ├── public/ # Static assets
│ └── package.json
├── api-backend/ # Original Express backend (for reference)
├── database/ # Database schema and setup
├── vercel.json # Vercel deployment configuration
└── package.json # Root package configuration
- A Vercel account
- A MySQL database (can use PlanetScale, Railway, or any MySQL provider)
- Git repository with this code
Set these environment variables in your Vercel project:
DB_HOST=your-database-host
DB_USER=your-database-username
DB_PASSWORD=your-database-password
DB_NAME=intelliq
NODE_ENV=production
- Create a MySQL database named
intelliq - Import the SQL schema from
database/intelliq .sql - Update the environment variables with your database credentials
-
Fork or clone this repository
git clone <your-repo-url> cd IntelliQ
-
Install dependencies
npm run install:all
-
Deploy to Vercel
# Install Vercel CLI npm i -g vercel # Deploy vercel
-
Set environment variables in Vercel dashboard
- Go to your project settings
- Add the database environment variables
- Redeploy if necessary
-
Install dependencies
npm run install:all
-
Set up local database
- Install MySQL locally
- Create database
intelliq - Import
database/intelliq .sql
-
Start development servers
npm run dev
GET /api/questionnaires- Get all questionnairesGET /api/questionnaire/[questionnaireID]- Get questionnaire details
GET /api/question/[questionnaireID]/[questionID]- Get question details
POST /api/doanswer/[questionnaireID]/[questionID]/[session]- Create new sessionPOST /api/doanswer/[questionnaireID]/[questionID]/[session]/[optionID]- Submit answer
GET /api/getsessionanswers/[questionnaireID]/[session]- Get session answersGET /api/getquestionanswers/[questionnaireID]/[questionID]- Get question statistics
- Frontend: React 18, React Router, Axios
- Backend: Vercel Serverless Functions, Node.js
- Database: MySQL
- Deployment: Vercel
- Styling: Custom CSS
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
MIT License - see LICENSE file for details