- NodeJS
- React Native
- TypeScript
- Expo
- Expo app (iOs or Android)
# Install dependencies for the host
yarn
# Install git hooks
yarn postinstall
# Start the application
yarn dev# Identify changes you want to commit
git add .
```commit
# Husky will trigger, select appropriate choices for commit message and after finalizing commit message, upon arriving to vim just type :wq and enter to save
git commit
```push
# Push changes to remote branch if changes has been finalized
git push origin master
This page should automatically open in your browser. You can choose to run it in your preferred platform by selecting the options on the left. You can also scan the QR code using the Expo app on iOS and android to execute it on your mobile device.

| Name | Description |
|---|---|
| src/assets/* | All the static assets needed for the application. |
| src/components/* | All app wise common components |
| src/config/environment/* | Any app level environment configs should go here. |
| src/config/axios/* | Configurations for axios |
| src/constants/* | Common constant values |
| src/hooks/* | Custom react hooks |
| src/navigators/* | Define your navigation and routings here |
| src/redux/* | Redux store that stores all global state of the app |
| src/screens/* | Screens made out of components |
| src/styles/* | Common styles |
| src/utils/* | Utility functions |
| .comminlintrc.json | Commit lint configuration |
| .editorconfig | Editor configuration |
| .eslintrc | Eslint configuration |
| .env.example | Project environment variables |
| .eslintignore | Folder and files ignored by eslint |
| .gitignore | Folder and files ignored by git. |
| .prettierignore | Folder and files ignored by prettier. |
| .prettierrc | Prettier configuration |
| app.json | App configurations by expo |
| App.tsx | Entry point for the applicatinon |
| babel.config.js | Babel configuration |
| metro.config.js | Metro configuration |
| package.json | NPM dependencies. |
| package-lock.json | Contains exact versions of NPM dependencies in package.json. |
| tsconfig.json | Contains typescript configuration for this project. |
Every time you have changes in the core files e.g. env, app.json, package.json etc. just restart and run expo r -c to reset cache in order to reflect changes
- Create the atomic components e.g. atoms, molecules and organisms ( if needed )
- Create the screen and template
- Add the navigation
This project contains a .env.example file that you can use. Rename it to .env and modify the contents to your needs. After modifying dotenv values always perform expo r -c to clear cache and pick up core file changes. Also update the values in *.d.ts.
KAROSA_IOS=value
KAROSA_ANDROID=valuedeclare module "@env" {
export const KAROSA_IOS: string;
export const KAROSA_ANDROID: string;
}import { KAROSA_ANDROID, KAROSA_IOS } from "@env";
Run yarn generateComponent|generateScreen <component-name> to generate a new component or screen
Check the components folder if you have neccessary components needed to finish your screen. If not, you can define the component in the screen itself or add any components here if you think it is reusable between screens.
- Create a folder for the component in
src/components. The name should be able to give others the idea what the component is about. - Create a TSX file called
index.tsxunder that folder. This file will define the component itself. - Create a
styles.tsfile. This file will define the styling of the component. - (Optional) You can also create a component within a component for complex components.
The screen defines a collection of components. You can define some components here if you think it is only usable within the screen but preferrably components should be resuable. Any logic, API request, or retrieving from redux store should be defined here.
- Create a folder under
src/screens. Make sure the name is concise enough to understand what the component is about. - Create a TSX called
index.tsx. This should contain the all the components that make up the screen.
The navigation defines the routing/relationship between the screens. For more info, refer to this documentation.
Use kebab-case for files and folders that are not components or screens and camelCase for variables within files and for files and folders that are components or screens. The only exception would be the component names which should be PascalCase.
// File name is edit-profile.tsx
const EditProfileScreen: React.FC = () => {
const propName = 'Sample'
return <EditProfile name={propName} />;
};
In some cases, we include the file functionality in its file name in the format:
<file-name>-<functionality>.<extension>
<file-name><functionality>.<extension>
Non-component/screen file/folder naming example:
- user
-service.ts - user
-model.ts - bcrypt
-util.ts
Screen/component file/folder naming example:
- AuthMain
- ShopEditAddress
- ProductNew
Under construction
Under construction
Under construction
- Testing