The Idea
I wanted a summer break project that wasn't just another to-do app. Something that would touch a few different skills: backend API design, error handling, PDF generation, and a bit of frontend — without getting too ambitious to finish.
The result: a File Analysis & Report System built with FastAPI. You upload a file (or several), it detects the type, runs a type-specific analyzer, and hands back a structured report — either as JSON or as a downloadable PDF.
What It Does
- Supports 7 file types:
.py,.js,.json,.csv,.xml,.yaml,.md - Each type gets its own analyzer:
- Python →
astmodule for syntax checking and import detection - JSON/YAML → parses and reports validity + top-level keys
- CSV → column consistency checks
- XML → element tree parsing
- Markdown → heading/link/code-block counting
- Python →
- Single or batch upload, with a live web UI
- PDF export (single file or combined batch report)
- Dockerized —
docker runand you're up
A Few Things I'd Do Differently
1. Design for compactness from the start.
My first PDF export put each file on its own page. For 10 files, that's 11 pages, mostly blank. I only noticed how wasteful it looked once I actually printed a preview — the fix was switching from forced page breaks to a flowing layout, which cut page count by ~70%.
2. Error handling isn't optional, it's the whole point.
The one thing that broke the app the most during testing was assuming a file would parse cleanly. A single malformed JSON or an unclosed parenthesis in Python would 500 the whole request if I didn't wrap the parsing in try/except. Once I made every analyzer fail gracefully into the report format instead of throwing, the whole system got a lot more trustworthy.
3. .gitignore matters more than I thought.
Early on I accidentally committed my entire venv/ folder — 3,500+ files. Lesson learned: set up .gitignore before your first commit, not after.
Tech Stack
-
Backend: FastAPI, Python's
ast/csv/xml/jsonstdlib modules, PyYAML - PDF generation: ReportLab, with a Unicode font for proper character support
- Frontend: Vanilla HTML/CSS/JS (no framework — kept it simple), localStorage for history
- Containerization: Docker + docker-compose
Try It
Repo's here if you want to poke around or use it: github.com/SamulVanunu/dosya-analiz-sistemi
Happy to hear feedback, especially on the analyzer architecture — I tried to keep it modular (a BaseAnalyzer interface) so adding new file types is just a few lines of code, but I'm curious if there's a cleaner pattern.
Top comments (0)