A full-stack mobile application that allows users to create notes, upload PDFs, and generate AI-powered summaries. Built with React Native (Expo) and FastAPI, featuring a sleek dark mode interface and async background processing.
This project demonstrates real-world engineering practices in building a cross-platform mobile application with:
- Mobile Frontend: React Native with Expo, TypeScript, and modern hooks (Dark Theme)
- Backend API: FastAPI with async background job processing
- AI Integration: Groq API (free, gpt oss 120b) or OpenAI GPT for intelligent summarization
- PDF Processing: Text extraction from PDF documents
- ๐ Create and edit text notes
- ๐ Upload PDFs and extract text automatically
- ๐ค AI-powered summarization with customizable length and style
- ๐จ Beautiful dark mode interface
- ๐ฑ Cross-platform (iOS & Android)
- โก Async background processing for summaries
- ๐พ Local caching for offline access
- ๐ Pull-to-refresh and real-time updates
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ MOBILE APP (React Native) โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Screens Layer โ โ
โ โ HomeScreen โ NotesScreen โ NoteEditorScreen โ NoteDetailScreen โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Custom Hooks Layer โ โ
โ โ useUser โ useNotes โ useNote โ useSummary โ useApiHealth โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Services Layer โ โ
โ โ API Service (Axios) โ Storage Service โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ HTTP/REST
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ BACKEND API (FastAPI) โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Routes Layer โ โ
โ โ /health โ /users โ /notes โ /summaries โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Services Layer โ โ
โ โ UserService โ NoteService โ SummaryService โ PDFService โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโ โ
โ โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโ โโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโ โ
โ โ AI Summarizer โ โ Database Layer โ โ
โ โ OpenAI โ HuggingFace โ Mock โ โ SQLAlchemy ORM โ SQLite โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
| Technology | Purpose |
|---|---|
| React Native | Cross-platform mobile framework |
| Expo | Development toolchain and runtime |
| TypeScript | Type-safe JavaScript |
| Axios | HTTP client for API calls |
| React Navigation | Screen navigation |
| AsyncStorage | Local data persistence |
| Technology | Purpose |
|---|---|
| Python 3.10+ | Programming language |
| FastAPI | Modern async web framework |
| SQLAlchemy | ORM for database operations |
| Pydantic | Data validation and serialization |
| SQLite | Development database (PostgreSQL-ready) |
| Technology | Purpose |
|---|---|
| Groq API | Primary summarization engine (FREE) |
| OpenAI API | Alternative summarization (paid) |
| HuggingFace | Local models option (optional) |
| pdfplumber | PDF text extraction |
ai-note-summarizer/
โโโ backend/
โ โโโ app/
โ โ โโโ __init__.py
โ โ โโโ main.py # FastAPI application entry
โ โ โโโ config.py # Configuration management
โ โ โโโ database/
โ โ โ โโโ __init__.py
โ โ โ โโโ connection.py # Database connection setup
โ โ โโโ models/
โ โ โ โโโ __init__.py
โ โ โ โโโ user.py # User ORM model
โ โ โ โโโ note.py # Note ORM model
โ โ โ โโโ summary.py # Summary ORM model
โ โ โโโ schemas/
โ โ โ โโโ __init__.py
โ โ โ โโโ user.py # User Pydantic schemas
โ โ โ โโโ note.py # Note Pydantic schemas
โ โ โ โโโ summary.py # Summary Pydantic schemas
โ โ โโโ routes/
โ โ โ โโโ __init__.py
โ โ โ โโโ health.py # Health check endpoints
โ โ โ โโโ users.py # User management endpoints
โ โ โ โโโ notes.py # Note CRUD endpoints
โ โ โ โโโ summaries.py # Summary generation endpoints
โ โ โโโ services/
โ โ โโโ __init__.py
โ โ โโโ user_service.py # User business logic
โ โ โโโ note_service.py # Note business logic
โ โ โโโ summary_service.py # Summary orchestration
โ โ โโโ summarizer.py # AI summarization (swappable)
โ โ โโโ pdf_service.py # PDF text extraction
โ โโโ requirements.txt
โ โโโ .env.example
โ
โโโ mobile/
โ โโโ src/
โ โ โโโ components/ # Reusable UI components
โ โ โ โโโ Button.tsx
โ โ โ โโโ Input.tsx
โ โ โ โโโ Card.tsx
โ โ โ โโโ Loading.tsx
โ โ โ โโโ EmptyState.tsx
โ โ โ โโโ NoteCard.tsx
โ โ โ โโโ SummaryCard.tsx
โ โ โโโ screens/ # Application screens
โ โ โ โโโ HomeScreen.tsx
โ โ โ โโโ NotesScreen.tsx
โ โ โ โโโ NoteEditorScreen.tsx
โ โ โ โโโ NoteDetailScreen.tsx
โ โ โโโ services/ # API and storage services
โ โ โ โโโ api.ts
โ โ โ โโโ storage.ts
โ โ โโโ hooks/ # Custom React hooks
โ โ โ โโโ index.ts
โ โ โโโ types/ # TypeScript definitions
โ โ โ โโโ index.ts
โ โ โโโ constants/ # App constants and config
โ โ โโโ index.ts
โ โโโ App.tsx # Application entry point
โ โโโ package.json
โ โโโ tsconfig.json
โ โโโ app.json # Expo configuration
โ
โโโ README.md
- Node.js 18+ and npm
- Python 3.10+
- Expo Go app on your phone (for testing)
- Groq API key (FREE at https://console.groq.com/keys) OR OpenAI API key
# Navigate to backend directory
cd backend
# Create virtual environment
python -m venv .venv
# Activate virtual environment
# Windows:
.venv\Scripts\activate
# macOS/Linux:
source .venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Copy environment template
cp .env.example .env
# Edit .env and add your API key (Groq is FREE and recommended)
# GROQ_API_KEY=your-groq-key-here
# Run the server
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000The API will be available at http://localhost:8000
- Interactive docs:
http://localhost:8000/docs - ReDoc:
http://localhost:8000/redoc
# Navigate to mobile directory
cd mobile
# Install dependencies
npm install
# Start Expo development server
npx expo startScan the QR code with Expo Go (Android) or Camera app (iOS).
Important: Update the API URL in src/constants/index.ts to match your setup:
// For Android Emulator:
BASE_URL: 'http://10.0.2.2:8000/api'
// For iOS Simulator:
BASE_URL: 'http://localhost:8000/api'
// For Physical Device (use your computer's local IP):
BASE_URL: 'http://192.168.x.x:8000/api'Find your local IP:
- Windows:
ipconfig(look for IPv4 Address) - macOS/Linux:
ifconfigorip addr
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/health |
Basic health check |
| GET | /api/health/db |
Database connectivity check |
| GET | /api/health/ready |
Full readiness check |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/users |
Create a new user (guest or registered) |
| GET | /api/users/{user_id} |
Get user by ID |
| GET | /api/users/guest/{guest_id} |
Get user by guest UUID |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/notes |
List all notes (with pagination) |
| POST | /api/notes |
Create a new text note |
| POST | /api/notes/upload/pdf |
Upload PDF and create note |
| GET | /api/notes/{note_id} |
Get a specific note |
| PUT | /api/notes/{note_id} |
Update a note |
| DELETE | /api/notes/{note_id} |
Delete a note |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/summaries/notes/{note_id} |
Generate summary (sync) |
| POST | /api/summaries/notes/{note_id}/async |
Generate summary (async with polling) |
| GET | /api/summaries/jobs/{job_id} |
Check async job status |
| GET | /api/summaries/notes/{note_id} |
Get all summaries for a note |
| GET | /api/summaries/{summary_id} |
Get a specific summary |
| DELETE | /api/summaries/{summary_id} |
Delete a summary |
-
Layered Architecture (Backend)
- Clear separation between routes, services, and data layers
- Business logic isolated in services for testability
- Routes only handle HTTP concerns
-
Custom Hooks Pattern (Frontend)
- Encapsulate state management and side effects
- Reusable across components
- Clean separation of concerns
-
Swappable AI Provider
- Factory pattern allows runtime provider selection
- Easy to switch between OpenAI, HuggingFace, or mock
- Future-proof for new AI services
-
Guest-First Authentication
- No registration barrier to use the app
- UUID-based guest identification
- Seamless upgrade path to full accounts
- FastAPI: Async support, automatic OpenAPI docs, type hints
- React Native + Expo: Cross-platform with excellent DX
- SQLite โ PostgreSQL: Easy development, production-ready structure
- Pydantic: Runtime validation, serialization, great IDE support
- User authentication (OAuth with Google/Apple)
- Cloud sync across devices
- Export summaries to PDF/Markdown
- Voice note input
- Collaborative note sharing
- Offline-first with background sync
cd backend
pytest tests/ -v- Never commit
.envfiles - they contain API keys - The
.env.examplefile is safe to commit (contains only placeholders) - API keys are loaded from environment variables at runtime
- Guest users get UUID-based anonymous access
# Application Settings
APP_NAME="AI Note Summarizer"
DEBUG=true
# Database (SQLite for dev, PostgreSQL for production)
DATABASE_URL=sqlite:///./notes.db
# AI Provider: 'groq' (free), 'openai', or 'mock'
AI_PROVIDER=groq
# Groq API (FREE - get key at https://console.groq.com/keys)
GROQ_API_KEY=your-groq-api-key
# OpenAI API (optional, paid)
OPENAI_API_KEY=your-openai-api-key
# Processing Limits
MAX_TEXT_LENGTH=50000
MAX_PDF_SIZE_MB=10
CHUNK_SIZE=3000- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Groq for providing free, fast AI inference
- Expo for the amazing React Native toolchain
- FastAPI for the modern Python web framework
Built with โค๏ธ using React Native, FastAPI, and AI