Skip to content

bernesdev/bookly-stay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

31 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Logo

Bookly Stay

Tests React Native Architecture

Bookly is a demo booking mobile application built with React Native + Expo to showcase feature-first organization, modern mobile architecture, and production-ready patterns.

⚠️ This app is for demonstration purposes only. No real payments, reservations, or transactions are processed.

Bookly Stay

πŸ“‘ Table of Contents

✨ Overview

Bookly simulates a complete accommodation booking experience, including authentication, destination search, hotel discovery, and reservation confirmation.

The project is structured to reflect real-world mobile applications, prioritizing:

  • Feature-based organization
  • Clear separation of concerns
  • Scalable routing and state management
  • Maintainable and testable architecture

πŸ“Έ Screenshots

Home Screen Catalog Screen Accommodation Screen Bookings Screen Sign-In Screen

πŸ“± Key Features

  • Authentication: Email/password and social sign-in.
  • Destination Discovery: Search locations, view top destinations, and use geo-based suggestions.
  • Accommodation Catalog: Browse, sort, and open hotel details with rich sections.
  • Booking & Checkout: Pick dates/occupancy, review details, and confirm a mocked reservation.
  • Bookings Management: Track active and past bookings from the dedicated tab.
  • Feedback Loop: Built-in bug reporting flow.

πŸ§ͺ Try the App (Closed Test)

You can install the Bookly app directly on your device via the closed test builds.

πŸ‘‰ Bookly – Closed Test Page

🧱 Tech Stack

  • React Native & Expo
  • State management: zustand (client state) + @tanstack/react-query (server state)
  • Navigation: expo-router
  • Networking: axios
  • Forms & validation: react-hook-form + zod
  • Styling: nativewind
  • Localization: i18next
  • Local storage: react-native-mmkv
  • Backend Services: Firebase (Auth, Firestore, Crashlytics) + REST API.

πŸ— Architecture

Bookly follows a feature-first modular architecture approach.

graph TD
  subgraph Presentation ["<b>Presentation Layer</b>"]
    UI[Expo Router Screens]
    Comp[Reusable UI Components]
    end

  subgraph AppState ["<b>State Layer</b>"]
    SQ[TanStack Query]
    CS[Zustand Stores]
    end

    subgraph Data ["<b>Data Layer</b>"]
    Client[Axios API Client]
    FeatureAPI[Feature API Modules]
    Mapper[DTO / Mappers / Types]
    end

  subgraph Ext ["Firebase / REST Backend"]
    end

  subgraph Lo ["MMKV Local Storage"]
    end

    %% Request
  UI --> Comp
  Comp --> SQ
  Comp --> CS
  SQ --> FeatureAPI
  FeatureAPI --> Client

    %% Response
  Ext --> Client
  Lo --> CS
  Client --> Mapper
  Mapper --> SQ
Loading

πŸ—‚οΈ Folder Structure

Each feature (e.g., auth, catalog, booking) is self-contained:

app/
β”œβ”€β”€ (tabs)/             # Main tab routes (home, bookings, profile)
β”œβ”€β”€ auth.tsx
β”œβ”€β”€ catalog.tsx
β”œβ”€β”€ accommodation.tsx
β”œβ”€β”€ checkout.tsx
└── ...

src/
β”œβ”€β”€ core/               # HTTP, interceptors, bootstrap, services
β”œβ”€β”€ shared/             # Reusable UI, theme, selectors, hooks, stores
β”œβ”€β”€ features/
β”‚   β”œβ”€β”€ auth/           # Feature: Authentication
β”‚   β”œβ”€β”€ location/       # Feature: Destination and location search
β”‚   β”œβ”€β”€ catalog/        # Feature: Accommodation listing
β”‚   β”œβ”€β”€ booking/        # Feature: Booking flow and history
β”‚   β”œβ”€β”€ checkout/       # Feature: Checkout and confirmation
β”‚   └── ...
└── i18n/               # Localization setup and translation resources

πŸ’‘ Technical Decisions

Why React Query + Zustand?

I split state responsibilities between server and client concerns. TanStack Query handles cache, pagination, and API lifecycle for remote data, while Zustand keeps booking/session state simple and predictable across screens.

πŸš€ Getting Started

Prerequisites

  • Node.js LTS
  • npm
  • Expo SDK 55+ toolchain
  • Android Studio or Xcode
  • CocoaPods (for iOS)

Configuration

Environment variables

Environment values are provided via .env.

πŸ”₯ Firebase

  1. Configure your environment variables:
EXPO_PUBLIC_API_URL=...
EXPO_PUBLIC_GOOGLE_WEB_CLIENT_ID=...
GOOGLE_MAPS_API_KEY=...
  1. Create a Firebase project (Auth + Firestore + Crashlytics enabled).

  2. Add platform configuration files in credentials/firebase:

  • google-services.json
  • GoogleService-Info.plist
  1. Build and run on device/simulator:
npm run android
npm run ios

Installation

# Install dependencies
npm install

# iOS setup
npx pod-install

πŸ§ͺ Running the Tests

The project prioritizes coverage for feature screens, components, hooks, and API modules.

Unit and Widget Tests

npm run test

Test Coverage

To generate coverage data and HTML report:

npm run test:cov

Current line coverage: 80%+

Test Coverage

🎨 Assets & Localization

  • Assets: assets/icons, assets/images
  • Localization: Handled via i18next + react-i18next (Current locale: en).

πŸ‘¨β€πŸ’» Author

Gabriel Peres Bernes

Full-Stack Software Engineer

LinkedIn: https://www.linkedin.com/in/bernesdev/

Email: bernes.dev@gmail.com

πŸ“„ License & Disclaimer

This project is intended for educational and demonstration purposes only and does not represent a real commercial product.

About

Demo React Native booking app showcasing feature-first architecture, routing, authentication flow, and production-ready patterns.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors