Skip to content
CodeSpotlight

CodeSpotlight

The Developer Proof-Of-Work Platform

Created on 5th May 2026

•

CodeSpotlight

CodeSpotlight

The Developer Proof-Of-Work Platform

The problem CodeSpotlight solves

CodeSpotlight ✨

The Developer Proof-of-Work Platform
Transform any public GitHub repository into a beautifully rendered, AI-powered case study.

Live Application / Deployment Link: https://codespotlight-hm.web.app

Watch Demo:


📖 Overview

Many developers build great projects but lose them in scattered GitHub repositories. CodeSpotlight is a centralized showcase directory where developers can host their deployed projects, generate AI-powered technical deep-dives, and present their work to recruiters through a polished, read-only portfolio interface.

Paste a GitHub URL, and CodeSpotlight's integration with Gemini AI and the GitHub API instantly generates architecture diagrams, commit heatmaps, language visualizations, and a fully formatted Markdown README.


✨ Features

  • 🤖 AI Technical Deep Dive: Gemini 2.5 Flash generates a comprehensive case study explaining the project's purpose, the hardest problems solved, and the architectural decisions made.
  • 📄 Auto-Generated READMEs: Export your AI-generated project analysis to beautiful, fully-formatted Markdown, ready to be pushed directly to your GitHub repository.
  • 🏗️ Architecture Diagrams: Auto-generated Mermaid.js flowcharts visualize components, data flow, and system interactions in a secure sandboxed iframe.
  • 🔥 Commit Heatmap: A real 52-week × 7-day contribution grid pulled live from GitHub to showcase consistent effort.
  • 🌍 Public Discoverability: A global "Discover" feed where developers can browse top projects filtered by tech stack (MERN, Web3, AI, etc.).
  • 🔐 Secure Portfolio Sharing: Share a read-only link to your portfolio with recruiters without exposing edit/delete controls. Includes customizable social links (LinkedIn, Twitter, Portfolio).

🛠️ Tech Stack

Frontend

  • Framework: Flutter Web (Canvas Kit)
  • Routing: go_router for shareable deep links
  • Markdown: flutter_markdown
  • Hosting: Firebase Hosting

Backend

  • Framework: Node.js + Express
  • Authentication: JWT (JSON Web Tokens)
  • Database: MongoDB Atlas (Mongoose)
  • AI Integration: @google/generative-ai (Gemini 2.5 Flash)
  • Hosting: Render.com

🌐 Deployment Information

This project is fully deployed and accessible live for the hackathon judging process:

  • Frontend (Flutter Web): Deployed on Firebase Hosting
  • Backend (Node.js/Express): Deployed on Render.com
  • Database (MongoDB): Hosted on MongoDB Atlas
  • Live URL: https://codespotlight-hm.web.app

🚀 Getting Started

Follow these instructions to set up the project locally.

Prerequisites

1. Backend Setup

# Navigate to the backend directory
cd backend

# Copy the environment template
cp .env.example .env

Configure Environment Variables (backend/.env):

VariableDescription
PORTAPI port (default: 3000)
MONGODB_URIMongoDB Atlas connection string
JWT_SECRETSecret key for signing authentication tokens
GITHUB_PATGitHub Personal Access Token (public repo scope)
GEMINI_API_KEYGoogle AI Studio key
CLIENT_URLFrontend URL for CORS (e.g., http://localhost:52870)
# Install dependencies
npm install

# Start the development server
npm run dev

2. Frontend Setup

# Open a new terminal and navigate to the frontend directory
cd frontend

# Get dependencies
flutter pub get

# Run the Flutter web app (Chrome)
flutter run -d chrome

Note: The frontend is configured to communicate with http://localhost:3000/api by default.


📂 Project Structure

CodeSpotlight/
├── backend/
│   ├── src/
│   │   ├── controllers/      # Route logic
│   │   ├── models/           # Mongoose schemas (User, Project)
│   │   ├── routes/           # Express routes (auth.js, projects.js)
│   │   └── services/         # Integrations (geminiService.js, githubService.js)
│   └── index.js              # Server entry point
│
├── frontend/
│   ├── lib/
│   │   ├── models/           # Dart data models
│   │   ├── pages/            # UI Screens (Dashboard, Discover, Detail)
│   │   ├── services/         # API & Auth clients
│   │   ├── theme/            # Global AppTheme and styling
│   │   └── widgets/          # Reusable UI (Cards, Heatmap, Mermaid)
│   └── web/                  # Web-specific assets (index.html)
│
└── deploy.sh                 # Deployment automation script

Challenges I ran into

🧩 The Challenge: AI Non-Determinism & Frontend Crashes

One of the most complex hurdles we faced was reliably rendering the AI-generated architecture diagrams without crashing the frontend.

We integrated Gemini 2.5 Flash to analyze repositories and output Mermaid.js flowchart syntax. However, Large Language Models are inherently non-deterministic. Even with strict prompt engineering, the AI would occasionally return slightly invalid syntax, such as:

  • Injecting unexpected Markdown code fences (e.g., ```mermaid).
  • Using parentheses inside node definitions.

When our Flutter frontend attempted to parse these edge cases inside the iframe, the Mermaid renderer would throw a fatal syntax error, causing the UI component to crash completely.

🛠️ The Solution: A Robust Middleware Sanitizer

We quickly realized that prompt engineering alone wasn't enough to guarantee stability. To solve this, we built a regex-based middleware sanitizer directly into our Node.js backend.

Before saving any AI output to MongoDB, this custom data pipeline intercepts the response and performs aggressive cleaning:

  1. Strips rogue markdown fences to ensure raw text execution.
  2. Enforces correct graph directives (e.g., defaulting to graph TD).
  3. Automatically converts invalid characters (like nested parentheses) into safe, quoted string labels using Regex.

The Impact: By implementing this middle-layer sanitizer, we transformed an unpredictable AI output into a 100% deterministic, crash-proof data source, allowing our UI to render complex architecture diagrams flawlessly every single time.

Discussion

Builders also viewed

See more projects on Devfolio