A modern, privacy-focused contact management application built with React, TypeScript, and Capacitor. Designed for organizing and managing personal and professional contacts with ease across all platforms.
Rolan - Always learning, always building
- π Portfolio: rolan-rnr.netlify.app
- π» GitHub: @Mrtracker-new
- Features
- Architecture Overview
- Project Structure
- Tech Stack
- Getting Started
- Platform Support
- Database Design
- API Reference
- Deployment
- Contributing
- License
- Contact Management: Create, edit, delete, and organize contacts
- Smart Search: Fuzzy search with advanced filtering capabilities
- Profile Pictures: Upload and manage contact photos with automatic compression
- Custom Fields: Add unlimited custom fields for each contact
- Tags System: Organize contacts with colorful tags
- Notes & Links: Attach notes and external links to contacts
- File Attachments: Attach documents, images, and files to contacts
- Offline-First: All data stored locally using IndexedDB
- Data Encryption: Optional AES encryption for backups
- Privacy-Focused: No external servers, complete data ownership
- Secure Backups: Export encrypted backups with password protection
- Web Application: PWA with offline capabilities
- Mobile Apps: Native Android and iOS apps via Capacitor
- Desktop Ready: Electron and Tauri compatibility
- Responsive Design: Optimized for all screen sizes
- Dark/Light Mode: System-aware theme switching
- Modern UI: Clean, intuitive interface with smooth animations
- Touch-Friendly: Optimized for mobile interactions
- Keyboard Shortcuts: Efficient navigation for power users
graph TB
subgraph "Frontend Layer"
A[React 18 + TypeScript]
B[Tailwind CSS]
C[React Router]
D[Zustand State Management]
end
subgraph "Data Layer"
E[IndexedDB via Dexie]
F[Local Storage]
G[File System Access]
end
subgraph "Cross-Platform Layer"
H[Capacitor Core]
I[Web APIs]
J[Native Plugins]
end
subgraph "Build System"
K[Vite]
L[TypeScript Compiler]
M[PWA Plugin]
N[Capacitor CLI]
end
A --> E
A --> H
H --> I
H --> J
K --> A
K --> M
N --> H
sequenceDiagram
participant U as User
participant C as Component
participant S as Store (Zustand)
participant DB as Database Service
participant IDB as IndexedDB
U->>C: User Action
C->>S: Update State
S->>DB: Database Operation
DB->>IDB: Query/Mutation
IDB-->>DB: Result
DB-->>S: Response
S-->>C: State Update
C-->>U: UI Update
contact-manager/
βββ π src/
β βββ π components/ # Reusable UI components
β β βββ AttachmentSection.tsx
β β βββ FloatingActionButton.tsx
β β βββ Layout.tsx
β β βββ LinkSection.tsx
β β βββ MobileNavigation.tsx
β β βββ NoteCard.tsx
β β βββ NoteSection2.tsx
β β βββ ProfilePicture.tsx
β β βββ SaveIndicator.tsx
β β βββ SearchInput.tsx
β β βββ Sidebar.tsx
β β βββ TopBar.tsx
β βββ π pages/ # Main application pages
β β βββ ContactDetail.tsx # Contact view/edit page
β β βββ ContactList.tsx # Main contacts listing
β β βββ NewContact.tsx # Contact creation form
β β βββ Search.tsx # Advanced search page
β β βββ Settings.tsx # App settings & preferences
β βββ π db/ # Database layer
β β βββ database.ts # Dexie configuration & operations
β βββ π store/ # State management
β β βββ useStore.ts # Zustand store configuration
β βββ π services/ # Business logic services
β β βββ attachments.service.ts
β βββ π utils/ # Utility functions
β β βββ fileOpener.ts # File handling utilities
β β βββ index.ts # Export/import utilities
β β βββ mobileFileUtils.ts # Mobile file operations
β βββ π types/ # TypeScript type definitions
β β βββ index.ts # Core type definitions
β β βββ tauri.d.ts # Tauri-specific types
β βββ π plugins/ # Capacitor plugins
β β βββ index.ts # Plugin registrations
β βββ App.tsx # Main application component
β βββ main.tsx # Application entry point
β βββ index.css # Global styles
βββ π android/ # Android-specific files
βββ π dist/ # Built application files
βββ π public/ # Static assets
βββ capacitor.config.ts # Capacitor configuration
βββ package.json # Project dependencies
βββ tailwind.config.js # Tailwind CSS configuration
βββ tsconfig.json # TypeScript configuration
βββ vite.config.ts # Vite build configuration
βββ README.md # This file
- React 18: Latest React with Concurrent Features
- TypeScript: Type-safe development
- Vite: Lightning-fast build tool
- Tailwind CSS: Utility-first CSS framework
- Zustand: Lightweight state management
- Dexie: IndexedDB wrapper for offline storage
- React Router: Client-side routing
- Capacitor: Native mobile app development
- PWA: Progressive Web App capabilities
- Workbox: Service worker management
- Lucide React: Beautiful icons
- React Hot Toast: Elegant notifications
- React Dropzone: File upload handling
- Fuse.js: Fuzzy search functionality
- ESLint: Code linting
- Prettier: Code formatting
- Vitest: Unit testing framework
- Node.js (v18 or higher)
- npm or yarn
- Git
-
Clone the repository
git clone https://github.com/Mrtracker-new/Contact-manager.git cd contact-manager -
Install dependencies
npm install
-
Start development server
npm run dev
-
Open in browser
http://localhost:5173
# Build web application
npm run build
# Preview production build
npm run preview-
Add mobile platforms
# Add Android npx cap add android # Add iOS (macOS only) npx cap add ios
-
Build and sync
npm run build npx cap sync
-
Open in native IDE
# Android Studio npx cap open android # Xcode (macOS only) npx cap open ios
| Platform | Status | Features |
|---|---|---|
| Web Browser | β Full Support | PWA, Offline, File System API |
| Android | β Full Support | Native file access, Share integration |
| iOS | β Full Support | Native file access, Share integration |
| Electron | π Compatible | Desktop file operations |
| Tauri | π Compatible | Rust-based desktop app |
- Progressive Web App (PWA)
- Offline functionality
- File System Access API
- Web Share API
- Push notifications (planned)
- Native file system access
- Share integration
- Camera access for profile pictures
- Biometric authentication (planned)
- Background sync (planned)
erDiagram
CONTACT {
int id PK
string name
string email
string phone
date birthday
string profilePicture
boolean isFavorite
json customFields
json tags
datetime createdAt
datetime updatedAt
}
NOTE {
int id PK
int contactId FK
string title
string content
datetime createdAt
datetime updatedAt
}
LINK {
int id PK
int contactId FK
string title
string url
string description
datetime createdAt
}
ATTACHMENT {
int id PK
int contactId FK
string name
string type
int size
string mimeType
blob data
string thumbnail
datetime createdAt
}
SETTINGS {
string key PK
json value
datetime updatedAt
}
CONTACT ||--o{ NOTE : has
CONTACT ||--o{ LINK : has
CONTACT ||--o{ ATTACHMENT : has
interface Contact {
id?: number;
name: string;
email?: string;
phone?: string;
birthday?: Date;
profilePicture?: string;
isFavorite: boolean;
customFields: CustomField[];
tags: string[];
createdAt: Date;
updatedAt: Date;
}interface Note {
id?: number;
contactId: number;
title: string;
content: string;
createdAt: Date;
updatedAt: Date;
}interface Link {
id?: number;
contactId: number;
title: string;
url: string;
description?: string;
createdAt: Date;
}interface Attachment {
id?: number;
contactId: number;
name: string;
type: 'document' | 'image' | 'video' | 'other';
size: number;
mimeType: string;
data?: Blob | ArrayBuffer | string;
filePath?: string;
thumbnail?: string;
createdAt: Date;
}// Get all contacts
const contacts = await db.contacts.toArray();
// Get contact by ID
const contact = await db.contacts.get(id);
// Create contact
const id = await db.contacts.add(contact);
// Update contact
await db.contacts.update(id, updates);
// Delete contact
await db.contacts.delete(id);
// Search contacts
const results = await db.contacts
.filter(contact => contact.name.includes(query))
.toArray();// Export data
const data = await dbOperations.exportData();
// Import data
await dbOperations.importData(data);
// Export to Excel
await exportUtils.downloadExcel(data, filename);
// Import from Excel
const data = await exportUtils.readExcelFile(file);// Get contact attachments
const attachments = await getContactAttachments(contactId);
// Add attachment
const result = await addAttachment(contactId, files);
// Delete attachment
await deleteAttachment(attachmentId);
// Open file
const result = await openFile(attachment);
// Share file
const result = await shareFile(attachment);-
Build the project
npm run build
-
Deploy the
distfolder to your hosting platform
-
Build the app
npm run build npx cap sync android
-
Generate signed APK
cd android ./gradlew assembleRelease
-
Build the app
npm run build npx cap sync ios
-
Open in Xcode and archive
npx cap open ios
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
EXPOSE 5173
CMD ["npm", "run", "preview"]We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature
- Make your changes
- Add tests if applicable
- Commit your changes
git commit -m 'Add amazing feature' - Push to your fork
git push origin feature/amazing-feature
- Open a Pull Request
- Use TypeScript for all new code
- Follow ESLint rules
- Use Prettier for formatting
- Write tests for new features
- Update documentation as needed
| Metric | Value |
|---|---|
| Bundle Size | < 2MB |
| First Load | < 3s |
| Lighthouse Score | 95+ |
| Offline Support | 100% |
| PWA Score | Perfect |
- Client-side encryption for sensitive data
- No external tracking or analytics
- Secure file handling with validation
- XSS protection via React
- Content Security Policy headers
- Input sanitization throughout
- Large files: Attachments > 50MB may cause performance issues
- iOS Safari: Some file operations limited by browser restrictions
- Older browsers: IE11 not supported, Chrome 90+ recommended
- Real-time sync across devices
- Advanced contact grouping
- Backup scheduling
- Theme customization
- Calendar integration
- Task management
- Email integration
- API for third-party integrations
- Advanced search filters
This project is licensed under the MIT License - see the LICENSE file for details.
- React Team for the amazing framework
- Capacitor Team for cross-platform capabilities
- Tailwind CSS for the utility-first approach
- Dexie.js for excellent IndexedDB wrapper
- Lucide for beautiful icons
- π§ Email: rolanlobo901@gmail.com
- π Bug Reports: GitHub Issues
- π¬ Discussions: GitHub Discussions
- π Documentation: Wiki
Made with β€οΈ by Rolan
Always learning, always building