About
## The problem it solves
Every developer knows the feeling: you join a new team, inherit a legacy project, or want to evaluate an open-source library and you spend hours clicking through files, reading stale **READMEs**, and trying to figure out where anything lives.
**READMEs** are out of date. Wikis are empty. "*Just read the code*" isn't onboarding it's archaeology.
DevShrink automates the first pass. Paste any **public GitHub URL** and get a structured onboarding report in under 60 seconds:
- ๐๏ธ **Architecture diagram** (Mermaid) - ๐ **Setup guide** with exact shell commands - ๐ **Key files** what they do and why they matter - ๐งฑ **Tech stack** with evidence - โก **Code quality assessment** what's good, what's missing - ๐งช **Testing status** - ๐ **Security observations** - ๐ฏ **First contribution** a specific scoped task All streaming in **real-time** via Server-Sent Events. No polling, no waiting. #### Use cases - ๐ **Onboarding** understand a new team's codebase in minutes - ๐ **Evaluation** vet a library or tool before adopting it - ๐ **Open source** give contributors a living onboarding document - ๐ง **Code review prep** get the full picture before diving in **Zero setup. No sign-up. No fluff.**
## Challenges we ran into
### 1. SSE streaming vs response buffering
**Problem:** *fetch()* with *ReadableStream.getReader()* buffers the entire response body on most browsers before yielding to the reader. All AI tokens arrived at once when the connection closed, defeating the purpose of streaming.
**Fix:** Switched to native *EventSource* (Server-Sent Events). This required changing the endpoint from *POST* to *GET* (passing the repo URL as a query parameter), but now each event arrives in real-time with zero buffering.
**Key trade-off:** SSE is GET-only, so the URL is visible in server logs. Worth it for real-time streaming.
---
### 2. Gevent + SSL โ RecursionError on deployment
**Problem:** Deploying with *gunicorn --worker-class gevent* caused infinite recursion in Python's *ssl* module:
*RecursionError: maximum recursion depth exceeded*
Root cause: gevent monkey-patches *ssl*, but *requests* / *urllib3* had already imported and cached SSL references before the patch ran. This is a [well-known issue](https://github.com/gevent/gevent/issues/1016) with gevent + SSL.
**Fix:** Moved *gevent.monkey.patch_all()* to the absolute first line of *app.py*, before any other import, including the standard library. This ensures SSL is patched before any library caches it:
```
import gevent.monkey gevent.monkey.patch_all() ```
This single line fixed the entire deployment.
---
### 3. ES6 modules blocked by wrong MIME type
**Problem:** Hosting on Render.com served *.js* files as *Content-Type: text/plain* instead of *application/javascript*. Modern browsers strictly enforce *application/javascript* for *type="module"* scripts blocking the entire frontend from loading.
**Fix:** Python's *mimetypes* module on Linux was mapping *.js* incorrectly. Overrode it at app startup:
```
import mimetypes mimetypes.add_type('application/javascript', '.js') mimetypes.add_type('text/css', '.css') ```
---
### 4. Thread-safe rate limiting
**Problem:** Added IP-based rate limiting (2 requests per minute) with a sliding window. Flask's *threaded=True* (default since Flask 1.0) spawns a new thread per request. Two concurrent requests from the same IP could race past the check both seeing 0 timestamps.
**Fix:** Wrapped the timestamp read-modify-write cycle with *threading.Lock* and used *time.monotonic()* (immune to system clock changes) instead of *time.time()*.
Screenshots
Team
From the public Devfolio project page. Votes, swipes and the judge score are hackfeed's own.







