Skip to content

tanmaydev56/UNTHINKABLE_TASK

Repository files navigation

πŸš€ AI Code Review Assistant

Next.js TypeScript Tailwind CSS

AI-powered code analysis platform that provides intelligent code reviews using Google Gemini AI

image

✨ Features

πŸ€– AI-Powered Analysis

  • 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

πŸ“Š Comprehensive Reporting

  • 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

🎨 Modern UI/UX

  • 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

πŸ”§ Multi-Language 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...

πŸ› οΈ Tech Stack

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

πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • PostgreSQL database
  • Google Gemini API key

Installation

  1. Clone the repository
git clone https://github.com/yourusername/codesage-ai.git
cd codesage-ai
  1. Install dependencies
npm install
  1. Set up environment variables
cp .env.example .env.local

Edit .env.local:

DATABASE_URL="postgresql://username:password@localhost:5432/codesage"
GEMINI_API_KEY="your-google-gemini-api-key"
  1. Set up the database
# Run your database migrations (if using Prisma/Drizzle)
npm run db:push
  1. Run the development server
npm run dev

πŸ“Έ Screenshots

Dashboard

image *Interactive dashboard with document management and statistics*

Code Analysis Report

image *Detailed code analysis with line-by-line issue highlighting*

πŸ”§ Configuration

Environment Variables

Variable Description Required
DATABASE_URL PostgreSQL connection string βœ…
GEMINI_API_KEY Google Gemini AI API key βœ…
NODE_ENV Environment (development/production) ❌

Supported Languages

The platform currently supports deep analysis for:

  • JavaScript/TypeScript
  • Python
  • Java
  • C++
  • SQL
  • CSS
  • And more via Gemini AI

πŸ—οΈ Project Structure

πŸ“ 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)

🎯 Usage

1. Upload Code

  • Navigate to the dashboard
  • Upload your code file or paste code directly
  • Select the programming language

2. AI Analysis

  • The system automatically analyzes your code using Gemini AI
  • Real-time progress tracking
  • Deep logical and syntax analysis

3. Review Results

  • View detailed analysis report
  • See line-by-line issue highlighting
  • Check code quality metrics
  • Get AI-powered improvement suggestions

4. Take Action

  • Implement suggested fixes
  • Export analysis reports
  • Track code quality improvements over time

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published