A retro-futuristic terminal-style UI for AI-powered open source mentorship
The FirstPR frontend is a React-based web application that provides an immersive, hacker-themed interface for interacting with the AI mentor system. Built with modern web technologies and styled with a unique CRT terminal aesthetic.
- 🖥️ Retro Terminal UI - Authentic CRT monitor effect with scanlines, matrix rain, and phosphor glow
- ⚡ Lightning-Fast - Powered by Vite for instant HMR and optimized builds
- 🎨 Custom Design System - Monospace typography (JetBrains Mono) with green phosphor theme
- 💬 Interactive Chat Interface - Smooth animations and real-time responses
- 📱 Responsive Design - Works seamlessly on desktop and mobile devices
- 🎭 Framer Motion Animations - Buttery-smooth transitions and micro-interactions
- 🔒 Type-Safe - ESLint configuration for code quality
- 🎯 Component-Based Architecture - Modular and maintainable codebase
- React 19 - Latest version with modern hooks
- Vite 8 - Next-generation frontend tooling
- Tailwind CSS 4 - Utility-first CSS framework
- Framer Motion 12 - Production-ready animation library
- Lucide React - Beautiful, consistent icon set
- JetBrains Mono - Professional monospace font
Before you begin, ensure you have:
- Node.js 18+ - Download Node.js
- npm or yarn - Package manager (comes with Node.js)
npm installnpm run devThe application will open at http://localhost:5173
npm run buildProduction files will be generated in the dist/ directory.
npm run previewfrontend/
├── src/
│ ├── App.jsx # Main application component with terminal UI
│ ├── Chatbox.jsx # Chat interface component
│ ├── main.jsx # React entry point
│ ├── index.css # Global styles
│ └── assets/ # Static assets (images, icons)
│
├── public/
│ └── PR.svg # Favicon
│
├── index.html # HTML entry point
├── package.json # Dependencies and scripts
├── vite.config.js # Vite configuration
├── eslint.config.js # ESLint rules
└── README.md # This file
The UI is designed to evoke the feeling of a retro hacker terminal:
- Matrix Rain Background - Animated falling characters using Canvas API
- Scanline Effect - Horizontal lines simulating CRT display
- Phosphor Glow - Green text with authentic glow and text shadows
- CRT Vignette - Subtle edge darkening for depth
- Monospace Typography - JetBrains Mono for that authentic terminal feel
--green: #00ff41; /* Primary phosphor green */
--green-dim: #00cc33; /* Dimmed green */
--green-muted: #00882288; /* Muted green with transparency */
--black: #000000; /* Pure black background */
--surface: #050f05; /* Dark surface */
--border: #00ff4122; /* Border with low opacity */- Matrix Rain - Canvas-based falling characters
- Scanline Animation - Continuous CRT effect
- Glitch Effect - Periodic RGB split on logo
- Typing Animation - Smooth message appearance
- Cursor Blink - Classic terminal cursor
The frontend communicates with the FastAPI backend running on http://127.0.0.1:8000
Create a .env file in the frontend directory:
VITE_API_URL=http://127.0.0.1:8000For production:
VITE_API_URL=https://your-backend-url.comPOST /api/load-repo- Load and index a repositoryPOST /api/analyze-issue- Analyze an issue and get contribution guidePOST /api/ask- Ask questions about the codebase
# Start development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview
# Lint code
npm run lintMain application component featuring:
- Matrix rain background animation
- Terminal-style UI wrapper
- Global styling and theme
- CRT effects (scanlines, vignette)
- Chat interface integration
Interactive chat component with:
- Message history display
- Typing indicators
- Smooth animations
- Code syntax highlighting
- Auto-scroll functionality
- Input field with terminal styling
Edit the CSS variables in src/App.jsx:
const globalStyles = `
:root {
--green: #00ff41; /* Change this to your color */
--green-dim: #00cc33;
/* ... more variables */
}
`;Modify animation keyframes in the global styles or use Framer Motion's animation props:
<motion.div
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
transition={{ duration: 0.5 }}
>
{/* Your content */}
</motion.div>- Push your code to GitHub
- Connect your repository to Vercel
- Configure environment variables
- Deploy automatically
Current deployment: https://firstpr-mentor.vercel.app
# Build command
npm run build
# Publish directory
dist# Build the project
npm run build
# Upload the dist/ folder to your hosting serviceIf port 5173 is occupied:
# Kill the process
lsof -ti:5173 | xargs kill -9
# Or use a different port
vite --port 3000# Clear node_modules and reinstall
rm -rf node_modules package-lock.json
npm installEnsure your backend allows the frontend origin in CORS settings:
# In backend main.py
allow_origins=[
"http://localhost:5173", # Add your frontend URL
]Vite provides instant HMR - your changes appear immediately without full page reload.
Use React DevTools extension for debugging:
- Use
React.memo()for expensive components - Lazy load routes with
React.lazy() - Optimize images with proper formats (WebP)
- Use production builds for deployment
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is part of FirstPR and is open source under the MIT License.