A fully functional document management app built on Devvit that runs on Reddit!
-
Upload Documents
- Upload images (PNG, JPG, JPEG, GIF, BMP) and PDFs
- Max file size: 2MB
- Preview before saving
-
Add Descriptions & Notes
- Required description for each document
- Optional notes field for additional text/content
- Perfect for manually adding text from documents
-
View All Documents
- Grid view of all uploaded documents
- Click to view full details
- Shows thumbnails, descriptions, and timestamps
-
Document Details
- Full-size image view
- All metadata (filename, description, notes, upload date)
- Delete functionality
-
Redis Storage
- All documents stored per-post in Redis
- Keeps last 100 documents per post
- Fast retrieval and persistence
-
Start the app:
npm run dev
-
Open the playtest URL in your browser (shown in terminal)
-
Upload a document:
- Click "Upload Document" tab
- Select an image file
- Add a description (required)
- Add notes (optional) - this is where you can manually type text from the document
- Click "Save Document"
-
View your documents:
- Click "My Documents" tab
- See all uploaded documents in a grid
- Click any document to view full details
- Client: React with TypeScript, Tailwind CSS
- Server: Express with Devvit APIs
- Storage: Redis (per-post storage)
- Authentication: Automatic via Reddit/Devvit
The original OCR approach failed because:
- External API calls (OCR.space) are blocked by Devvit
- Client-side OCR libraries (tesseract-wasm) violate CSP with
unsafe-eval - Devvit has strict security policies for external domains
This Document Manager works because:
- No external API calls needed
- All processing happens client-side (file reading) or server-side (Redis storage)
- Users can manually add text content in the notes field
- Fully compliant with Devvit's security model
To add real OCR functionality, you would need to:
-
Deploy your own backend API (e.g., on Vercel, Railway, or AWS Lambda)
- This API would accept image uploads
- Call OCR.space or Tesseract on the server
- Return extracted text
-
Request Devvit to whitelist your domain
- Contact Reddit developers
- Provide your API domain
- Wait for approval
-
Update the app to call your proxy instead of OCR.space directly
Pros: Real OCR functionality Cons: Requires infrastructure, costs, and Devvit approval
Instead of OCR, you could add:
-
Image Filters/Effects
- Client-side canvas manipulation
- Brightness, contrast, rotation
- No external APIs needed
-
Document Categories/Tags
- Organize documents by type
- Search and filter functionality
- All stored in Redis
-
Sharing & Collaboration
- Share documents with other Reddit users
- Comments on documents
- Use Devvit's Reddit API
-
Export Functionality
- Download all documents as ZIP
- Export notes as text file
- Generate PDF reports
-
Document Templates
- Pre-made templates for receipts, invoices, etc.
- Fill-in forms
- Save as documents
-
Barcode/QR Code Scanner
- Use browser APIs for scanning
- No external services needed
- Store scanned codes with documents
All of these work within Devvit's constraints and don't require external APIs!
For a production app, I'd suggest:
- Keep the Document Manager as-is (it works great!)
- Add categories/tags for organization
- Add search functionality
- Consider Option B (proxy server) only if OCR is absolutely critical
- Focus on features that enhance the document management experience
The current app is fully functional and ready to use on Reddit!