A full-stack web application for managing user feedback through dynamic form templates with role-based access control.
LIVE: https://userfeedback-system.vercel.app/
- Dynamic Form Builder: Create custom feedback forms with various field types
- Role-Based Access: Different interfaces for SuperAdmin, Admin, and User roles
- Real-time Form Management: Create, view, and delete form templates
- Response Collection: Store and manage form responses
- Modern UI: React-based frontend with responsive design
- React 19.1.1 - UI library
- Vite - Build tool and development server
- React Router DOM - Client-side routing
- Axios - HTTP client
- Express.js - Web framework
- MongoDB - Database
- Mongoose - ODM for MongoDB
- CORS - Cross-origin resource sharing
- Helmet - Security middleware
- bcrypt - Password hashing
- jsonwebtoken - JWT authentication
- express-async-handler - Async error handling
newUserfeed/
├── src/
│ ├── components/
│ │ ├── Admin/ # Admin dashboard
│ │ ├── Login/ # Authentication
│ │ ├── Sidebar/ # Navigation
│ │ ├── SuperAdmin/ # SuperAdmin interface
│ │ └── User/ # User interface
│ ├── server/
│ │ ├── models/ # MongoDB schemas
│ │ ├── routes/ # API endpoints
│ │ ├── middleware/ # Custom middleware
│ │ ├── db.js # Database connection
│ │ └── server.js # Express server
│ ├── App.jsx # Main React component
│ └── main.jsx # React entry point
├── public/ # Static assets
└── package.json # Dependencies
-
Clone the repository
git clone <repository-url> cd newUserfeed
-
Install dependencies
npm install
-
Setup MongoDB
- Install MongoDB locally or use MongoDB Atlas
- Default connection:
mongodb://localhost:27017/testing
-
Environment Setup
- Create
.envfile for environment variables - Configure database URL and JWT secrets
- Create
-
Start the backend server
node src/server/server.js
Server runs on port 5000
-
Start the frontend development server
npm run dev
Frontend runs on Vite's default port
npm run build
npm run previewPOST /template- Create new form templateGET /template- Fetch all templatesDELETE /template- Delete all templates
- Form response endpoints (configured in responseRoutes.js)
- Text
- Textarea
- Options (dropdown)
- Radio buttons
- Number
- SuperAdmin: Full system access
- Admin: Template and response management
- User: Form submission and viewing
- axios, bcrypt, cors, dotenv, express, express-async-handler
- helmet, jsonwebtoken, mongodb, mongoose
- react, react-dom, react-router-dom
- @vitejs/plugin-react, eslint, vite (rolldown-vite)
- TypeScript definitions for React
npm run dev- Start development servernpm run build- Build for productionnpm run lint- Run ESLintnpm run preview- Preview production build
Private project