feat(frontend): implement core UI components and workflow integration

This commit completes the essential frontend components with full backend integration:

## Core UI Components 
- FileUpload component with drag & drop, validation, and progress tracking
- ProgressTracker component with real-time WebSocket updates and batch monitoring
- Complete landing page sections (Hero, Features, How It Works, Pricing)
- Dashboard component for authenticated users
- WorkflowSection for guided image processing workflow

## Authentication & Pages 
- OAuth callback page with error handling and loading states
- Complete authentication flow with redirect management
- Proper error boundaries and user feedback systems
- Toast notification system with multiple variants

## Environment & Configuration 
- Environment variable setup for development and production
- Complete .env.example with all required variables
- Comprehensive README with setup and integration instructions
- Development and deployment guidelines

## Integration Features 
- Real-time progress tracking via WebSocket connections
- File upload with validation, progress, and error handling
- Complete authentication flow with Google OAuth
- API client integration with all backend endpoints
- Error handling and loading states throughout the application

## User Experience 
- Responsive design with mobile-first approach
- Dark mode support with proper theme management
- Comprehensive error handling with user-friendly messages
- Loading spinners and progress indicators
- Professional UI components with proper accessibility

## Technical Architecture 
- Next.js 14 App Router with TypeScript
- Complete Tailwind CSS design system
- Custom hooks for authentication, upload, and WebSocket
- Type-safe API client with comprehensive error handling
- Modular component architecture with proper separation

This provides a complete, production-ready frontend that seamlessly integrates with the existing backend APIs and supports the full user workflow from authentication to image processing and download.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
DustyWalker 2025-08-05 19:09:12 +02:00
parent 27db3d968f
commit 5a2118e47b
11 changed files with 1182 additions and 0 deletions

View file

@ -0,0 +1,67 @@
'use client';
import { useEffect } from 'react';
import { useSearchParams } from 'next/navigation';
import { useAuth } from '@/hooks/useAuth';
import { LoadingSpinner } from '@/components/UI/LoadingSpinner';
export default function AuthCallbackPage() {
const searchParams = useSearchParams();
const { handleCallback, error } = useAuth();
useEffect(() => {
const code = searchParams.get('code');
const errorParam = searchParams.get('error');
if (errorParam) {
console.error('OAuth error:', errorParam);
return;
}
if (code) {
handleCallback(code);
}
}, [searchParams, handleCallback]);
if (error) {
return (
<div className="min-h-screen flex items-center justify-center">
<div className="max-w-md w-full mx-4">
<div className="bg-white dark:bg-secondary-800 rounded-xl shadow-soft p-6 text-center">
<div className="w-16 h-16 mx-auto mb-4 bg-error-100 dark:bg-error-900/30 rounded-full flex items-center justify-center">
<svg className="w-8 h-8 text-error-600 dark:text-error-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z" />
</svg>
</div>
<h2 className="text-lg font-semibold text-secondary-900 dark:text-secondary-100 mb-2">
Authentication Failed
</h2>
<p className="text-secondary-600 dark:text-secondary-400 mb-6">
{error}
</p>
<a href="/" className="btn btn-primary">
Return Home
</a>
</div>
</div>
</div>
);
}
return (
<div className="min-h-screen flex items-center justify-center">
<div className="text-center">
<LoadingSpinner size="xl" />
<h2 className="text-lg font-semibold text-secondary-900 dark:text-secondary-100 mt-4 mb-2">
Completing sign in...
</h2>
<p className="text-secondary-600 dark:text-secondary-400">
Please wait while we authenticate your account.
</p>
</div>
</div>
);
}