A comprehensive product feedback management system built with Laravel 12 and React 18, featuring user authentication, feedback submission, comments with @mentions, file uploads, and database notifications.
- User Authentication with Sanctum (session-based SPA auth)
- Feedback Management with CRUD operations and file uploads
- Category System with admin-manageable categories
- Comment System with markdown support and file attachments
- @Mention System with real-time user search and notifications
- Database Notifications for mention alerts
- File Upload Support (images, PDFs, documents)
- Authorization Policies for user ownership
- Comprehensive Validation with Form Requests
- Modern React Architecture with TypeScript
- Zustand for auth state management
- React Query for server state & caching
- React Hook Form + Zod for forms & validation
- Tailwind CSS for responsive design
- Markdown Rendering with syntax highlighting
- File Upload UI with progress indicators
- @Mention Autocomplete with user search
- Real-time Updates via React Query
βββ app/
β βββ Http/Controllers/Api/
β β βββ AuthController.php
β β βββ FeedbackController.php
β β βββ CommentController.php
β β βββ UserSearchController.php
β βββ Http/Requests/
β β βββ LoginRequest.php
β β βββ RegisterRequest.php
β β βββ StoreFeedbackRequest.php
β β βββ StoreCommentRequest.php
β βββ Models/
β β βββ User.php (with username)
β β βββ Category.php
β β βββ Feedback.php
β β βββ Comment.php
β βββ Notifications/
β β βββ UserMentioned.php
β βββ Policies/
β βββ FeedbackPolicy.php
β βββ CommentPolicy.php
βββ database/
β βββ migrations/
β β βββ create_users_table.php (with username)
β β βββ create_categories_table.php
β β βββ create_feedback_table.php
β β βββ create_comments_table.php
β β βββ create_comment_user_mentions_table.php
β β βββ create_notifications_table.php
β βββ seeders/
β βββ CategorySeeder.php
β βββ UserSeeder.php
β βββ FeedbackSeeder.php
βββ resources/js/
β βββ components/
β β βββ Layout.tsx
β β βββ Markdown.tsx
β β βββ CommentForm.tsx
β β βββ CommentList.tsx
β βββ pages/
β β βββ Login.tsx
β β βββ Register.tsx
β β βββ FeedbackList.tsx
β β βββ FeedbackNew.tsx
β β βββ FeedbackShow.tsx
β βββ stores/
β β βββ authStore.ts
β βββ lib/
β β βββ api.ts
β βββ App.tsx
β βββ app.tsx
βββ routes/
βββ api.php
βββ web.php
- Docker & Docker Compose
- Node.js 18+ and npm
git clone <repository-url>
cd splicedigital-laravel
# Copy environment file
cp .env.example .env
# Update .env with your settings:
# - Database credentials for MySQL
# - APP_URL=http://localhost
# - SESSION_DOMAIN=localhost
# - SANCTUM_STATEFUL_DOMAINS=localhost:5173
# Start Docker containers
docker-compose up -d
# Install backend dependencies
docker-compose exec app composer install
# Generate application key
docker-compose exec app php artisan key:generate
# Run migrations and seed data
docker-compose exec app php artisan migrate --seed
# Create storage symlink
docker-compose exec app php artisan storage:link
# Install dependencies
npm install
# Start development server
npm run dev
POST /api/register
- User registrationPOST /api/login
- User loginPOST /api/logout
- User logoutGET /api/user
- Get current user
GET /api/categories
- List all categoriesGET /api/feedback
- List feedback (with filters)GET /api/feedback/{id}
- Get feedback detailsGET /api/feedback/{id}/comments
- Get feedback comments
POST /api/feedback
- Create feedbackPUT /api/feedback/{id}
- Update feedbackDELETE /api/feedback/{id}
- Delete feedbackPOST /api/feedback/{id}/comments
- Create commentPUT /api/comments/{id}
- Update commentDELETE /api/comments/{id}
- Delete commentGET /api/users?search=term
- Search users for mentions
- Session-based authentication with Sanctum
- CSRF protection for SPA
- User registration with username field
- Secure logout with session invalidation
- Create, read, update, delete feedback
- File uploads (images, PDFs, documents)
- Category filtering and search
- Status tracking (open, in_progress, completed, closed)
- Ownership-based authorization
- Markdown support with syntax highlighting
- File attachments
- Edit/delete own comments
- Real-time @mention autocomplete
- Database notifications for mentions
- Multiple file support
- Type validation (images, PDFs, docs)
- Size limits (10MB per file)
- Secure storage with public access links
- Type
@
+ username for autocomplete - Real-time user search
- Database notifications
- Mention highlighting in comments
# Run artisan commands
docker-compose exec app php artisan <command>
# Access database
docker-compose exec mysql mysql -u root -p
# View logs
docker-compose logs -f app
# Start dev server with hot reload
npm run dev
# Build for production
npm run build
# Type checking
npx tsc --noEmit
# Run PHP tests
docker-compose exec app php artisan test
# Run JavaScript tests
npm test
The application seeds with:
[email protected]
/password
(username:demo
)[email protected]
/password
(username:johnsmith
)[email protected]
/password
(username:alicej
)[email protected]
/password
(username:bobw
)[email protected]
/password
(username:sarahd
)
- Bug Report (red)
- Feature Request (green)
- Improvement (blue)
- UX/UI (purple)
- Other (gray)
- Various feedback items with comments
- Demonstrates markdown formatting
- Shows @mention functionality
- Includes different status types
- CSRF Protection via Sanctum
- Input Validation on all forms
- File Upload Security with type/size restrictions
- Authorization Policies for resource access
- Output Escaping for XSS prevention
- CORS Configuration for SPA security
- Responsive Design for mobile/desktop
- Dark Mode Ready (Tailwind configuration)
- Loading States and error handling
- File Upload Progress indicators
- Markdown Preview in comment form
- Auto-complete @Mentions with dropdown
- Real-time Updates via React Query
- Chrome 90+
- Firefox 88+
- Safari 14+
- Edge 90+
For production deployment:
- Environment: Set
APP_ENV=production
- Database: Configure production MySQL
- Storage: Set up file storage (S3, etc.)
- CORS: Update allowed origins
- Build: Run
npm run build
- Queue: Configure queue workers for notifications
- Cache: Set up Redis for caching
- Fork the repository
- Create a feature branch
- Make changes with tests
- Submit a pull request
This project is open-sourced under the MIT license.