Skip to content

A modern iOS application built with Swift and SwiftUI, designed to provide a seamless user experience on iPhone devices.

License

Notifications You must be signed in to change notification settings

mml555/Gaterlinkapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

49 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

GaterLink - Access Control Management System

A comprehensive React Native application for managing access control systems with QR code generation, user management, and secure file storage.

πŸ“ Project Structure

GaterLinkNative/
β”œβ”€β”€ src/                          # Main source code
β”‚   β”œβ”€β”€ components/               # Reusable UI components
β”‚   β”œβ”€β”€ screens/                  # Screen components
β”‚   β”œβ”€β”€ navigation/               # Navigation configuration
β”‚   β”œβ”€β”€ services/                 # API and external service integrations
β”‚   β”œβ”€β”€ store/                    # Redux store and slices
β”‚   β”œβ”€β”€ utils/                    # Utility functions and helpers
β”‚   β”œβ”€β”€ types/                    # TypeScript type definitions
β”‚   β”œβ”€β”€ config/                   # Configuration files
β”‚   └── contexts/                 # React contexts
β”œβ”€β”€ docs/                         # Documentation
β”‚   β”œβ”€β”€ status-reports/           # Project status and progress reports
β”‚   β”œβ”€β”€ setup-guides/             # Setup and configuration guides
β”‚   β”œβ”€β”€ implementation-guides/    # Implementation documentation
β”‚   └── fixes/                    # Bug fixes and troubleshooting
β”œβ”€β”€ scripts/                      # Build and utility scripts
β”‚   β”œβ”€β”€ test-*.js                 # Test scripts
β”‚   β”œβ”€β”€ setup-*.js                # Setup scripts
β”‚   └── deploy-*.sh               # Deployment scripts
β”œβ”€β”€ android/                      # Android-specific files
β”œβ”€β”€ ios/                          # iOS-specific files
β”œβ”€β”€ functions/                    # Firebase Cloud Functions
β”œβ”€β”€ supabase/                     # Supabase configuration
β”œβ”€β”€ __tests__/                    # Jest test files
└── __mocks__/                    # Test mocks

πŸš€ Features

Core Functionality

  • User Authentication: Firebase-based authentication with role-based access control
  • QR Code Management: Generate, print, and share QR codes for access control
  • User Profile Management: Complete user profiles with document uploads
  • Secure File Storage: Supabase Storage with signed URLs and quota management
  • Real-time Messaging: In-app messaging system for communication
  • Door Type Management: Comprehensive door and access point management

Recent Enhancements (Latest Update)

  • Enhanced User Registration: Extended profile fields (DOB, company, ID, OSHA card, selfie)
  • Secure Storage Integration: Zero-cost Supabase Storage with Edge Functions
  • QR Code Generation: Admin interface for creating and exporting QR codes
  • Profile Completion Flow: Intelligent post-login profile completion
  • Quota Protection: Client-side storage tracking and usage monitoring
  • Image Processing: Automatic compression and optimization

πŸ“± Screenshots

[Screenshots will be added here]

πŸ›  Technology Stack

Frontend

  • React Native: 0.73.2
  • TypeScript: Type-safe development
  • React Navigation: Navigation management
  • Redux Toolkit: State management
  • React Native Paper: UI components

Backend & Storage

  • Firebase Authentication: User authentication
  • Firestore: User data and metadata storage
  • Supabase Storage: Secure file storage with Edge Functions
  • Supabase Edge Functions: Signed URL generation and file management

Key Libraries

  • react-native-qrcode-svg: QR code generation
  • react-native-image-picker: Image selection
  • react-native-image-resizer: Image compression
  • react-native-fs: File system operations
  • react-native-print: QR code printing
  • react-native-share: File sharing
  • react-native-date-picker: Date selection
  • date-fns: Date manipulation

πŸ— Architecture

Storage Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   React Native  β”‚    β”‚   Supabase Edge  β”‚    β”‚  Supabase       β”‚
β”‚   Application   │◄──►│   Functions      │◄──►│  Storage        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚                       β”‚                       β”‚
         β”‚                       β”‚                       β”‚
         β–Ό                       β–Ό                       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Firebase      β”‚    β”‚   JOSE Library   β”‚    β”‚   Private       β”‚
β”‚   Authenticationβ”‚    β”‚   (JWT Verify)   β”‚    β”‚   Bucket        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

File Storage Flow

  1. Upload: Client β†’ Edge Function β†’ Signed URL β†’ Supabase Storage
  2. Download: Client β†’ Edge Function β†’ Signed URL β†’ File Access
  3. Delete: Client β†’ Edge Function β†’ Service Role β†’ Storage Delete

πŸ“¦ Installation

Prerequisites

  • Node.js 18+
  • React Native CLI
  • Xcode 15+ (iOS)
  • Android Studio (Android)
  • Firebase project
  • Supabase project

Setup

  1. Clone the repository

    git clone <repository-url>
    cd Gaterlinkapp
  2. Install dependencies

    npm install
  3. Environment Configuration Create .env file in the root directory:

    # Firebase Configuration
    FIREBASE_API_KEY=your_firebase_api_key
    FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
    FIREBASE_PROJECT_ID=your_project_id
    FIREBASE_STORAGE_BUCKET=your_project.appspot.com
    FIREBASE_MESSAGING_SENDER_ID=your_sender_id
    FIREBASE_APP_ID=your_app_id
    
    # Supabase Configuration
    SUPABASE_URL=your_supabase_url
    SUPABASE_ANON_KEY=your_supabase_anon_key
    SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
    
    # FCM Configuration
    FCM_SERVER_KEY=your_fcm_server_key
  4. iOS Setup

    cd ios && pod install && cd ..
  5. Start the application

    # Start Metro bundler
    npm start
    
    # Run on iOS
    npm run ios
    
    # Run on Android
    npm run android

πŸ§ͺ Testing

Running Tests

# Run all tests
npm test

# Run tests with coverage
npm test -- --coverage

# Run specific test file
npm test -- --testPathPattern=ComponentName

Test Scripts

  • scripts/test-fcm.js - Test Firebase Cloud Messaging
  • scripts/test-firebase-integration.js - Test Firebase integration
  • scripts/test-free-tier-integration.js - Test Supabase free tier integration

πŸ“š Documentation

Setup Guides

Implementation Guides

Status Reports

πŸš€ Deployment

Firebase Functions

# Deploy all functions
npm run deploy

# Deploy specific function
firebase deploy --only functions:functionName

Environment Validation

# Validate environment configuration
npm run env:validate

🀝 Contributing

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

πŸ“„ License

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

πŸ†˜ Support

For support and questions:

πŸ”„ Recent Updates

See CHANGELOG.md for a detailed history of changes and updates.

About

A modern iOS application built with Swift and SwiftUI, designed to provide a seamless user experience on iPhone devices.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published