A production-ready React Native + Expo mobile app for saving, organizing, managing, and AI-explaining code snippets β built for the Mobile Development Cohort.
βββββββββββββββββββββββββββββββββββββββββββββββ
β HOME SNIPPETS FILES EXPLAIN SETTINGS β
β ββββ ββββββ βββββ βββββββ ββββββββ β
β Dashboard Browse Folders AI Chat Config β
βββββββββββββββββββββββββββββββββββββββββββββββ
5 Tab Screens Β· 7 Stack Screens Β· 4 Modals Β· 16 Packages Β· 4,247 lines of TypeScript
# 1. Unzip and enter project
unzip DevSnippets.zip && cd DevSnippets
# 2. Install dependencies
npm install
# 3. Start Expo dev server
npx expo start
# 4. Scan QR code with Expo Go (iOS / Android)No configuration needed β the app seeds demo snippets on first launch so you can explore immediately.
DevSnippets/
βββ App.tsx # Root: navigation + init + seeding
βββ app.json # Expo config (plugins, bundle ID)
βββ package.json
β
βββ src/
βββ constants/
β βββ theme.ts # Colors, spacing, fonts, language/tag lists
β
βββ types/
β βββ index.ts # All TypeScript interfaces
β
βββ database/
β βββ SQLiteService.ts # Full CRUD + WAL mode + all DB operations
β
βββ services/
β βββ AIService.ts # Gemini / OpenAI / Claude + SecureStore
β βββ FileService.ts # expo-file-system/legacy wrapper
β βββ ExportService.ts # .txt / .js / .json export + sharing
β βββ PreferencesService.ts # AsyncStorage wrapper
β
βββ store/
β βββ useAppStore.ts # Zustand global state
β
βββ components/
β βββ ui/
β β βββ index.tsx # Button, SearchBar, TagChip, EmptyStateβ¦
β β βββ StatCard.tsx # Stats dashboard row
β βββ snippet/
β βββ SnippetCard.tsx # List card with lang badge + tags
β βββ CodeEditor.tsx # Dark code viewer + line-numbered editor
β
βββ screens/
β βββ HomeScreen.tsx # Dashboard
β βββ SnippetsScreen.tsx # Browse + search + filter
β βββ FilesScreen.tsx # Folder grid
β βββ ExplainScreen.tsx # AI action picker
β βββ SettingsScreen.tsx # Theme + AI key + storage
β βββ CreateSnippetScreen.tsx # New snippet form
β βββ SnippetDetailScreen.tsx # Full detail + actions
β βββ EditSnippetScreen.tsx # Edit form
β βββ FavoritesScreen.tsx # Starred snippets
β βββ FolderBrowserScreen.tsx # File list + move/delete/share
β βββ AIResultScreen.tsx # Tabbed AI output
β
βββ utils/
βββ seedData.ts # Demo snippet seeder (runs once)
UI Layer (React Native screens + components)
β
Store Layer (Zustand β selectedSnippet, searchQuery, aiResult, settings)
β
Service Layer
βββ SQLiteService β expo-sqlite (WAL mode)
βββ FileService β expo-file-system/legacy
βββ AIService β Gemini / OpenAI / Claude + expo-secure-store
βββ ExportService β .txt / .js / .json + expo-sharing
βββ PreferencesService β @react-native-async-storage
β
Storage Layer
βββ SQLite β Snippets + Attachments + Exports
βββ SecureStore β API Keys (encrypted)
βββ AsyncStorage β Theme + Sort preferences
βββ FileSystem β Templates / Resources / Screenshots / Exports / Projects
CREATE TABLE snippets (
id INTEGER PRIMARY KEY AUTOINCREMENT,
title TEXT NOT NULL,
language TEXT NOT NULL,
code TEXT NOT NULL,
tags TEXT DEFAULT '', -- comma-separated e.g. "react,hooks,storage"
favorite INTEGER DEFAULT 0, -- 0 = normal | 1 = starred
created_at TEXT DEFAULT (datetime('now')),
updated_at TEXT DEFAULT (datetime('now'))
);CREATE TABLE attachments (
id INTEGER PRIMARY KEY AUTOINCREMENT,
snippet_id INTEGER NOT NULL,
file_path TEXT NOT NULL,
file_name TEXT NOT NULL,
file_type TEXT DEFAULT 'file',
created_at TEXT DEFAULT (datetime('now')),
FOREIGN KEY(snippet_id) REFERENCES snippets(id) ON DELETE CASCADE
);CREATE TABLE exports (
id INTEGER PRIMARY KEY AUTOINCREMENT,
snippet_id INTEGER,
file_path TEXT NOT NULL,
format TEXT NOT NULL, -- 'txt' | 'js' | 'json'
created_at TEXT DEFAULT (datetime('now'))
);Storage optimisations:
- WAL (Write-Ahead Logging) mode enabled for concurrent reads
ON DELETE CASCADEon attachments so deleting a snippet cleans up files- All queries use parameterised statements (no SQL injection risk)
| Screen | Route | Purpose |
|---|---|---|
| Home | / |
Dashboard β live stats, recent snippets, quick actions |
| Snippets | /snippets |
Full list with search, language filter chips, FAB |
| Files | /files |
5 coloured folder cards with item counts |
| Explain | /explain |
AI action picker with online/offline status |
| Settings | /settings |
Theme, AI provider, masked key management, storage |
| Screen | Route | Purpose |
|---|---|---|
| Create Snippet | /snippet/new |
Form: title, language picker, tag chips, dark code editor |
| Snippet Detail | /snippet/:id |
Code viewer, copy, export, share, explain, delete |
| Edit Snippet | /snippet/:id/edit |
Pre-filled edit form |
| Favorites | /favorites |
Filtered view of all starred snippets |
| Folder Browser | /files/:folder |
File list with long-press actions |
| AI Result | /ai/result |
Tabbed output: Overview / How It Works / Improvements |
| Modal | Trigger |
|---|---|
| Tag Picker | "Add Tag" in Create/Edit |
| Export Format | "Export" in Snippet Detail |
| Move File | Long-press file β "Move" |
| Delete Confirmation | Delete button on snippet or file |
| Provider | Model | Notes |
|---|---|---|
| Google Gemini β | gemini-1.5-flash | Free tier available β recommended |
| OpenAI | gpt-4o-mini | Requires paid account |
| Anthropic Claude | claude-haiku-4-5 | Requires paid account |
Gemini (Free):
- Visit aistudio.google.com
- Click "Get API Key" β "Create API Key"
- Copy the key
OpenAI:
- Visit platform.openai.com
- API Keys β Create new secret key
Anthropic Claude:
- Visit console.anthropic.com
- API Keys β Create Key
- Open Settings tab
- Under AI β tap your preferred provider
- Tap API Key row
- Paste your key β Save Key
Keys are stored using expo-secure-store (AES-256 encrypted on device).
| Action | What it does |
|---|---|
| Explain | Line-by-line breakdown + key concepts |
| Summarize | 3β5 sentence purpose summary |
| Improve | Numbered suggestions with code examples |
| Format | Extension | Content |
|---|---|---|
| Text File | .txt |
Plain text with comment header (title, language, tags, date) |
| JavaScript | .js |
JSDoc-commented JS file |
| JSON | .json |
Structured object with all snippet fields |
All exports are saved to DevSnippets/Exports/ folder and can optionally be shared via native share sheet.
{DocumentDirectory}/
βββ DevSnippets/
βββ Templates/ # Reusable code templates
βββ Resources/ # Reference material
βββ Screenshots/ # UI screenshots / diagrams
βββ Exports/ # Auto-saved exported snippets
βββ Projects/ # Project-specific files
| Technology | Used For | Why |
|---|---|---|
expo-sqlite |
All snippet data (snippets, attachments, exports tables) | Relational, offline, fast queries |
expo-secure-store |
AI API keys | AES-256 encrypted, hardware-backed on device |
@react-native-async-storage |
Theme preference, sort order | Lightweight key-value for non-sensitive prefs |
expo-file-system |
All file operations across 5 folders | Native FS access, no server needed |
- Create, Read, Update, Delete snippets
- Search and filter snippets
- View favorites
- File browsing and management
- Export to local files
- AI explanation (Gemini / OpenAI / Claude API calls)
When no internet is detected:
- Orange Offline badge appears on Explain screen
- Generate button is disabled with clear visual feedback
- Banner explains internet is required
| Token | Value | Usage |
|---|---|---|
primary |
#F97316 |
Buttons, active states, FAB |
primaryBg |
#FFF7ED |
Tag chips, soft backgrounds |
bg |
#FFFFFF |
Screen background |
bgSecondary |
#F9FAFB |
Settings, input fields |
textPrimary |
#111827 |
Headings, body |
textSecondary |
#6B7280 |
Labels, subtitles |
danger |
#EF4444 |
Delete actions, errors |
success |
#22C55E |
Online badge, export success |
Language badge colours are semantic per-language: TypeScript=blue, JavaScript=amber, Python=purple, Node.js=green, HTML=red, CSS=violet, etc.
Code editor uses VS Code Dark theme: #1E1E2E background, #E2E8F0 text.
{
"expo": "~56.0.8",
"react-native": "0.85.3",
"typescript": "~5.8.3",
"@react-navigation/native": "^7.x",
"@react-navigation/bottom-tabs": "^7.x",
"@react-navigation/native-stack": "^7.x",
"expo-sqlite": "~56.0.x",
"expo-file-system": "~18.x",
"expo-secure-store": "~14.x",
"@react-native-async-storage/async-storage": "^2.x",
"expo-sharing": "~12.x",
"expo-clipboard": "~7.x",
"zustand": "^5.x",
"@expo/vector-icons": "^14.x",
"@react-native-community/netinfo": "^11.x",
"react-native-safe-area-context": "^5.x",
"react-native-screens": "^4.x"
}- Snippet CRUD β Create, Read, Update, Delete with full validation
- Search β Full-text search across title, code, tags
- Filter β Filter by programming language
- Favorites β Star/unstar, dedicated favorites screen
- Tags β Multi-select tag picker with chip display
- SQLite β 3-table relational DB with WAL mode, parameterised queries
- SecureStore β Encrypted API key storage
- AsyncStorage β Theme + sort preferences
- FileSystem β 5-folder structure, full file operations
- Browse files across 5 folders
- Move files between folders
- Delete files with confirmation
- Share files via native share sheet
- 3 AI providers (Gemini, OpenAI, Claude)
- 3 actions (Explain, Summarize, Improve)
- Offline detection + graceful fallback
- Results in tabbed Overview / How It Works / Improvements layout
- Copy / Save / Export AI results
- Export as
.txt - Export as
.js - Export as
.json - Native share sheet via
expo-sharing - All exports saved to Exports folder
- Orange primary theme matching design spec
- Dark code editor with line numbers
- Language badges with semantic colours
- Smooth modal animations
- FAB for quick snippet creation
- Empty states with call-to-action
- Pull-to-refresh on Home
- Delete confirmation dialogs
- TypeScript strict mode β 0 errors
- No unused imports anywhere
- All navigation targets registered
- Zustand for clean global state
- Reusable component library
- Service layer cleanly separated from UI
- Demo data seeded on first launch
- Dark mode toggle in Settings is stored but doesn't yet switch the full app theme (light mode only in this version β foundation is in place via
settings.theme) - File attachment to snippets stores paths in DB; the actual file picker (
expo-document-picker) can be wired in as a bonus feature - AI result parsing into 3 sections (Overview / How It Works / Improvements) is heuristic-based and works best with well-structured AI responses
Mobile Development Cohort
- Eval Period: May 31 β June 3, 2026
- Tech: Expo Β· React Native Β· TypeScript
Built with β€οΈ using Expo SDK 56 + React Native 0.85
