Skip to content

About

CAG challenge - car list info

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

CAG Challenge App

A React Native vehicle auction app that allows users to browse vehicles, filter by criteria, manage favorites, and view detailed vehicle information. Built as a solution to the React Native Developer Test challenge.

Light Theme Dark Theme
Light Theme Dark Theme

Theme Support: The app automatically adapts to your device's system theme (light/dark mode).

Prerequisites

  • Node.js
  • npm or yarn
  • iOS Simulator or Android Emulator

Platform Support: This app is built for iOS and Android. Web platform is not supported due to native animation libraries.

Setup

  1. Install dependencies:

    npm install
  2. Start the Mock API (Required for data):

    npm run api

    This starts a json-server on port 3000 with the mock vehicle data.

  3. Start the App:

    npm start

    Press i for iOS Simulator.

Note: To regenerate or customize mock data (UUIDs, images, auction dates), run node scripts/generate-mock-data.js.

Note: This project uses a patched version of json-server to support _like query parameters for case-insensitive filtering. The patch is automatically applied via patch-package during npm install.

Features

  • Vehicle List: Browse vehicles with image placeholders and auction countdown timers (days/hours).
  • Favorites: Toggle favorites and filter to show favorites only.
  • Filtering: Filter by Make, Model, and Starting Bid Range with active filter indicators.
  • Sorting: Sort by Price (ascending/descending), Auction Date (ending soon/later), and Vehicle Age (newest/oldest).
  • Details: View comprehensive vehicle information on dedicated detail pages.
  • Dark Mode: App is dark mode enabled (follows system theme, manual toggle not implemented).
  • Persistent State: Filters and favorites persist across app restarts.
  • Infinite Scroll: Paginated vehicle loading with pull-to-refresh.

Tech Stack

  • Framework: React Native (Expo)
  • Styling: NativeWind (TailwindCSS)
  • State Management: Zustand (modular stores for vehicles, filters, and favorites)
  • Navigation: Expo Router
  • Icons: Ionicons / Expo Symbols
  • Testing: Jest with unit tests for store logic

Testing

Run tests:

npm test

Run tests with coverage:

npm run test:coverage

Tests cover critical store logic including vehicle filtering, sorting, and favorite management.

About

CAG challenge - car list info

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages