- Project Overview
- Features
- Architecture
- Prerequisites
- Quick Start
- Configuration
- Run the app
- Error handling
- Detailed docs
This mobile application π± showcases the capabilities of the OneEntry CMS with React Native. All app data is sourced from OneEntry β you can customize the entire catalog, pages, forms, and content directly in the CMS admin panel without changing the app code.
The app is built with Expo (Expo Prebuild) and covers the full e-commerce flow: sign up, browse catalog with filters, add to favorites/cart, place an order via Stripe, and receive push notifications for order events.
| Home | Catalog | Order | Profile | Menu |
|---|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
All interactions with the OneEntry CMS are powered by the OneEntry SDK for JavaScript.
- π User creation: Register users via different providers (email, phone) with customizable data fields.
- β User Activation: Activate users via one-time codes (e.g. email verification).
- π OAuth: Optional Google Sign-In.
- π State Management: Redux Toolkit.
- π Shop Catalog: Unlimited products managed from the CMS.
- π Advanced Filtering: Configurable filters over any product attribute.
- π‘ Product Recommendations: Cross-sell / up-sell blocks.
- πΌοΈ Block Content: CMS-driven
Blockentities. - π Feedback Forms: Customizable, with captcha.
- π³ Order Creation and Purchases: Stripe integration.
- π Order History: Per-user order records.
- π¬ Event Notifications: Email, push, and WebSocket delivery from OneEntry.
- π TypeScript: Fully typed codebase.
- π¨ Tailwind (NativeWind): Utility-first styling.
| File(s) | Description |
|---|---|
.env |
OneEntry CMS + OAuth secrets (see .env.example) |
/src/api |
API methods, hooks and OneEntry SDK setup |
/src/components |
Components used directly on pages |
Β Β ββ /auth |
Components for auth pages (login, registration) |
Β Β ββ /content |
Components for content pages (order creation, etc.) |
Β Β ββ /shared |
Reusable components used across multiple pages |
Β Β ββ /ui |
Generic UI elements (buttons, modals, inputs, etc.) |
/src/hooks |
Custom hooks |
/src/pages |
Application screens |
/src/navigation |
React Navigation configuration |
/src/state |
Redux Toolkit slices and core reducers |
/src/types |
TypeScript types (including @env module declaration) |
/src/utils |
Helper functions/constants |
- Separation of concerns. Auth and content logic/components are strictly separated.
- Pages are containers.
/src/pagesfiles are thin layouts that delegate to components. - Colocated hooks. Feature-specific hooks live next to their components; universal hooks live in
hooks/shared/.
Before you start make sure you have:
- Node.js β₯ 18 and yarn (or npm).
- Watchman (recommended on macOS).
- Xcode (for iOS) with a valid Apple Developer account.
- Android Studio with an emulator or a physical device.
- CocoaPods (
sudo gem install cocoapods) for iOS. - A OneEntry account: https://oneentry.cloud/.
- (Optional) Firebase project for push notifications.
- (Optional) Google Cloud OAuth credentials for Google Sign-In.
- (Optional) Stripe account for payments.
# 1. Clone the repository
git clone <YOUR_REPO_URL>
cd new-shop-rn
# 2. Install dependencies
yarn install
# 3. Copy the env template and fill in your OneEntry credentials
cp .env.example .env
# edit .env β set at least PROJECT_URL and APP_TOKEN
# 4. (Optional) Copy Firebase templates and replace them with real files
cp GoogleService-Info.plist.example GoogleService-Info.plist
cp google-services.json.example google-services.json
# then replace the contents with the real files from the Firebase console
# 5. Adjust app.json (bundleIdentifier, package, appleTeamId, EAS projectId)
# 6. Run the app
yarn ios # or: yarn androidNote: This app uses native modules (Firebase, Google Sign-In) and will not run in Expo Go. Use
yarn ios/yarn androidβ they invokeexpo run:*and generate the nativeios/andandroid/folders on first launch.
- Sign up at https://oneentry.cloud/ and create a new project.
- In the admin panel, note the project URL (e.g.
https://your-project.oneentry.cloud). - Go to Project settings β App tokens and generate a new App token.
- Fill your catalog with products, blocks, pages, forms and menus β the SDK expects the same markers referenced in the code (
home,catalog,contact_us,main-menu, etc.). See the OneEntry docs for the schema this template uses.
Copy the template and fill in the values:
cp .env.example .env| Variable | Required | Description |
|---|---|---|
PROJECT_URL |
β | Your OneEntry project URL, e.g. https://your-project.oneentry.cloud. |
APP_TOKEN |
β | App token generated in the OneEntry admin panel. |
GOOGLE_OAUTH_CLIENT_ID |
βοΈ | Google OAuth 2.0 client ID (only if you enable Google Sign-In). |
GOOGLE_OAUTH_CLIENT_SECRET |
βοΈ | Google OAuth 2.0 client secret (only if you enable Google Sign-In). |
The .env file is git-ignored β never commit real secrets.
Open app.json and change these values to your own before building:
expo.ios.bundleIdentifierβ currentlycom.oneentry.shop.expo.ios.appleTeamIdβ your Apple Developer team ID.expo.ios.associatedDomainsβ your project URL.expo.android.packageβ currentlycom.oneentry.shop.expo.extra.eas.projectIdβ replace with your own EAS project ID (or remove the block if you don't use EAS).expo.plugins["@react-native-google-signin/google-signin"].iosUrlSchemeβ replace with your own reversed iOS OAuth client ID (see step 5).
Push notifications require a Firebase project.
- Create a project in the Firebase Console.
- Add an iOS app using the
bundleIdentifierfromapp.json, downloadGoogleService-Info.plistand save it in the project root (replaces the.exampletemplate). - Add an Android app using the
packagefromapp.json, downloadgoogle-services.jsonand save it in the project root. - Enable Cloud Messaging in the Firebase Console.
- In the OneEntry admin panel, connect your Firebase project so OneEntry can send push notifications to your users.
Detailed instructions: https://doc.oneentry.cloud/docs/events/introduction.
Both real config files are listed in .gitignore β do not commit them.
If you don't need "Sign in with Google", you can remove the @react-native-google-signin/google-signin plugin from app.json and the sign-in button from src/components/auth/WelcomeScreen/AuthMethodsList.tsx. Otherwise:
- In Google Cloud Console β APIs & Services β Credentials, create OAuth 2.0 Client IDs for iOS and Web application.
- Put the Web client ID/secret into
.envasGOOGLE_OAUTH_CLIENT_IDandGOOGLE_OAUTH_CLIENT_SECRETβ they are used server-side by OneEntry's OAuth exchange. - Put the iOS reversed client ID (e.g.
com.googleusercontent.apps.xxxxxxxxxxxx-yyyy) intoapp.jsonatexpo.plugins["@react-native-google-signin/google-signin"].iosUrlScheme. - In the OneEntry admin panel, register a
google_iosOAuth provider that points to the same Google OAuth client.
Payment methods are configured in OneEntry under Payment methods. Provide your Stripe credentials in the OneEntry admin panel; the app itself does not store Stripe secrets β it only opens the Stripe checkout URL returned by the SDK.
Verify your setup:
npx expo-doctorThen run:
# iOS (macOS only)
yarn ios
# Android
yarn androidThe first run generates the native ios/ and android/ folders (Expo Prebuild) and installs CocoaPods. Subsequent runs are much faster.
If you prefer cloud builds without dealing with native code, use Expo Application Services (EAS):
npx eas build --platform ios
npx eas build --platform androidRun diagnostics first:
npx expo-doctorIf you get Firebase build errors on Android, add tools:replace attributes to the Firebase <meta-data> tags in android/app/src/main/AndroidManifest.xml:
Replace:
<meta-data android:name="com.google.firebase.messaging.default_notification_channel_id" android:value="default"/>
<meta-data android:name="com.google.firebase.messaging.default_notification_color" android:resource="@color/notification_icon_color"/>
<meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@drawable/notification_icon"/>with:
<meta-data tools:replace="android:value" android:name="com.google.firebase.messaging.default_notification_channel_id" android:value="default"/>
<meta-data tools:replace="android:resource" android:name="com.google.firebase.messaging.default_notification_color" android:resource="@color/notification_icon_color"/>
<meta-data tools:replace="android:resource" android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@drawable/notification_icon"/>For iOS, make sure you have the latest Xcode and iOS SDKs.
Additional documentation lives in /documentations:
- Authorization β login, sign-up, tokens, activation.
- Orders β order creation, tracking, transactions.
- Events β real-time updates and event triggers.
- User State β user state management and synchronization.
Issues and questions: GitHub discussions for React Native




