Skip to content

AnupBhat30/xpose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Xpose

A repository exploration tool that extracts and displays the complete contents of public Git repositories or local ZIP files. Built with Next.js and FastAPI, it provides syntax-highlighted code browsing with efficient handling of large repository structures.

Key Techniques

  • Virtual rendering with Intersection Observer API and requestAnimationFrame for performant scrolling through large codebases
  • Syntax highlighting via Prism.js with support for 10+ languages
  • Async file operations using aiofiles for non-blocking I/O
  • CORS and compression middleware with conditional GZip encoding
  • Request correlation through custom middleware that generates and propagates unique request IDs for tracing
  • Structured logging with JSON-serialized events including performance metrics
  • Binary file detection with heuristic sampling to distinguish text from binary content
  • URL validation and normalization for Git repositories with allowlist-based host verification

Technologies

Project Structure

├── frontend/
│   ├── app/
│   │   ├── page.tsx          # Main repository explorer component
│   │   ├── layout.tsx        # Root layout with font setup
│   │   ├── error.tsx         # Error boundary wrapper
│   │   └── globals.css       # Global styles
│   ├── components/
│   │   └── ErrorBoundary.tsx # Error fallback component
│   ├── next.config.js        # Next.js configuration
│   ├── tailwind.config.js    # Custom design tokens
│   └── tsconfig.json         # TypeScript strict mode
├── backend/
│   ├── main.py               # FastAPI application
│   ├── gunicorn.conf.py      # Production WSGI config
│   ├── requirements.txt       # Python dependencies
│   └── tests/
│       └── test_healthz.py   # Health check tests
└── .gitignore               # Git exclusions for Node/Python

frontend/app/ - Next.js App Router pages with server/client boundary. The page.tsx implements virtual list rendering for efficient browsing of large repository structures with live syntax highlighting.

backend/ - FastAPI routes for repository extraction. Handles Git cloning with timeout protection, ZIP extraction with size limits, and file content retrieval with token counting for language models.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors