-
Notifications
You must be signed in to change notification settings - Fork 0
frontend
BrunoV21 edited this page Apr 11, 2025
·
1 revision
The Git Recap frontend is a React application built with Vite, featuring a pixel-retro UI design and real-time WebSocket communication with the backend.
app/git-recap/
├── src/
│ ├── App.tsx # Main application component
│ ├── App.css # Main component styles
│ ├── main.tsx # Application entry point
│ ├── index.css # Global styles
│ ├── assets/ # Static assets (images, fonts)
│ ├── components/ # Reusable UI components
│ │ ├── AuthButton.tsx # Authentication component
│ │ ├── RepoSelector.tsx # Repository selection
│ │ ├── SummaryView.tsx # LLM summary display
│ │ └── Loading.tsx # Loading indicators
│ ├── hooks/ # Custom React hooks
│ │ ├── useAuth.ts # Authentication logic
│ │ └── useWebSocket.ts # WebSocket management
│ └── types/ # TypeScript type definitions
├── public/ # Static public files
├── package.json # Project dependencies
├── tsconfig.json # TypeScript configuration
└── vite.config.ts # Vite configuration
- GitHub OAuth integration via
/auth/githubendpoint - Personal Access Token (PAT) fallback option
- Session management with JWT tokens
- Automatic token refresh handling
- Dynamic loading of available repositories from connected providers
- Multi-select interface with search functionality
- Visual indicators for private/public repositories
- Caching of repository lists for performance
- WebSocket connection to
/wsendpoint for real-time updates - Configurable summary length options (5/10/15 points)
- Animated loading states during LLM processing
- Copy-to-clipboard functionality for generated summaries
- Pixel-art styled buttons and controls
- Retro terminal-like output display
- Responsive layout for desktop and mobile
- Dark/light theme support
- React 18 with TypeScript
- Vite for development/build tooling
- WebSocket API for real-time communication
- react-markdown for formatted output display
- pixel-retroui for UI components
- ESLint + Prettier for code quality
- Vitest for unit testing
- Storybook for component development (optional)
- Docker for containerized development
Required frontend environment variables:
VITE_API_BASE_URL=http://localhost:8000 # Backend API base URL
VITE_WS_BASE_URL=ws://localhost:8000 # WebSocket base URL
VITE_GITHUB_CLIENT_ID=your_client_id # GitHub OAuth client ID-
Install dependencies:
cd app/git-recap npm install -
Start development server:
npm run dev
-
Run tests:
npm test
To create an optimized production build:
npm run buildThe output will be in the dist/ directory, ready for deployment.
- WebSocket connections may drop on unstable networks
- Large repository lists may impact performance
- Mobile experience needs further optimization