A mobile application that turns photos of documents into searchable, editable PDF files using Mistral AI's OCR engine. Point your camera at any document -- printed text, handwritten notes, receipts, forms -- and get a clean PDF with selectable text in seconds.
frontend/ React Native (Expo) mobile app
backend/ Node.js / Express REST API
docs/ Architecture and context documentation
The frontend captures or selects images and sends them to the backend, which delegates OCR processing to Mistral AI's vision models. The extracted text is post-processed for accuracy (symbol correction, layout preservation) and rendered into a structured PDF using PDFKit.
| Layer | Technologies |
|---|---|
| Mobile | React Native 0.76, Expo, TypeScript, Expo Router, React Native Paper |
| Backend | Node.js 18, Express, MongoDB (Mongoose), JWT auth |
| OCR | Mistral AI OCR API (mistral-ocr-latest, mistral-large-latest) |
| PDFKit with layout-aware rendering (headings, lists, tables, columns) | |
| Auth | JWT + bcrypt, Apple Sign-In (expo-apple-authentication) |
| Payments | RevenueCat (react-native-purchases) for iOS/Android subscriptions |
| Encryption | Client-side XOR file encryption before upload |
| Deploy | Railway (Nixpacks) |
- Camera and gallery upload -- scan documents directly or import from photo library
- Intelligent OCR -- recognizes printed text, handwriting, tables, formulas, and special characters
- PDF generation -- produces structured PDFs preserving headings, lists, and layout
- Post-processing -- fixes common OCR errors (math symbols, bullet points, image artifacts)
- Handwriting mode -- specialized processing pipeline tuned for handwritten documents
- Client-side encryption -- files are encrypted before upload for privacy
- Subscription system -- free tier (3 docs/day), premium, family, and business plans
- Document history -- browse, re-download, and share previously processed documents
- Multi-language -- i18n support with language switching
- Dark mode -- full dark/light theme support
- Apple Sign-In -- native authentication on iOS
- Family sharing -- manage a shared subscription with up to 4 members
- Node.js 18+
- MongoDB (Atlas or local)
- Mistral AI API key (platform.mistral.ai)
- Expo CLI (
npm install -g expo-cli)
cd backend
cp .env.example .env # fill in your credentials
npm install
npm run devcd frontend
npm install
npx expo startSet EXPO_PUBLIC_API_URL in your environment to point to your backend (defaults to http://localhost:3001/api).
SnapOCR/
├── backend/
│ ├── config/ Database and upload configuration
│ ├── controllers/ Route handlers (auth, documents, subscriptions)
│ ├── middleware/ Auth, validation, error handling
│ ├── models/ Mongoose schemas (User, Document, ProcessingJob, FamilyGroup)
│ ├── routes/ Express route definitions
│ ├── services/
│ │ ├── ocrService.js Core OCR + PDF pipeline
│ │ ├── pdfService.js Image-to-PDF conversion
│ │ ├── processingService.js Job orchestration
│ │ ├── subscriptionService.js Plan management and billing
│ │ ├── translationService.js OCR with translation
│ │ ├── tableExtractionService.js
│ │ ├── classificationService.js
│ │ ├── qrBarcodeService.js
│ │ └── imageEnhancementService.js
│ ├── utils/ Token generation, validators
│ └── server.js Entry point
├── frontend/
│ └── app/
│ ├── (auth)/ Sign-in, sign-up screens
│ ├── (app)/ Main app screens (dashboard, upload, history, profile, etc.)
│ ├── components/ Shared UI components
│ ├── constants/ API config, colors, routes, theme
│ ├── contexts/ Auth, Document, Subscription, Language, DarkMode providers
│ ├── hooks/ useAuth, useDocuments
│ ├── services/ API client and service layers
│ ├── types/ TypeScript type definitions
│ └── utils/ i18n, encryption, theming
└── docs/ Architecture documentation
POST /api/auth/register-- create accountPOST /api/auth/login-- email/password loginPOST /api/auth/apple-signin-- Apple Sign-InGET /api/auth/profile-- get profile (protected)PUT /api/auth/profile-- update profile / change password (protected)
POST /api/documents/upload-- upload image for OCR processing (protected)GET /api/documents-- list user documents (protected)GET /api/documents/:id-- get document by ID (protected)GET /api/documents/:id/status-- check processing status (protected)DELETE /api/documents/:id-- delete document (protected)
GET /api/subscription-- get subscription details (protected)POST /api/subscription/trial-- start free trial (protected)POST /api/subscription/subscribe-- subscribe to a plan (protected)POST /api/subscription/verify-purchase-- verify App Store / Play Store receipt (protected)POST /api/subscription/restore-- restore purchases (protected)POST /api/subscription/cancel-- cancel subscription (protected)
Private project.