Skip to content

piledev/kinvault-archive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

130 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kinvault.md

A Secure Local-First Markdown Notes App

License: MIT

Overview

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.

MVP Features

  • 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.

Tech Stack

  • 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

Prerequisites

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.

Detailed Setup Instructions

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.json or GoogleService-Info.plist).
      • Install the Expo Firebase config plugin:
        npx expo install expo-build-properties
      • Configure your Firebase project details within your app.json or app.config.js file under the expo.plugins section. Refer to the @react-native-firebase/app documentation 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.
    • For Bare React Native Workflow / Custom Dev Client:
      • Follow the standard @react-native-firebase/app setup instructions for bare projects.
      • Download google-services.json (Android) and/or GoogleService-Info.plist (iOS) from your Firebase project settings.
      • Place google-services.json in android/app/.
      • Place GoogleService-Info.plist in ios/[YourProjectName]/. Ensure it's added to your Xcode project.

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 install in the ios directory (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.

Installation Steps

  1. Clone the repository:
git clone https://github.com/yourusername/kinvault.git
cd kinvault
  1. Install dependencies (use npx expo install for 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
  1. Start the development server:
yarn start
  1. Run on your preferred platform:
# For iOS
yarn ios

# For Android
yarn android

# For Web
yarn web

Available Scripts

  • yarn start - Starts the Expo development server
  • yarn android - Starts the app on an Android device/emulator
  • yarn ios - Starts the app on an iOS simulator
  • yarn web - Starts the app in a web browser

Folder Structure

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

Security Features

  • 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

Contributing

Please read our contributing guidelines before submitting pull requests.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors