AI-powered code analysis platform that provides intelligent code reviews using Google Gemini AI
- Deep Code Analysis using Google Gemini 2.5 Flash
- Logical Error Detection - infinite loops, off-by-one errors, race conditions
- Syntax & Semantic Analysis - type mismatches, undefined variables, incorrect API usage
- Performance & Security Insights - memory leaks, security vulnerabilities
- Interactive Code Viewer with line-by-line issue highlighting
- Severity-based Classification (High, Medium, Low priority issues)
- Code Quality Metrics - readability, maintainability, efficiency, security scores
- Execution Analysis - predicts if code will compile and run successfully
- Beautiful Glass Morphism Design with animated gradients
- Real-time Dashboard with search and filtering
- Responsive Design that works on all devices
- Dark/Light Theme support
- JavaScript/TypeScript - hoisting issues, closure problems, async/await analysis
- Python - indentation errors, mutable defaults, import circular dependencies
- Java - null pointer exceptions, type casting issues
- C++ - memory management, pointer arithmetic, buffer overflows
- And many more...
Frontend:
- β‘ Next.js 15 (App Router) with Turbopack
- π¨ Tailwind CSS 4 with custom animations
- π± Shadcn/UI components
- π¬ Framer Motion for smooth animations
- π§ TypeScript for type safety
Backend:
- π Next.js API Routes
- π§ Google Gemini AI 2.5 Flash for code analysis
- ποΈ PostgreSQL with connection pooling
- π Environment-based configuration
Development:
- π¦ Radix UI for accessible components
- π― Lucide React for beautiful icons
- π₯ React Hot Toast for notifications
- π οΈ Class Variance Authority for component variants
- Node.js 18+
- PostgreSQL database
- Google Gemini API key
- Clone the repository
git clone https://github.com/yourusername/codesage-ai.git
cd codesage-ai- Install dependencies
npm install- Set up environment variables
cp .env.example .env.localEdit .env.local:
DATABASE_URL="postgresql://username:password@localhost:5432/codesage"
GEMINI_API_KEY="your-google-gemini-api-key"- Set up the database
# Run your database migrations (if using Prisma/Drizzle)
npm run db:push- Run the development server
npm run dev
*Interactive dashboard with document management and statistics*
*Detailed code analysis with line-by-line issue highlighting*
| Variable | Description | Required |
|---|---|---|
DATABASE_URL |
PostgreSQL connection string | β |
GEMINI_API_KEY |
Google Gemini AI API key | β |
NODE_ENV |
Environment (development/production) | β |
The platform currently supports deep analysis for:
- JavaScript/TypeScript
- Python
- Java
- C++
- SQL
- CSS
- And more via Gemini AI
π UNTHINKABLETASKCODERIEVEWAPP/
ββ π app/ # Next.js 15 App Router
β ββ π (auth)/ # Route group for auth pages
β β ββ π login/page.tsx # /login
β β ββ π register/page.tsx # /register
β ββ π (dashboard)/ # Route group for dashboard
β β ββ π code-understand/ # /code-understand
β β ββ π dashboard/ # /dashboard
β β ββ π report/[id]/ # /report/:id
β β ββ π settings/ # /settings
β β ββ π upload/ # /upload
β β ββ π layout.tsx # Shared layout for dashboard group
β β ββ π page.tsx # Default page for dashboard group
β ββ π api/ # API routes
β β ββ π analyze/ # /api/analyze
β β ββ π documents/ # /api/documents
β β β ββ π [id]/ # /api/documents/:id
β β ββ π understand/ # /api/understand
β ββ π layout.tsx # Root layout
β ββ π page.tsx # Home page
β ββ π globals.css # Global styles
β ββ π favicon.ico # App icon
ββ π components/ # Reusable React components
β ββ π ui/ # Shadcn/UI components
β β ββ π codeExplaination.tsx # Custom UI component
β ββ π Navbar.tsx # Navigation bar
ββ π lib/ # Utility libraries
β ββ π colors-utils.ts # Color utilities
β ββ π date-utils.ts # Date helpers
β ββ π db.ts # Database configuration
β ββ π files-utils.ts # File helpers
β ββ π icons-utils.tsx # Icon helpers
β ββ π quality-utils.tsx # Quality checks
β ββ π types.ts # TypeScript definitions
β ββ π utils.ts # General utilities
ββ π public/ # Static assets
β ββ π eny/aitianare # Sample static file
ββ π node_modules/ # Dependencies (auto-generated)
- Navigate to the dashboard
- Upload your code file or paste code directly
- Select the programming language
- The system automatically analyzes your code using Gemini AI
- Real-time progress tracking
- Deep logical and syntax analysis
- View detailed analysis report
- See line-by-line issue highlighting
- Check code quality metrics
- Get AI-powered improvement suggestions
- Implement suggested fixes
- Export analysis reports
- Track code quality improvements over time