Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .claude/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Production-oriented React Native starter for mobile apps: feature-first architec

## Tech Stack

- **Framework:** React Native 0.82.1 (bare workflow)
- **Framework:** React Native 0.87.0 (bare workflow)
- **Language:** TypeScript (strict)
- **State Management:** Zustand (`src/shared/stores/`); TanStack React Query for server state
- **Navigation:** React Navigation v7; `src/navigation/routes.ts`, `root-param-list.ts`
Expand Down Expand Up @@ -164,7 +164,8 @@ Figma MCP is configured for design-to-code (get_design_context, etc.). Use for F
## Common Pitfalls — Do NOT

- Do NOT add new npm packages without asking/RFC.
- Do NOT change any package version in `package.json` or `package-lock.json`. Fix consuming code to match the installed version instead.
- Do NOT change package versions on your own initiative — fix consuming code to match what is installed.
A version bump is its own task, asked for by the owner, never a side effect of another change.
- Do NOT use `fetch`; use project HTTP/transport only.
- Do NOT put feature logic in `src/shared/components/ui/` or `src/shared/stores/`.
- Do NOT use raw colors/spacing/fonts in UI; use theme tokens.
Expand Down
5 changes: 4 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ Use path alias `@/` only (e.g. `@/navigation/`, `@/session/`, `@/config/`, `@/i1
## Don'ts

- Do not add new dependencies without an agreed process.
- **Never change package versions in `package.json` or `package-lock.json`.** Do not upgrade, downgrade, or replace any dependency. If a version mismatch is causing a bug, fix the consuming code to match the installed version — do not touch the package files.
- **Never change package versions on your own initiative.** Do not upgrade, downgrade, or replace a dependency
to work around a bug: fix the consuming code to match the installed version instead. Version changes happen
only as their own deliberate piece of work, asked for by the owner — as the React Native 0.87 upgrade was —
and never folded into an unrelated change, because a break that follows a mixed diff cannot be attributed.
- No Tailwind, NativeWind, or Styled Components.
- No `fetch`; use project HTTP/transport layer only.
- No raw colors or spacing in UI; use theme tokens.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

[![Use this template](https://img.shields.io/badge/Use%20this%20template-2ea44f?logo=github&logoColor=white)](https://github.com/maximcoding/react-native-starter/generate)
![CI](https://github.com/maximcoding/react-native-starter/actions/workflows/ci.yml/badge.svg)
![React Native](https://img.shields.io/badge/React%20Native-0.82.1-61DAFB?logo=react&logoColor=white)
![React Native](https://img.shields.io/badge/React%20Native-0.87.0-61DAFB?logo=react&logoColor=white)
![TypeScript](https://img.shields.io/badge/TypeScript-5.8-3178C6?logo=typescript&logoColor=white)
![License](https://img.shields.io/badge/license-MIT-green)

React native starter project (no Expo) - modern state management, fast storage, and a production-minded foundation.

## ✨ Features Included

- **🧱 Bare React Native 0.82.1** — full native control, (no Expo lock-in)
- **🧱 Bare React Native 0.87.0** — full native control, (no Expo lock-in)
- **🧭 React Navigation 7.x** — stacks, tabs, modals, predefined presets and options
- **📦 TanStack Query 5.x** — Framework agnostic powerful server data fetching library. Caching, updating, retries, invalidation, and persistence.
- **🪶 Zustand 5.x** — A small 1KB size, fast state management hook-based API. Eliminating boilerplates and prop drilling.
Expand Down
36 changes: 19 additions & 17 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,40 +54,42 @@ def jscFlavor = 'io.github.react-native-community:jsc-android:2026004.+'
def hermesEnabled = (project.findProperty("hermesEnabled") ?: "true")

android {
ndkVersion rootProject.ext.ndkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
compileSdk rootProject.ext.compileSdkVersion
ndkVersion = rootProject.ext.ndkVersion
buildToolsVersion = rootProject.ext.buildToolsVersion
compileSdk = rootProject.ext.compileSdkVersion

buildFeatures {
buildConfig = true
}

namespace "com.reactnativestarter"
namespace = "com.reactnativestarter"
defaultConfig {
applicationId "com.reactnativestarter"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
applicationId = "com.reactnativestarter"
minSdk = rootProject.ext.minSdkVersion
targetSdk = rootProject.ext.targetSdkVersion
versionCode = 1
versionName = "1.0"
}

signingConfigs {
debug {
storeFile file('debug.keystore')
storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
storeFile = file('debug.keystore')
storePassword = 'android'
keyAlias = 'androiddebugkey'
keyPassword = 'android'
}
}

buildTypes {
debug {
signingConfig signingConfigs.debug
signingConfig = signingConfigs.debug
}
release {
signingConfig signingConfigs.debug
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
signingConfig = signingConfigs.debug
minifyEnabled = enableProguardInReleaseBuilds
// AGP 9 запретил `proguard-android.txt`: он содержит `-dontoptimize`
// и глушит оптимизации R8. Оптимизирующий вариант — замена по указанию AGP.
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
}
}
}
Expand Down
62 changes: 46 additions & 16 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,26 +1,56 @@
plugins {
id "com.android.application" version "8.13.2" apply false
id "com.android.library" version "8.13.2" apply false
id "org.jetbrains.kotlin.android" version "2.2.21" apply false
/**
* Структура взята из шаблона React Native 0.87 (`@react-native-community/template`).
*
* Версии AGP, Kotlin и react-native-gradle-plugin здесь намеренно **не задаются**:
* ими управляет сам RN через composite build
* `includeBuild("../node_modules/@react-native/gradle-plugin")`. Прежний вариант
* прибивал AGP гвоздями в блоке `plugins { id "com.android.application" version … }`,
* и с RN 0.87 это ломало сборку: RNGP всё равно подтягивал свой AGP 9, а объявленная
* версия игнорировалась — конфликт вылезал как «plugin is no longer required» и
* «does not specify compileSdk».
*/
buildscript {
ext {
compileSdkVersion = 36
targetSdkVersion = 36
minSdkVersion = 24

// Provided by includeBuild("../node_modules/@react-native/gradle-plugin")
id "com.facebook.react" apply false
// Выровнено с шаблоном 0.87: более старые build-tools и NDK
// AGP этой версии уже не обещает поддерживать.
buildToolsVersion = "37.0.0"
ndkVersion = "27.1.12297006"
kotlinVersion = "2.2.0"
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle")
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
}
}

ext {
// Android SDK / Tools (AGP 8.13 supports API 36) :contentReference[oaicite:2]{index=2}
compileSdkVersion = 36
targetSdkVersion = 36
minSdkVersion = 24

// As per AGP compatibility defaults (can be installed via SDK Manager) :contentReference[oaicite:3]{index=3}
buildToolsVersion = "35.0.0"
ndkVersion = "27.0.12077973"
}
apply plugin: "com.facebook.react.rootproject"

allprojects {
repositories {
google()
mavenCentral()
}
}

allprojects {
// AGP 9 требует, чтобы пространство имён было уникальным, а io.github.zhongwuzw
// 2.4.0 отдаёт `com.tencent.mmkv` сразу из двух артефактов — mmkv и annotation,
// из-за чего слияние манифестов падает. В 2.4.1 это разведено.
//
// Поднимается только нативный артефакт: npm-пакеты react-native-mmkv и
// react-native-nitro-modules по решению владельца не трогаются вовсе.
configurations.configureEach {
resolutionStrategy {
force "io.github.zhongwuzw:mmkv:2.4.1"
}
}
}
12 changes: 11 additions & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,14 @@ edgeToEdgeEnabled=false

# Additional Android settings (BuildConfig enabled in app/build.gradle buildFeatures)
android.nonTransitiveRClass=false
android.nonFinalResIds=false
android.nonFinalResIds=false

# ── Флаги AGP 9, без которых сборка RN не заводится ─────────────────────────
# Оба стоят в шаблоне React Native 0.87 и оба выключают новое поведение AGP 9:
# builtInKotlin=false — AGP 9 иначе запрещает плагин org.jetbrains.kotlin.android,
# а его применяют девять библиотек экосистемы (screens, safe-area-context,
# gesture-handler, mmkv, nitro-modules и другие) даже в самых свежих версиях;
# newDsl=false — оставляет прежний Gradle DSL, на котором написаны и наш
# app/build.gradle, и все те же библиотеки.
android.builtInKotlin=false
android.newDsl=false
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
4 changes: 3 additions & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ module.exports = {
},
},
],
'react-native-reanimated/plugin',
// Плагин переехал в worklets: `react-native-reanimated/plugin` в 4.x —
// лишь реэкспорт `react-native-worklets/plugin`. Держать последним.
'react-native-worklets/plugin',
],
}
Loading
Loading