Skip to content

amrq88/darbna-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Darbna Mobile Application

A modern mobile application built with React, TypeScript, and Capacitor for Android and iOS platforms.

πŸ“± Overview

Darbna is a content management mobile application that provides users with access to educational and informational content. The app features user authentication, content browsing, search functionality, favorites management, and comprehensive accessibility settings.

πŸš€ Features

  • User Authentication: Secure login and registration system
  • Content Management: Browse, search, and view detailed content
  • Category Navigation: Organized content by categories
  • Favorites System: Save and manage favorite content
  • User Profile: Comprehensive profile management with accessibility settings
  • Multi-language Support: English and Arabic (RTL support)
  • Accessibility Features:
    • Dark mode
    • High contrast mode
    • Adjustable font sizes
    • Screen reader optimization
  • Search Functionality: Enhanced search with visual feedback
  • Responsive Design: Optimized for mobile devices

πŸ› οΈ Tech Stack

  • Framework: React 19.2.3 with TypeScript
  • Mobile: Capacitor 8.0
  • State Management: Redux Toolkit
  • Routing: React Router v7
  • HTTP Client: Axios
  • Forms: React Hook Form
  • Internationalization: react-i18next
  • UI: Custom CSS with responsive design

πŸ“‹ Prerequisites

  • Node.js 18+ and npm
  • Android Studio (for Android development)
  • Xcode (for iOS development, macOS only)
  • Java Development Kit (JDK)

πŸ”§ Installation

  1. Clone the repository

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

    npm install
  3. Configure environment

    • Update API endpoints in src/constants/config.ts
    • Configure Capacitor settings in capacitor.config.ts

πŸƒ Running the Application

Development Mode

npm start

This starts the React development server. Open http://localhost:3000 to view it in the browser.

Building for Production

npm run build

This creates an optimized production build in the build folder.

Android Development

  1. Sync Capacitor

    npm run cap:sync
  2. Open in Android Studio

    npm run cap:open:android
  3. Build Debug APK

    npm run android:build:debug
  4. Build Release APK

    npm run android:build
  5. Build Release AAB (for Play Store)

    cd android && gradlew.bat bundleRelease

iOS Development

  1. Sync Capacitor

    npm run cap:sync
  2. Open in Xcode

    npm run cap:open:ios

πŸ“ Project Structure

src/
β”œβ”€β”€ api/              # API service files
β”œβ”€β”€ components/       # Reusable React components
β”‚   β”œβ”€β”€ category/    # Category-related components
β”‚   β”œβ”€β”€ common/      # Common UI components
β”‚   └── content/     # Content-related components
β”œβ”€β”€ constants/        # Configuration constants
β”œβ”€β”€ hooks/           # Custom React hooks
β”œβ”€β”€ i18n/            # Internationalization files
β”œβ”€β”€ navigation/      # Navigation configuration
β”œβ”€β”€ screens/         # Screen components
β”‚   β”œβ”€β”€ auth/       # Authentication screens
β”‚   β”œβ”€β”€ categories/ # Category screens
β”‚   β”œβ”€β”€ content/    # Content screens
β”‚   β”œβ”€β”€ favorites/  # Favorites screen
β”‚   β”œβ”€β”€ home/       # Home screen
β”‚   β”œβ”€β”€ profile/    # Profile screen
β”‚   └── search/     # Search screen
β”œβ”€β”€ store/          # Redux store configuration
β”‚   └── slices/    # Redux slices
β”œβ”€β”€ types/          # TypeScript type definitions
└── utils/          # Utility functions

πŸ” Configuration

API Configuration

Update the API base URL in src/constants/config.ts:

export const API_BASE_URL = 'https://your-api-url.com/api';

Capacitor Configuration

Configure app settings in capacitor.config.ts:

  • App ID: org.mpdl.darbna
  • App Name: Darbna
  • Version: 2.1.0

Android Signing

The app is configured for release signing. Keystore files are included:

  • android/key.properties - Keystore configuration
  • android/upload-keystore.jks - Signing keystore
  • key.properties - Root level keystore config (backup)
  • upload-keystore.jks - Root level keystore (backup)

Important:

  • The keystore files are provided for Play Store releases
  • Keep the keystore file and passwords secure
  • You'll need these same files for all future app updates
  • Never commit keystore files to public repositories

πŸ“¦ Building for Production

Android App Bundle (AAB) for Play Store

cd android && gradlew.bat bundleRelease

The signed AAB file will be generated at:

android/app/build/outputs/bundle/release/app-release.aab

Android APK

npm run android:build

The signed APK will be generated at:

android/app/build/outputs/apk/release/app-release.apk

🌐 Internationalization

The app supports English and Arabic languages. Translation files are located in:

  • src/i18n/en.json - English translations
  • src/i18n/ar.json - Arabic translations

To add new translations, update the respective JSON files.

β™Ώ Accessibility

The app includes comprehensive accessibility features:

  • Font Size: Adjustable (Small, Medium, Large)
  • Dark Mode: System-wide dark theme
  • High Contrast: Enhanced contrast mode
  • Screen Reader: Optimized for screen readers

Accessibility settings are managed in the Profile screen and persist across app sessions.

πŸ§ͺ Testing

Run tests with:

npm test

πŸ“ Available Scripts

  • npm start - Start development server
  • npm run build - Build for production
  • npm test - Run tests
  • npm run cap:sync - Sync web assets to native projects
  • npm run cap:copy - Copy web assets to native projects
  • npm run cap:open:android - Open Android project in Android Studio
  • npm run cap:open:ios - Open iOS project in Xcode
  • npm run android:build - Build signed release APK
  • npm run android:build:debug - Build debug APK

πŸ“„ License

ISC

πŸ‘₯ Support

For technical support or questions, please contact the development team.

πŸ“± App Information

  • Package Name: org.mpdl.darbna
  • Version: 2.1.0
  • Version Code: 10
  • Platform: Android, iOS (via Capacitor)

Built with ❀️ using React and Capacitor

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages