Skip to content

Commit 6448c9b

Browse files
authored
Revise README for clarity and updated structure
Removed outdated sections and updated project structure details.
1 parent f8d1b8f commit 6448c9b

File tree

1 file changed

+241
-67
lines changed

1 file changed

+241
-67
lines changed

README.md

Lines changed: 241 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,26 @@
1+
```md
12
# React Native Bare Starter
23

3-
[![Use this template](https://img.shields.io/badge/Use%20this%20template-2ea44f?logo=github&logoColor=white)](https://github.com/maximcoding/react-native-starter/generate)
4-
![CI](https://github.com/maximcoding/react-native-starter/actions/workflows/ci.yml/badge.svg)
5-
![React Native](https://img.shields.io/badge/React%20Native-0.82.1-61DAFB?logo=react&logoColor=white)
6-
![TypeScript](https://img.shields.io/badge/TypeScript-5.8-3178C6?logo=typescript&logoColor=white)
7-
![License](https://img.shields.io/badge/license-MIT-green)
8-
9-
A bare-workflow React Native starter for apps that need more than a demo.
10-
11-
Clean foundation from day one: strict TypeScript, feature-first structure, theme tokens, i18n, offline-ready behavior, and solid quality gates — with room to grow without rebuilding the same setup again.
12-
13-
---
14-
15-
## Quick Start
4+
## 🚀 Quick start
165

176
```bash
187
git clone https://github.com/maximcoding/react-native-starter.git
198
cd react-native-starter
209
npm install
2110
npx pod-install ios
2211
cp .env.example .env
23-
```
24-
25-
Edit `.env` as needed, then:
12+
npm start
13+
npm run ios
14+
npm run android
2615

27-
```bash
28-
npm start # Metro bundler
29-
npm run ios # or: npm run android
3016
```
3117

32-
> Requires Node ≥ 20, Xcode (iOS), Android Studio + SDK (Android), CocoaPods (iOS).
33-
> If `npm install` fails on peer deps, try `npm install --legacy-peer-deps`.
34-
35-
---
36-
37-
## ✨ What's Included
18+
Edit `.env` as needed for your setup.
19+
Main values: `API_URL`, `USE_MOCK_API`, optional Sentry keys, optional OTA keys.
3820

21+
> `npm run ios` and `npm run android` run `env:ensure` first, so `.env` is created from `.env.example` if missing.
22+
--------
23+
## ✨ Features Included
3924
- **🧱 Bare React Native** — full native control, no Expo lock-in
4025
- **🧭 Navigation & State** — React Navigation (stacks, tabs, modals), Zustand for global state, TanStack Query for server state with caching, retries, and persistence.
4126
- **📦 TanStack Query** — caching, persistence, retries, and invalidation
@@ -48,62 +33,251 @@ npm run ios # or: npm run android
4833
- **🖼️ SVG via script** — easier icon generation and maintenance
4934
- **🚀 BootSplash included** — native splash screen setup already in place
5035
- **🧪 Developer Experience** — Biome linting, Jest tests, GitHub Actions CI, Maestro E2E, SVG icon generation, and native splash screen via BootSplash.
51-
-
36+
5237
---
5338

54-
## Environment Variables
39+
## 🧭 Project structure
5540

56-
Values are read at build time via `react-native-config`. See `.env.example` for the full list.
41+
The starter uses a **feature-first** layout under `src/features` with shared code in `src/shared`.
5742

58-
| Variable | Purpose |
59-
|---|---|
60-
| `API_URL` | Backend base URL |
61-
| `USE_MOCK_API` | `true` uses the mock transport; login pre-fills demo credentials |
62-
| `WS_URL` | WebSocket base URL |
63-
| `ENV` | `development` / `staging` / `production` |
64-
| `SENTRY_DSN` | Enables Sentry error tracking |
65-
| `CODEPUSH_KEY_IOS` / `CODEPUSH_KEY_ANDROID` | Reserved for OTA updates |
43+
Use these docs for structure details:
6644

67-
After changing `.env`, rebuild the app.
45+
- **Repository layout**[docs/development.md#repository-layout](https://chatgpt.com/c/docs/development.md#repository-layout)
46+
47+
- **Code rules and ownership**[AGENTS.md](https://chatgpt.com/c/AGENTS.md)
48+
6849

69-
---
50+
----------
7051

71-
## Key Commands
52+
## 🛠️ Getting started
7253

73-
| Command | What it does |
74-
|---|---|
75-
| `npm start` | Start Metro (cache reset) |
76-
| `npm run ios` / `npm run android` | Run on simulator or device |
77-
| `npm run lint` | Biome check (read-only) |
78-
| `npm run format` | Biome format + safe fixes |
79-
| `npm test` | Jest |
80-
| `npx tsc --noEmit` | Typecheck |
81-
| `npm run i18n:all` | Extract i18n keys + generate types |
82-
| `npm run gen:icons` | Regenerate SVG icon registry |
83-
| `npm run android:clean` | Clean Android build artifacts |
54+
### Prerequisites
8455

85-
---
56+
Standard bare React Native toolchain:
8657

87-
## Documentation
58+
- Node.js ≥ 20
59+
60+
- Xcode for iOS
61+
62+
- Android Studio + SDK for Android
63+
64+
- CocoaPods for iOS
65+
8866

89-
| Topic | Location |
90-
|---|---|
91-
| Rules, structure & contribution flow | [AGENTS.md](AGENTS.md) |
92-
| Deep developer reference | [docs/development.md](docs/development.md) |
93-
| Offline behavior | [docs/OFFLINE.md](docs/OFFLINE.md) |
94-
| Operations, CI, releases, Sentry | [docs/OPERATIONS.md](docs/OPERATIONS.md) |
95-
| Permissions catalog | [docs/permissions-bare-rn.md](docs/permissions-bare-rn.md) |
96-
| Roadmap | [docs/TODO.md](docs/TODO.md) |
97-
| Changelog | [CHANGELOG.md](CHANGELOG.md) |
67+
### Install notes
9868

99-
---
69+
If `npm install` fails because of peer dependency conflicts:
10070

101-
## Contributing
71+
```bash
72+
npm install --legacy-peer-deps
10273

