AI-powered code analysis tool built with Next.js 15, TypeScript, and Google Gemini AI
- Direct Code Input - Paste code directly for instant analysis
- GitHub Repository Analysis - Analyze entire repositories from GitHub URLs
- ZIP File Analysis - Upload and analyze ZIP archives containing code
- Product Requirements Document (PRD) generation
- Development Plan creation with actionable insights
- Performance & Fixes Analysis with optimization recommendations
- 6 Expert Personas for specialized analysis perspectives
- English, Polish, Spanish, German, French output languages
- Intelligent code file detection (25+ programming languages)
- Analysis History with statistics and management
- Multi-Format Export (PDF, Markdown, JSON)
- Toast Notifications for better UX
- Responsive Design with dark/light theme support
- Real-time Progress Indicators
- Framework: Next.js 15 with App Router
- Language: TypeScript (strict mode)
- Styling: TailwindCSS 4 + shadcn/ui
- AI Integration: Google Gemini API
- Testing: Vitest + Testing Library
- Build Tool: Turbopack
- Icons: Lucide React
- File Processing: JSZip
- PDF Generation: jsPDF
- Notifications: Sonner
- Node.js 18+
- npm or yarn
- Google Gemini API key
-
Clone the repository
git clone <repository-url> cd codebase-analyser
-
Install dependencies
npm install
-
Set up environment variables
# Create .env.local file echo "NEXT_PUBLIC_GEMINI_API_KEY=your_gemini_api_key_here" > .env.local
-
Run the development server
npm run dev
-
Open your browser Navigate to http://localhost:3000
- Click the settings icon in the top-right corner
- Enter your Google Gemini API key
- The key is stored securely in your browser's local storage
- Code Tab: Paste code directly or load a sample
- GitHub Tab: Enter a GitHub repository URL
- ZIP Tab: Upload ZIP files containing your codebase
- Language: Select output language (EN, PL, ES, DE, FR)
- Expert Persona: Choose analysis perspective:
- Generalist Software Architect
- Security Specialist
- Startup MVP Coach
- Refactoring Guru
- Performance Optimizer
- UX/UI Advocate
- Click "Analyze Codebase" to start analysis
- View results in organized tabs (PRD, Development Plan, Performance)
- Export results in PDF, Markdown, or JSON format
- Access analysis history for previous results
# Run all tests
npm run test
# Run tests in watch mode
npm run test:ui
# Build for production
npm run build
# Run linting
npm run lint
codebase-analyser/
βββ src/
β βββ app/ # Next.js App Router
β β βββ components/ # React components
β β β βββ display/ # Display components
β β β βββ forms/ # Form components
β β β βββ layout/ # Layout components
β β β βββ ui/ # shadcn/ui components
β β βββ hooks/ # Custom React hooks
β β βββ lib/ # Utility libraries
β β βββ services/ # Business logic services
β β βββ types/ # TypeScript type definitions
β β βββ __tests__/ # Test files
β βββ public/ # Static assets
β βββ docs/ # Documentation
Variable | Description | Required |
---|---|---|
NEXT_PUBLIC_GEMINI_API_KEY |
Google Gemini API key | Optional* |
*Can be configured in the UI settings
The application automatically detects and processes these file types:
- JavaScript/TypeScript:
.js
,.jsx
,.ts
,.tsx
- Python:
.py
- Java:
.java
- C/C++:
.c
,.cpp
,.cs
- Web:
.html
,.css
,.scss
,.sass
- Config:
.json
,.yaml
,.yml
,.toml
- And 15+ more languages
Each persona provides specialized analysis focus:
- π― Generalist: Balanced, comprehensive analysis
- π Security Specialist: Security vulnerabilities and best practices
- π Startup MVP Coach: MVP features and rapid development
- π§ Refactoring Guru: Code quality and maintainability
- β‘ Performance Optimizer: Performance bottlenecks and optimization
- π¨ UX/UI Advocate: User experience and interface considerations
- β Multi-file repository analysis
- β Intelligent code filtering
- β Context-aware AI prompts
- β Size limits and rate limiting
- β Error handling and recovery
- β PDF with formatted layout
- β Markdown for documentation
- β JSON for programmatic use
- β Customizable content selection
- β Persistent analysis history
- β Search and filter capabilities
- β Statistics and insights
- β Export/import functionality
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Next.js for the amazing framework
- shadcn/ui for beautiful UI components
- Google Gemini for powerful AI capabilities
- Vercel for seamless deployment
If you have any questions or need help:
- Check the documentation
- Search existing issues
- Create a new issue
Made with β€οΈ using Next.js 15 and Google Gemini AI