Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tonidarodda/react-native-template

A React Native template featuring Redux for state management, react-i18next for internationalization, React Query for data fetching, customizable UI components, and seamless navigation. Includes Axios for API management, WebSocket support, and a modular architecture for scalable mobile app development, not using Expo at all for performance purpose.
https://github.com/tonidarodda/react-native-template

api-integration axios boilerplate cross-platform i18n internationalization mobile-app mobile-development modular-architecture navigation react-native react-query redux state-management template typescript ui-components websocket

Last synced: 2 months ago
JSON representation

A React Native template featuring Redux for state management, react-i18next for internationalization, React Query for data fetching, customizable UI components, and seamless navigation. Includes Axios for API management, WebSocket support, and a modular architecture for scalable mobile app development, not using Expo at all for performance purpose.

Awesome Lists containing this project

README

        

---

# React Native Template

![React Native](https://img.shields.io/badge/React%20Native-20232A?style=for-the-badge&logo=react&logoColor=61DAFB)
![Redux](https://img.shields.io/badge/Redux-764ABC?style=for-the-badge&logo=redux&logoColor=white)
![i18next](https://img.shields.io/badge/i18next-26A69A?style=for-the-badge&logo=i18next&logoColor=white)
![React Query](https://img.shields.io/badge/React%20Query-FF4154?style=for-the-badge&logo=react-query&logoColor=white)
![Yarn](https://img.shields.io/badge/Yarn-2C8EBB?style=for-the-badge&logo=yarn&logoColor=white)
![License](https://img.shields.io/badge/License-UNLICENSED-green?style=for-the-badge)

This project is a React Native template designed to accelerate development by providing essential features such as state management, internationalization, data fetching, navigation, and reusable components.

## Screenshots

Created using the default components provided in the project.

### Welcome Screen

Welcome Screen

### Login Screen

Login Screen

### Register Screen

register Screen

### Profile Screen

profile Screen

## Features

- **๐ŸŒ Internationalization (i18n)**
- Multi-language support using `react-i18next` for seamless localization.

- **๐Ÿ—ƒ๏ธ State Management with Redux**
- Centralized state management for efficient global state access and updates.

- **๐Ÿ” Data Fetching with React Query**
- Optimized data fetching, caching, and synchronization.

- **๐Ÿงญ Navigation**
- Smooth and intuitive navigation using `react-navigation` with base components like `VStack` and `HStack`.

- **โš›๏ธ Component-Based Architecture**
- Modular design with reusable UI components and consistent styling.

- **๐Ÿ“ฆ Common Utilities**
- Helper functions and utilities for streamlined development.

- **๐Ÿ”— Axios Management**
- Configurable API requests using Axios with built-in error handling and response management.

- **๐ŸŒ WebSocket Management**
- Real-time communication support using WebSockets.

- **๐Ÿช Cookie Management**
- Simplified management of cookies for authentication and user sessions.

- **๐Ÿ”’ Authentication**
- User authentication and registration with secure token management.

## Components

The project includes a set of reusable components for building user interfaces:

- **Button Components**
- `button.tsx`: Standard button component with customizable styling.

- **Typography Components**
- `h1.tsx`, `h2.tsx`: Heading components for consistent typography.
- `text.tsx`: Customizable text component for displaying content.

- **Input Components**
- `input.tsx`: Basic input field component.
- `input-with-icon.tsx`: Input field with an icon for enhanced user interaction.

- **Layout Components**
- `vstack.tsx`: Vertical stack layout for arranging elements vertically.
- `hstack.tsx`: Horizontal stack layout for arranging elements horizontally.
- `spacer.tsx`: Spacer component for adding flexible space between elements.

- **Navigation Components**
- `navbar.tsx`: Customizable navigation bar for app header.

- **Image Components**
- `image.tsx`: Image component for displaying images with caching support.

- **Utility Components**
- `separator.tsx`: Divider component for separating content.
- `separator-with-text.tsx`: Divider with text for enhanced UI.
- `switch.tsx`: Toggle switch component for boolean inputs.

- **Index File**
- `index.ts`: Central export file for components.

## ๐Ÿš€ Getting Started

### Prerequisites

Ensure you have the following installed:

- Node.js (v14 or higher)
- Yarn
- Android Studio / Xcode for Android/iOS development

### Installation

1. **Clone the repository:**

```sh
git clone [email protected]:ToniDarodda/react-native-template.git
cd ReactNativeTemplate
```

2. **Install dependencies:**

```sh
yarn install
```

3. **Configure environment variables:**

Update the `.env` file in the root directory with your configuration settings:

```sh
API_URL='https://your-api-url.com'
SOCKET_URL='https://your-socket-url.com'
```

### Running the Application

1. **Start the Metro Bundler:**

```sh
yarn start
```

2. **Run the application on Android:**

```sh
yarn android
```

3. **Run the application on iOS:**

```sh
yarn ios
```

4. **Access the application:**

The app will be available on your emulator or device.

## ๐Ÿงช Testing

To run the tests, use the following command:

```sh
yarn test
```

## ๐Ÿ› ๏ธ Scripts

- **๐Ÿงน Format code using Prettier:** `yarn format`
- **๐Ÿƒโ€โ™‚๏ธ Start the application:** `yarn start`
- **๐Ÿ‘จโ€๐Ÿ’ป Start in development mode:** `yarn android` or `yarn ios`
- **๐Ÿ” Lint the code using ESLint:** `yarn lint`
- **๐Ÿงช Run the tests:** `yarn test`
- **๐Ÿš€ Run end-to-end tests:** `yarn test:e2e`

## ๐Ÿ“œ License

There is no license; you're free to use it.

## ๐Ÿ‘ค Author

[Toni Da Rodda](mailto:[email protected])

## ๐Ÿ› ๏ธ Icons

- **๐Ÿš€ Deployment**
- **โš™๏ธ Configuration**
- **๐Ÿ“„ Documentation**
- **๐Ÿ”ง Maintenance**
- **๐Ÿ”’ Security**
- **๐Ÿ“ซ Email Integration**
- **๐Ÿ“ˆ Performance Optimization**
- **โšก Gain Time**

---

Feel free to contribute to this project by submitting issues or pull requests.

For any questions or support, please contact [Toni Da Rodda](mailto:[email protected]).

---