Skip to content

PortalTechnologiesInc/portal-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Portal App

Portal App

Portal is a mobile identity wallet for secure authentication and payments using the Nostr protocol. Built with React Native and Expo, it puts you in complete control of your digital identity and personal data with enterprise-grade security.

✨ Features

πŸ” Authentication & Identity

  • Nostr Authentication: Cryptographically secure authentication with websites and services
  • Biometric Security: Face ID, Touch ID, and fingerprint authentication
  • Secure Key Management: Private keys never leave your device
  • Identity Management: Complete control over your digital identity

πŸ’³ Payments & Subscriptions

  • Lightning Payments: One-time Bitcoin Lightning Network payments
  • Subscription Management: Monitor and control recurring payments
  • Payment Status Tracking: Real-time payment status with Revolut-style UI
  • Wallet Integration: Seamless NWC (Nostr Wallet Connect) integration

πŸ“± User Experience

  • Activity Dashboard: Comprehensive tracking of all authentications and payments
  • QR Code Scanner: Quick authentication and payment initiation
  • Dark/Light Theme: Adaptive theme system with system preference support
  • Intuitive Navigation: Tab-based navigation with detailed activity views

πŸ”’ Security & Privacy

  • Local Storage: All sensitive data stored securely on device
  • Biometric Protection: Additional security layer for sensitive operations
  • No Data Sharing: Zero personal data shared without explicit consent
  • Cryptographic Verification: All operations cryptographically verified

πŸ›  Technology Stack

Core Technologies

Storage & Security

Nostr & Payments

  • Nostr Protocol - Decentralized identity and messaging
  • Custom Rust lib - Core Nostr logic and cryptography
  • NWC Integration - Nostr Wallet Connect for Lightning payments

UI & Theming

  • Lucide React Native - Beautiful icon library
  • Custom Theme System - Adaptive dark/light theme support
  • Safe Area Context - Proper device-safe rendering

πŸš€ Getting Started

Prerequisites

  • Node.js (v18 or higher)
  • npm or yarn
  • Expo CLI: npm install -g @expo/cli
  • iOS Simulator (Mac) or Android Studio (for emulators)

Installation

  1. Clone the repository:

    git clone https://github.com/PortalTechnologiesInc/Portal-App.git
    cd Portal-App
  2. Install dependencies:

    npm install
  3. Start the development server:

    npx expo start
  4. Run on device/simulator:

    # iOS
    npx expo run:ios
    
    # Android
    npx expo run:android
    
    # Web (development only)
    npx expo start --web

πŸ“± Usage Guide

First-Time Setup

  1. Generate Identity: Create a new Nostr private key or import existing seed phrase
  2. Profile Configuration: Set up your identity information
  3. Wallet Connection: Connect your NWC-compatible Lightning wallet

Authentication Flow

  1. Scan QR Code: Use built-in scanner from website or service
  2. Review Request: Examine authentication details and permissions
  3. Biometric Confirmation: Confirm with Face ID/Touch ID
  4. Approve/Deny: Complete the authentication process

Payment Management

  1. Payment Requests: Review incoming payment requests
  2. Status Tracking: Monitor payment progress with real-time updates
  3. Subscription Control: Manage recurring payments and subscriptions
  4. Activity History: View complete payment and authentication history

πŸ— Project Architecture

Directory Structure

portal-app/
β”œβ”€β”€ app/                    # Expo Router pages
β”‚   β”œβ”€β”€ (tabs)/            # Tab navigation screens
β”‚   β”œβ”€β”€ activity/[id]/     # Dynamic activity detail pages
β”‚   β”œβ”€β”€ qr/               # QR scanner flow
β”‚   └── subscription/[id]/ # Subscription management
β”œβ”€β”€ components/            # Reusable UI components
β”‚   β”œβ”€β”€ ActivityDetail/   # Activity-specific components
β”‚   └── ui/              # Base UI components
β”œβ”€β”€ context/              # React Context providers
β”‚   β”œβ”€β”€ ActivitiesContext.tsx
β”‚   β”œβ”€β”€ NostrServiceContext.tsx
β”‚   └── ThemeContext.tsx
β”œβ”€β”€ services/             # Core business logic
β”‚   β”œβ”€β”€ database/        # SQLite database layer
β”‚   β”œβ”€β”€ BiometricAuthService.ts
β”‚   └── SecureStorageService.ts
β”œβ”€β”€ hooks/               # Custom React hooks
β”œβ”€β”€ models/              # TypeScript interfaces
β”œβ”€β”€ constants/           # App constants and configuration
└── utils/               # Helper functions and utilities

State Management

  • Context-based Architecture: Multiple specialized contexts for different domains
  • SQLite Database: Persistent storage for activities, subscriptions, and user data
  • Secure Storage: Encrypted storage for sensitive keys and tokens

πŸ”§ Development

Available Scripts

# Start development server
npm start

# Run on specific platforms
npm run android
npm run ios
npm run web

# Type checking
npm run type-check

# Linting
npm run lint

# Build for production
npm run build

Key Development Patterns

Theme-Aware Components

import { useThemeColor } from '@/hooks/useThemeColor';

const backgroundColor = useThemeColor({}, 'background');
const textColor = useThemeColor({}, 'textPrimary');

Database Operations

import { DatabaseService } from '@/services/database';
import { useSQLiteContext } from 'expo-sqlite';

const db = useSQLiteContext();
const dbService = new DatabaseService(db);

Biometric Authentication

import { BiometricAuthService } from '@/services/BiometricAuthService';

const authResult = await BiometricAuthService.authenticate();

Adding New Features

  1. Create Components: Add to appropriate directory in components/
  2. Update Context: Extend existing or create new context providers
  3. Database Schema: Update database migrations in services/database/
  4. Type Definitions: Add interfaces to models/ directory
  5. Navigation: Add routes in app/ directory following Expo Router conventions

πŸ“¦ Building & Deployment

EAS Build Configuration

The project uses Expo Application Services (EAS) for building and deployment:

# Install EAS CLI
npm install -g eas-cli

# Build for development
eas build --profile development

# Build for production
eas build --profile production

# Submit to app stores
eas submit

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit changes: git commit -m 'Add amazing feature'
  4. Push to branch: git push origin feature/amazing-feature
  5. Open a Pull Request

Development Guidelines

  • TypeScript: All new code must be written in TypeScript
  • Theme Support: All components must support dark/light themes
  • Security First: Follow secure coding practices, especially for key management
  • Component Architecture: Create reusable, well-documented components
  • Context Usage: Use appropriate context providers for state management

πŸ“„ License

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

πŸ” Security

Portal prioritizes security and privacy:

  • πŸ”‘ Private Key Security: All private keys stored in device secure enclave
  • πŸ”’ Biometric Protection: Additional security layer for sensitive operations
  • πŸ›‘οΈ No Data Leakage: Zero telemetry or data collection
  • βœ… Cryptographic Verification: All operations cryptographically signed and verified
  • 🏠 Local-First: Everything runs locally on your device

πŸ“ž Support


Built with ❀️ by the Portal Team

About

Portal is your digital identity provider built on Nostr and Lightning

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •