A beautiful, responsive feedback collection page for mobile applications, built with Vite + React and designed to be hosted on GitHub Pages.
- β‘ Vite - Lightning fast build tool and dev server
- βοΈ React - Modern UI library with hooks
- π¨ Modern, clean design with gradient backgrounds
- π± Fully responsive (works on mobile, tablet, and desktop)
- β Interactive star rating system
- π Multiple feedback types (Bug Report, Feature Request, etc.)
- β¨ Smooth animations and transitions
- πΎ Local storage for feedback (can be easily integrated with backend)
- Node.js 16+ and npm/yarn/pnpm
- Clone the repository:
git clone <your-repo-url>
cd webuddhist-app-feedback- Install dependencies:
npm install
# or
yarn install
# or
pnpm install- Start the development server:
npm run dev
# or
yarn dev
# or
pnpm dev- Open your browser and visit
http://localhost:5173
npm run build
# or
yarn build
# or
pnpm buildThis will create a dist folder with the production-ready files.
npm run preview
# or
yarn preview
# or
pnpm preview- Create a
.github/workflows/deploy.ymlfile (see example below) - Push your code to GitHub
- GitHub Actions will automatically build and deploy your site
- Build the project:
npm run build - Go to your repository settings on GitHub
- Navigate to "Pages" in the left sidebar
- Under "Source", select "GitHub Actions" or upload the
distfolder contents - Your site will be available at:
https://yourusername.github.io/webuddhist-app-feedback/
Create .github/workflows/deploy.yml:
name: Deploy to GitHub Pages
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist.
βββ public/ # Static assets
βββ src/
β βββ components/ # React components
β β βββ FeedbackForm.jsx
β β βββ FeedbackForm.css
β βββ App.jsx # Main App component
β βββ App.css # App styles
β βββ main.jsx # Entry point
β βββ index.css # Global styles
βββ index.html # HTML template
βββ vite.config.js # Vite configuration
βββ package.json # Dependencies
βββ README.md # This file
Edit the CSS variables in src/App.css:
:root {
--primary-color: #6366f1; /* Main color */
--secondary-color: #8b5cf6; /* Secondary color */
--success-color: #10b981; /* Success message color */
}Edit src/components/FeedbackForm.jsx to add new form fields:
<div className="form-group">
<label htmlFor="newField">New Field</label>
<input
type="text"
id="newField"
name="newField"
value={formData.newField}
onChange={handleChange}
placeholder="Enter value"
/>
</div>Don't forget to add the field to the initial state in useState.
This project is integrated with the Userback API for feedback submission. The form automatically sends feedback to your Userback project.
- Create a
.envfile in the root directory (copy from.env.example):
cp .env.example .env- Add your Userback credentials:
VITE_USERBACK_API_KEY=your_api_key_here
VITE_USERBACK_PROJECT_ID=4455
VITE_USERBACK_API_URL=https://api.userback.io/v1The form fields are mapped to the Userback API schema:
-
Required Fields:
projectId- FromVITE_USERBACK_PROJECT_IDenv variableemail- From form (required)feedbackType- Mapped from form:Bug,Idea, orGeneraltitle- From form title field (required)description- From form message field (required)
-
Optional Fields:
name- From form name fieldrating- From form star ratingpageUrl- Automatically captured from current page URLnotify- Defaults totrue
bugβBugfeature/improvementβIdeacompliment/otherβGeneral
The form uses the Userback API client:
import userback from '@api/userback';
userback.createFeedback({
projectId: 4455,
email: 'user@example.com',
feedbackType: 'General',
title: 'Feedback title',
description: 'Feedback description',
notify: true
})
.then(({ data }) => console.log(data))
.catch(err => console.error(err));- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
- Mobile browsers (iOS Safari, Chrome Mobile)
Feel free to use this project for your own purposes!
Contributions are welcome! Feel free to submit issues or pull requests.