Skip to content

feat(web): add Next.js frontend with conversion history persistence#36

Open
szj2ys wants to merge 1 commit intoBIT-DataLab:mainfrom
szj2ys:T0-history-persistence-rebased
Open

feat(web): add Next.js frontend with conversion history persistence#36
szj2ys wants to merge 1 commit intoBIT-DataLab:mainfrom
szj2ys:T0-history-persistence-rebased

Conversation

@szj2ys
Copy link

@szj2ys szj2ys commented Mar 14, 2026

Summary

Adds complete Next.js 16 + React 19 frontend for EditBanana with conversion history persistence using localStorage. This reconciles the frontend codebase with the backend repository.

Changes

Frontend Foundation

  • Next.js 16 with React 19, TypeScript, Tailwind CSS
  • Responsive landing page (Hero, Upload, Features, Example Showcase)
  • Vercel Analytics integration
  • ESLint and modern tooling setup

Core Features

  • File Upload: Drag-and-drop with validation
  • Progress Tracking: Real-time conversion status via polling
  • Download: Direct result download after conversion

History Persistence (Key Feature)

  • types/history.ts: Type definitions for history items
  • hooks/use-conversion-history.ts: localStorage-backed history management
  • components/history/conversion-history-provider.tsx: React Context provider
  • app/sections/history-section.tsx: Full UI with animations
  • Max 50 items with FIFO eviction
  • Track status: pending, completed, failed, cancelled
  • One-click download from history
  • Individual remove + bulk clear options

User Value

  • Retention: Never lose converted files - download anytime without re-upload
  • Transparency: Clear conversion status with error messages
  • Convenience: History navigation in navbar, quick access to past conversions
  • Control: Manage history with per-item removal or clear all

Technical Architecture

  • React Context for global history state
  • Custom hook abstracts localStorage persistence
  • Framer Motion for smooth animations
  • Fully typed with TypeScript

Verification

  • Build passes: npm run build
  • TypeScript compilation successful
  • localStorage persistence verified
  • History CRUD operations working
  • Responsive design verified

Notes

This PR merges the previously separate frontend repository into the main codebase, establishing a unified full-stack project structure.

Add complete Next.js 16 + React 19 frontend for EditBanana:

- Landing page with Hero, Upload, Features, and Example Showcase sections
- File upload with drag-and-drop support
- Real-time conversion progress tracking via WebSocket
- Conversion history persistence using localStorage
  - Track pending/completed/failed/cancelled conversions
  - Download previous results without re-uploading
  - Remove individual items or clear all history
  - Max 50 items with automatic FIFO eviction
- Responsive design with Tailwind CSS and Framer Motion animations
- Vercel Analytics integration

Technical details:
- React Context for history state management
- Custom useConversionHistory hook with localStorage persistence
- HistorySection component with status icons and download links
- API integration for file upload, job status, and result download
szj2ys pushed a commit to szj2ys/Edit-Banana-1 that referenced this pull request Mar 14, 2026
Merged example images feature from PR BIT-DataLab#35 with history persistence from PR BIT-DataLab#36.

Features combined:
- Real example images in showcase (/examples/*.jpg, *.png)
- History persistence with localStorage
- History navigation link in navbar
- Conversion history tracking in upload section
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant