···11-**React Native Developer Assessment**
11+# React Native Developer Assessment
2233-**Introduction**
44-The purpose of this assignment is to evaluate your familiarity with React Native, mobile development best practices, and to showcase your approach to clean, reusable, and maintainable code. This will also help us understand your sense of design and user experience for mobile applications.
33+## Introduction
5466-**Requirement**
55+The purpose of this assignment is to evaluate your familiarity with React Native,
66+mobile development best practices, and to showcase your approach to clean, reusable,
77+and maintainable code. This will also help us understand your sense of
88+design and user experience for mobile applications.
99+1010+## Requirement
1111+712Create a simple mobile banking application.
88-You can use the provided BankingMockAPI (see README for API details and setup instructions) as a source of data for your application. The app should allow a user to:
1313+You can use the provided BankingMockAPI as a source of data for your application.
1414+See README for API details and setup instructions. The app should allow a user to:
91510161. **Authenticate** (login) using credentials.
11172. **View a list of their bank accounts** (e.g., checking, savings, etc.).
1212-3. **View transactions** related to each account (display a list of transactions for a selected account). It should include ability to:
1818+3. **View transactions** related to each account, display a
1919+ list of transactions for a selected account.
2020+ It should include ability to:
1321 - search
1422 - sort
1523 - paginate between transactions
1616-17244. **View a list of their bank cards** (optional).
18251919-You are free to design the UI as you see fit, but the app should have at least the following screens:
2626+You are free to design the UI as you see fit,
2727+but the app should have at least the following screens:
2828+2029- Login screen
2130- Accounts overview screen
2231- Account details/transactions screen
23322424-**Architecture**
2525-There are no strict requirements for architecture. Please design your application as you see fit, but focus on:
3333+## Architecture
3434+3535+There are no strict requirements for architecture.
3636+Please design your application as you see fit, but focus on:
3737+2638- Clean, modular, and reusable code
2739- Mobile development best practices
2840- State management (your choice: Context, Redux, Redux-Toolkit etc.)
2941- Clear separation of concerns
30423131-**Notes**
3232-- The main technology for this assessment is **React Native**. You may use Expo or bare React Native CLI.
4343+## Notes
4444+4545+- The main technology for this assessment is **React Native**.
4646+- You may use Expo or bare React Native CLI.
3347- Use TypeScript for type safety.
3448- The application should provide a good user experience on both iOS and Android.
3535-- Please include a **README** file that explains your architectural decisions (e.g., why you chose a specific state management solution), instructions on how to run your solution, and details about the NodeJS and NPM/Yarn versions used.
4949+- Please include a **README** file that explains your architectural decisions,
5050+ e.g., why you chose a specific state management solution,
5151+ instructions on how to run your solution, and details about the NodeJS and
5252+ NPM/Yarn versions used.
3653- Please include **unit tests** for at least some key components/hooks/screens.
3754- Ensure the application runs without errors before submitting.
3855- The UI should be simple, intuitive, and visually appealing.
39564040-**Bonus Points**
5757+## Bonus Points
5858+4159- Refresh token before it expires to keep the user logged in
4260- Add pull-to-refresh or loading indicators where appropriate
4361- Add "infinite" scroll for transactions
···4563- e2e tests
4664- Accessibility (voiceover, keyboard navigation, etc.)
4765- Setup CI/CD
4848-- Feel free to add extra features or polish to demonstrate your skills6666+- Feel free to add extra features or polish to demonstrate your skills
+29-10
README.md
···33## Getting Started
4455### Prerequisites
66+67- [Node.js](https://nodejs.org/) (v18 or higher)
78- [Docker](https://www.docker.com/) (optional, for containerized setup)
89910### Installation
101111121. Clone the repository:
1212- ```bash
1313- git clone <repo-url>
1414- cd BankingMockAPI
1515- ```
1313+1414+```bash
1515+git clone <repo-url>
1616+cd BankingMockAPI
1717+```
1818+16192. Install dependencies:
1717- ```bash
1818- npm install
1919- ```
2020+2121+ ```bash
2222+ npm install
2323+ ```
20242125### Running the Server
22262327#### With Node.js
2828+2429```bash
2530node server.js
2631```
3232+2733The server will start on [http://localhost:3001](http://localhost:3001) by default.
28342935#### With Docker
3636+3037```bash
3138docker build -t banking-mock-api .
3239docker run --name banking-mock-api -d -p 3001:3001 banking-mock-api
···3542Same as mentioned aboe the api will be available at on [http://localhost:3001](http://localhost:3001)
36433744Use following commands to stop or start the container:
4545+3846```bash
3947docker container stop banking-mock-api
4048docker container start banking-mock-api
4149```
4242-43504451## API Endpoints
45524653### Authentication
47544855#### `POST /login`
5656+4957Authenticate user and receive JWT and refresh token.
5858+5059- **Body:**
6060+5161 ```json
5262 {
5363 "username": "test@test.test",
···6373 ```
64746575#### `POST /refresh-token`
7676+6677Get a new JWT using a refresh token.
7878+6779- **Body:**
6880 ```json
6981 {
···7890 }
7991 ```
80928181-8293### Accounts
83948495#### `GET /accounts`
9696+8597Get all accounts for the authenticated user.
9898+8699- **Headers:**
87100 - `Authorization: Bearer <JWT>`
88101- **Response:**
···101114### Cards
102115103116#### `GET /cards`
117117+104118Get all cards for the authenticated user.
119119+105120- **Headers:**
106121 - `Authorization: Bearer <JWT>`
107122- **Response:**
···121136### Transactions
122137123138#### `GET /transactions`
139139+124140Get transactions for the authenticated user, with search, sort, and pagination.
141141+125142- **Headers:**
126143 - `Authorization: Bearer <JWT>`
127144- **Query Parameters:**
···147164 ```
148165149166## Default Test User
167167+150168- **Username:** `test@test.test`
151169- **Password:** `password@123`
152170153171## Database
172172+154173- The SQLite database is used.
155155-- The database is reset and seeded with test data every time the server starts.174174+- The database is reset and seeded with test data every time the server starts.