103-
Contributions are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for the fork/branch/PR workflow and quality checks.
74+
```
10475

105-
---
76+
### Running the app
77+
78+
Keep Metro running in one terminal, then run the native app from another:
79+
80+
```bash
81+
npm start
82+
npm run ios
83+
npm run android
84+
85+
```
86+
87+
### Android troubleshooting
88+
89+
- **No connected devices** — start an emulator or connect a device, then run `npm run android:devices`
90+
91+
- **Missing `codegen/jni` / CMake errors** — run `npm run android:clean`, then `npm run android`
92+
93+
- **Still failing** — try `rm -rf node_modules/*/android/build`, reinstall dependencies, and rebuild
94+
95+
- **Need Gradle clean without broken native tasks** — use `npm run android:clean:gradle`
96+
97+
98+
Full detail: [docs/development.md#android-build](https://chatgpt.com/c/docs/development.md#android-build)
99+
100+
----------
101+
102+
## 🔐 Environment variables
103+
104+
Values are read at build time via [`react-native-config`](https://github.com/lugg/react-native-config).
105+
See [`.env.example`](https://chatgpt.com/c/.env.example). Rebuild the app after changing `.env`.
106+
107+
Variable
108+
109+
Required
110+
111+
Purpose
112+
113+
`API_URL`
114+
115+
For real API
116+
117+
Backend base URL
118+
119+
`USE_MOCK_API`
120+
121+
No
122+
123+
`true` / `1` uses the mock transport in dev
124+
125+
`WS_URL`
126+
127+
No
128+
129+
WebSocket base URL
130+
131+
`ENV`
132+
133+
No
134+
135+
Runtime label: `development`, `staging`, `production`
136+
137+
`SENTRY_DSN`
138+
139+
No
140+
141+
Enables Sentry when non-empty
142+
143+
`SENTRY_ENABLE_IN_DEV`
144+
145+
No
146+
147+
`1` sends Sentry events from `__DEV__`
148+
149+
`SENTRY_TRACES_SAMPLE_RATE`
150+
151+
No
152+
153+
Performance sampling value from `0` to `1`
154+
155+
`CODEPUSH_KEY_IOS` / `CODEPUSH_KEY_ANDROID`
156+
157+
No
158+
159+
Reserved for OTA; no CodePush SDK ships by default
160+
161+
Useful docs:
162+
163+
- [Sentry setup](https://chatgpt.com/c/docs/OPERATIONS.md#sentry)
164+
165+
- [OTA / updates policy](https://chatgpt.com/c/docs/OPERATIONS.md#over-the-air-updates)
166+
167+
- [Publishing / discoverability](https://chatgpt.com/c/docs/OPERATIONS.md#publishing--discoverability)
168+
169+
170+
----------
171+
172+
## ⌨️ Key commands
173+
174+
Command
175+
176+
Description
177+
178+
`npm start`
179+
180+
Start Metro bundler
181+
182+
`npm run ios` / `npm run android`
183+
184+
Run on simulator or device
185+
186+
`npm run env:ensure`
187+
188+
Create `.env` from `.env.example` if missing
189+
190+
`npm run android:clean`
191+
192+
Remove Android native/build directories
193+
194+
`npm run android:devices`
195+
196+
List connected Android devices
197+
198+
`npm run lint`
199+
200+
Run Biome checks
201+
202+
`npm run format`
203+
204+
Apply Biome formatting and safe fixes
205+
206+
`npm test`
207+
208+
Run Jest
209+
210+
`npx tsc --noEmit`
211+
212+
Run typecheck
213+
214+
`npm run i18n:all`
215+
216+
Extract i18n keys and generate types
217+
218+
`npm run gen:icons` / `npm run check:icons`
219+
220+
Manage SVG icon registry
221+
222+
`npm run check:imports`
223+
224+
Run path-alias guard
225+
226+
More scripts:
227+
[docs/development.md#key-commands](https://chatgpt.com/c/docs/development.md#key-commands)
228+
229+
----------
230+
231+
## 📚 Documentation
232+
233+
This README stays intentionally short.
234+
Use the rest of the docs when you need deeper detail.
235+
236+
- **Rules, structure, contribution flow**[AGENTS.md](https://chatgpt.com/c/AGENTS.md)
237+
238+
- **Developer reference**[docs/development.md](https://chatgpt.com/c/docs/development.md)
239+
240+
- **Offline behavior**[docs/OFFLINE.md](https://chatgpt.com/c/docs/OFFLINE.md)
241+
242+
- **Operations, CI, releases, OTA, Sentry**[docs/OPERATIONS.md](https://chatgpt.com/c/docs/OPERATIONS.md)
243+
244+
- **Roadmap / backlog**[docs/TODO.md](https://chatgpt.com/c/docs/TODO.md)
245+
246+
247+
----------
248+
249+
## 🔐 Permissions
250+
251+
Declare only what you actually use.
252+
253+
Full catalog:
254+
[docs/permissions-bare-rn.md](https://chatgpt.com/c/docs/permissions-bare-rn.md)
255+
256+
----------
257+
258+
## 🤝 Contributing
259+
260+
Contributions are welcome.
261+
262+
See [CONTRIBUTING.md](https://chatgpt.com/c/CONTRIBUTING.md) for:
263+
264+
- branch and PR rules
265+
266+
- quality checks
267+
268+
- contribution workflow
269+
270+
- PR checklist
271+
272+
273+
----------
274+
275+
## 🚢 CI/CD & release
276+
277+
Operational details:
278+
[docs/OPERATIONS.md](https://chatgpt.com/c/docs/OPERATIONS.md)
106279

107-
## License
280+
Version history:
281+
[CHANGELOG.md](https://chatgpt.com/c/CHANGELOG.md)
108282

109-
MIT
283+
This covers GitHub Actions, local release builds, optional store secrets, Sentry, Maestro, OTA policy, and publishing notes.

0 commit comments

Comments
 (0)