A Secure Local-First Markdown Notes App
kinvault is designed to be a secure place to store and eventually share sensitive information with loved ones using the simple and versatile Markdown format.
This is the Minimum Viable Product (MVP) release. It focuses on providing a secure environment for creating and managing your personal notes locally on your device. Features like P2P sharing, guardian functionality, and cloud synchronization (beyond authentication) are planned for future versions but are not included in this MVP.
The eventual goal is to create a platform where users can securely manage and share critical information like wills, asset details, or personal messages, ensuring privacy through end-to-end encryption and decentralized concepts.
- Firebase Authentication: Secure user sign-up and sign-in using Email/Password.
- Markdown Notes: Create, Read, Update, and Delete notes written in Markdown. Includes a basic editor and preview.
- Local Data Encryption: All note content (title, body) is encrypted using AES-GCM before being saved to local device storage.
- Secure Key Management: Encryption keys are derived from a user-defined Master Password using PBKDF2 and securely stored using the device's secure storage system via
react-native-keychain. - App Lock: Protects app access upon launch or resume using a PIN code or device Biometrics (Fingerprint/Face ID) via
react-native-keychain. - Local Storage: Notes are saved securely on the device using
react-native-mmkv. No note data is sent to any server in this MVP.
- Framework: React Native with Expo
- Authentication: Firebase Authentication (
@react-native-firebase/auth) - Navigation: React Navigation (
@react-navigation/native-stack) - Local Storage:
react-native-mmkv - Cryptography:
react-native-quick-crypto - Secure Storage / Keychain:
react-native-keychain - UI Library: React Native Paper
- State Management: Zustand
- Markdown Support:
react-native-markdown-display - Syntax Highlighting:
react-native-syntax-highlighter
Before you begin, ensure you have met the following requirements:
- Node.js (v14 or later)
- Yarn (recommended package manager)
- Expo CLI
- iOS Simulator (for Mac users) or Android Studio (for Android development)
- A Firebase project created, with Authentication (Email/Password) enabled.
1. Firebase Project Setup:
- Go to the Firebase Console and create a new project (or use an existing one).
- In your Firebase project settings, enable Authentication and select the Email/Password sign-in method.
- Add Firebase to your app:
- For Expo Managed Workflow (Recommended):
- You typically don't need to manually download configuration files (
google-services.jsonorGoogleService-Info.plist). - Install the Expo Firebase config plugin:
npx expo install expo-build-properties
- Configure your Firebase project details within your
app.jsonorapp.config.jsfile under theexpo.pluginssection. Refer to the@react-native-firebase/appdocumentation for the exact structure, which usually involves providing your Firebase project ID, API key, etc.// Example structure in app.json (adapt with your actual values) { "expo": { // ... other expo config "plugins": [ [ "expo-build-properties", { "android": { // Potentially needed for specific native integrations }, "ios": { // Potentially needed for specific native integrations } } ] // Add Firebase config here if not using environment variables // or follow specific plugin instructions ] } }
- Important: If you use native Firebase features extensively, you might need to create development builds or production builds using EAS Build (
eas build) for the configurations to apply correctly, especially after adding plugins.
- You typically don't need to manually download configuration files (
- For Bare React Native Workflow / Custom Dev Client:
- Follow the standard
@react-native-firebase/appsetup instructions for bare projects. - Download
google-services.json(Android) and/orGoogleService-Info.plist(iOS) from your Firebase project settings. - Place
google-services.jsoninandroid/app/. - Place
GoogleService-Info.plistinios/[YourProjectName]/. Ensure it's added to your Xcode project.
- Follow the standard
- For Expo Managed Workflow (Recommended):
2. Native Development Environment:
- Android: Make sure you have Android Studio installed, configured with an Android SDK and emulator/device.
- iOS (macOS only): Make sure you have Xcode installed and configured. You might need to run
pod installin theiosdirectory (cd ios && pod install) if you are working with native modules or in a bare workflow. For Expo managed workflow with native code, rely on EAS Build.
- Clone the repository:
git clone https://github.com/yourusername/kinvault.git
cd kinvault- Install dependencies (use
npx expo installfor Expo compatibility):
# Installs general dependencies from package.json
yarn install
# Ensure Firebase and other native modules are compatible with Expo SDK
npx expo install @react-native-firebase/app @react-native-firebase/auth \
react-native-mmkv react-native-quick-crypto \
react-native-keychain react-native-markdown-display \
react-native-syntax-highlighter
# Add other dependencies listed in Tech Stack if needed- Start the development server:
yarn start- Run on your preferred platform:
# For iOS
yarn ios
# For Android
yarn android
# For Web
yarn webyarn start- Starts the Expo development serveryarn android- Starts the app on an Android device/emulatoryarn ios- Starts the app on an iOS simulatoryarn web- Starts the app in a web browser
A brief overview of the key directories:
.
├── android/ # Android native project files
├── assets/ # Static assets like images, fonts
├── ios/ # iOS native project files
├── memory-bank/ # Cline's Memory Bank - Project documentation
├── src/ # Main source code directory
│ ├── components/ # Reusable UI components
│ ├── navigation/ # Navigation setup (React Navigation)
│ ├── screens/ # Application screens (grouped by feature, e.g., auth, memo)
│ ├── services/ # Core logic services (Auth, Crypto, Storage, etc.)
│ ├── store/ # State management stores (Zustand)
│ ├── types/ # TypeScript type definitions
│ └── utils/ # Utility functions
├── .clinerules # Cline's Project Intelligence file
├── app.json # Expo configuration file
├── App.tsx # Root application component
├── index.ts # App entry point (managed by Expo)
├── package.json # Project dependencies and scripts
└── tsconfig.json # TypeScript configuration
- End-to-end encryption for all note content using AES-GCM
- Secure key derivation using PBKDF2
- Biometric authentication support
- Local-only storage for sensitive data
- No server-side storage of note content
- Secure key management with device's secure storage
Please read our contributing guidelines before submitting pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.