How bit-waiz/bit-protector works
Bit Protector is a client-side file metadata inspection and sanitization app. Users select a file, review detected metadata and a risk verdict, choose categories to remove, then clean, re-inspect, and download the result. The README documents image, PDF, and Office-format support; the sampled extractor and sanitizer excerpts do not expose every format-specific implementation or all UI callback wiring.
Main entry points: App.tsx App workflow · sanitizer.ts Format cleaning · extractor.ts Format extraction · PurgeControls.tsx Purge choices
Components 17
User interface
- App workflow
src/App.tsx - File selection
src/components/Dropzone.tsx - Risk verdict
src/components/RiskVerdictBanner.tsx - Metadata review
src/components/MetadataTable.tsx - Purge choices
src/components/PurgeControls.tsx - Privacy FAQ
src/components/FaqSection.tsx
Metadata inspection
- Format extraction
src/lib/extractor.ts - Image metadata
src/lib/extractor.ts - PDF metadata
src/lib/extractor.ts - Office metadata
src/lib/extractor.ts
Sanitization
- Format cleaning
src/lib/sanitizer.ts - Image cleaning
src/lib/sanitizer.ts - PDF cleaning
src/lib/sanitizer.ts - Office cleaning
src/lib/sanitizer.ts - Clean download
src/App.tsx
Shared model
- Result and options
src/lib/types.ts
Other components
- User
Connections 21
- User → File selection: selects file
- File selection → App workflow: passes file
- App workflow → Format extraction: inspects file
- Format extraction → Image metadata: parses image
- Format extraction → PDF metadata: parses PDF
- Format extraction → Office metadata: parses Office
- Format extraction → Result and options: returns result
- App workflow → Risk verdict: supplies inspection
- App workflow → Metadata review: supplies inspection
- App workflow → Purge choices: supplies inspection
- User → Purge choices: chooses categories
- Purge choices → App workflow: updates options
- App workflow → Format cleaning: cleans file
- Format cleaning → Image cleaning: cleans image
- Format cleaning → PDF cleaning: cleans PDF
- Format cleaning → Office cleaning: cleans Office
- Format cleaning → Format extraction: verifies output
- Format cleaning → Result and options: returns result
- App workflow → Clean download: starts download
- Clean download → User: provides file
- App workflow → Privacy FAQ: shows FAQ