@@ -33,6 +33,7 @@ This version includes several breaking changes that require manual migration:
3333All component files now use kebab-case instead of PascalCase:
3434
3535** Before:**
36+
3637```
3738src/components/
3839 atoms/
@@ -45,6 +46,7 @@ src/components/
4546```
4647
4748** After:**
49+
4850```
4951src/components/
5052 atoms/
@@ -57,6 +59,7 @@ src/components/
5759```
5860
5961** Migration steps:**
62+
6063- Rename all component folders to kebab-case
6164- Rename all component files to kebab-case
6265- Update all import statements accordingly
@@ -75,6 +78,7 @@ export { default as Skeleton } from './skeleton/skeleton';
7578The main App file has been renamed to lowercase:
7679
7780** Before:**
81+
7882``` tsx
7983// src/App.tsx
8084import ApplicationNavigator from ' @/navigation/Application' ;
@@ -93,6 +97,7 @@ function App() {
9397```
9498
9599** After:**
100+
96101``` tsx
97102// src/app.tsx
98103import ' @/services/i18n/instance' ;
@@ -114,6 +119,7 @@ function App() {
114119```
115120
116121** Migration steps:**
122+
117123- Rename ` src/App.tsx ` to ` src/app.tsx `
118124- Update imports to use new services structure
119125- Update navigator import
@@ -125,6 +131,7 @@ A new services layer has been introduced to centralize business logic, API calls
125131##### HTTP Client
126132
127133** Before:**
134+
128135``` tsx
129136// src/App.tsx
130137export const queryClient = new QueryClient ({
@@ -136,6 +143,7 @@ export const queryClient = new QueryClient({
136143```
137144
138145** After:**
146+
139147``` ts
140148// src/services/http-client.ts
141149import { QueryClient } from ' @tanstack/react-query' ;
@@ -157,13 +165,15 @@ export const queryClient = new QueryClient({
157165##### Storage
158166
159167** Before:**
168+
160169``` tsx
161170// src/App.tsx
162171import { createMMKV } from ' react-native-mmkv' ;
163172export const storage = createMMKV ();
164173```
165174
166175** After:**
176+
167177``` ts
168178// src/services/storage.ts
169179import { createMMKV } from ' react-native-mmkv' ;
@@ -229,6 +239,7 @@ export const fetchOneQueryOptions = (currentId: User['id']) =>
229239```
230240
231241** Migration steps:**
242+
232243- Move existing API calls to ` services/domains/{domain}/{domain}.api.ts `
233244- Create schemas in ` services/domains/{domain}/{domain}.schema.ts `
234245- Create query options in ` services/domains/{domain}/{domain}.query-options.ts `
@@ -239,6 +250,7 @@ export const fetchOneQueryOptions = (currentId: User['id']) =>
239250Internationalization has been moved to the services layer:
240251
241252** Before:**
253+
242254```
243255src/
244256 translations/
252264```
253265
254266** After:**
267+
255268```
256269src/
257270 translations/
264277```
265278
266279** Migration steps:**
280+
267281- Rename translation files to lowercase (en-EN.json → en-en.json)
268282- Move i18n configuration to ` services/i18n/instance.ts `
269283- Import i18n at the top of ` app.tsx ` : ` import '@/services/i18n/instance'; `
274288The navigator has been renamed and relocated:
275289
276290** Before:**
291+
277292``` tsx
278293// src/navigation/Application.tsx
279294function ApplicationNavigator() {
@@ -293,6 +308,7 @@ function ApplicationNavigator() {
293308```
294309
295310** After:**
311+
296312``` tsx
297313// src/navigators/root.tsx
298314function RootNavigator() {
@@ -324,6 +340,7 @@ function RootNavigator() {
324340```
325341
326342** Migration steps:**
343+
327344- Move ` src/navigation/Application.tsx ` to ` src/navigators/root.tsx `
328345- Rename ` ApplicationNavigator ` to ` RootNavigator `
329346- Move navigation types to ` src/services/navigation/types.ts `
@@ -333,6 +350,7 @@ function RootNavigator() {
333350#### 6. Hooks Reorganization
334351
335352** Before:**
353+
336354```
337355src/
338356 theme/
350368```
351369
352370** After:**
371+
353372```
354373src/
355374 hooks/
364383```
365384
366385** Migration steps:**
386+
367387- Move ` useTheme ` to ` hooks/use-theme/use-theme.ts `
368388- Move domain hooks to services layer
369389- Update import paths: ` import { useTheme } from '@/hooks'; `
@@ -374,11 +394,13 @@ src/
374394The ThemeProvider has been moved to components/providers:
375395
376396** Before:**
397+
377398``` tsx
378399import { ThemeProvider } from ' @/theme' ;
379400```
380401
381402** After:**
403+
382404``` tsx
383405import { ThemeProvider } from ' @/components/providers' ;
384406```
@@ -388,6 +410,7 @@ import { ThemeProvider } from '@/components/providers';
388410Tests have been reorganized with a cleaner structure:
389411
390412** Before:**
413+
391414```
392415src/
393416 __mocks__/
402425```
403426
404427** After:**
428+
405429```
406430src/
407431 __tests__/
421445```
422446
423447** Migration steps:**
448+
424449- Move ` tests/TestAppWrapper.tsx ` to ` __tests__/test-wrappers.tsx `
425450- Create ` __tests__/setup.ts ` for test configuration
426451- Organize mocks in ` __tests__/mocks/ `
@@ -449,6 +474,7 @@ import TestAppWrapper from '@/__tests__/test-wrappers';
449474Screens follow the same kebab-case convention:
450475
451476** Before:**
477+
452478```
453479src/screens/
454480 Example/
@@ -459,6 +485,7 @@ src/screens/
459485```
460486
461487** After:**
488+
462489```
463490src/screens/
464491 example/
@@ -473,11 +500,13 @@ src/screens/
473500Asset helper functions have been renamed:
474501
475502** Before:**
503+
476504``` tsx
477505import getAssetsContext from ' @/theme/assets/getAssetsContext' ;
478506```
479507
480508** After:**
509+
481510``` tsx
482511import getAssetsContext from ' @/theme/assets/get-assets-context' ;
483512```
@@ -496,12 +525,14 @@ Version 5.0 introduces a powerful ESLint configuration that enforces project str
496525#### Configuration Structure
497526
498527** Before:**
528+
499529``` js
500530// eslint.config.mjs
501531export default tseslint .config (/* ...*/ );
502532```
503533
504534** After:**
535+
505536``` js
506537// eslint.config.js
507538import { fileCompositionConfig } from ' ./eslint/file-composition/index.mjs' ;
@@ -515,7 +546,10 @@ export default defineConfig([
515546 rules: {
516547 ' project-structure/file-composition' : [ERROR , fileCompositionConfig],
517548 ' project-structure/folder-structure' : [ERROR , folderStructureConfig],
518- ' project-structure/independent-modules' : [ERROR , independentModulesConfig],
549+ ' project-structure/independent-modules' : [
550+ ERROR ,
551+ independentModulesConfig,
552+ ],
519553 },
520554 },
521555 // ... other configs
@@ -540,11 +574,21 @@ export const folderStructureConfig = {
540574 {
541575 name: ' src' ,
542576 children: [
543- { name: ' components' , children: [/* atoms, molecules, organisms, templates */ ] },
577+ {
578+ name: ' components' ,
579+ children: [
580+ /* atoms, molecules, organisms, templates */
581+ ],
582+ },
544583 { name: ' hooks' },
545584 { name: ' navigators' },
546585 { name: ' screens' },
547- { name: ' services' , children: [/* domains, i18n, navigation, storage */ ] },
586+ {
587+ name: ' services' ,
588+ children: [
589+ /* domains, i18n, navigation, storage */
590+ ],
591+ },
548592 { name: ' theme' },
549593 { name: ' translations' },
550594 ],
@@ -605,25 +649,6 @@ const { isError, isSuccess } = useQuery({
605649
606650This makes it easier to handle initialization logic and conditional rendering based on app state.
607651
608- ### Ky HTTP Client
609-
610- The boilerplate now uses Ky as the HTTP client, providing a modern, lightweight alternative to axios:
611-
612- ``` ts
613- import ky from ' ky' ;
614-
615- export const httpClient = ky .extend ({
616- headers: { Accept: ' application/json' },
617- prefixUrl: ` ${process .env .API_URL ?? ' ' }/ ` ,
618- });
619- ```
620-
621- Ky provides:
622- - Better TypeScript support
623- - Simpler API
624- - Smaller bundle size
625- - Native Fetch API under the hood
626-
627652### Domain-Driven Architecture
628653
629654The new services layer encourages domain-driven design:
@@ -637,6 +662,7 @@ services/
637662```
638663
639664Each domain contains:
665+
640666- ** schema** : Type definitions and validation
641667- ** api** : API calls
642668- ** query-options** : TanStack Query configuration
@@ -660,7 +686,7 @@ Use this checklist to ensure a complete migration:
660686- [ ] Move navigation paths to services/navigation/paths.ts
661687- [ ] Move useTheme to hooks/use-theme/use-theme.ts
662688- [ ] Update ThemeProvider import
663- - [ ] Reorganize tests to __ tests __ structure
689+ - [ ] Reorganize tests to ** tests ** structure
664690- [ ] Update jest.config.js setupFilesAfterEnv
665691- [ ] Migrate domain hooks to services structure
666692- [ ] Update all import paths throughout the codebase
0 commit comments