Files
Mav-Mobile-UI/README.md

88 lines
1.4 KiB
Markdown
Raw Normal View History

2025-11-11 13:49:46 +00:00
# Mav Mobile Ui
This is a React-based web application built with Vite (react and typescript).
## Getting started
### Prerequisites
2025-11-11 13:52:58 +00:00
2025-11-11 13:49:46 +00:00
- Node.js (v18 or higher recommended)
- Yarn (v1.22+) (https://yarnpkg.com/)
### Installation
2025-11-11 13:52:58 +00:00
2025-11-11 13:49:46 +00:00
```bash
git clone https://mavportal.com/TobaOjo/Mav-Mobile-UI.git
cd Mav-Mobile-UI
yarn install
2025-08-13 14:23:48 +01:00
```
2025-11-11 13:52:58 +00:00
2025-11-11 13:49:46 +00:00
### Running Locally
2025-11-11 13:52:58 +00:00
2025-11-11 13:49:46 +00:00
```bash
yarn dev
```
2025-11-11 13:52:58 +00:00
The app will be available at `http://localhost:5173`.
2025-08-13 14:23:48 +01:00
2025-11-11 13:49:46 +00:00
To run on locally on other devices
2025-11-11 13:52:58 +00:00
2025-11-11 13:49:46 +00:00
```bash
yarn dev --host
2025-08-13 14:23:48 +01:00
```
2025-11-11 13:52:58 +00:00
The app will be available at the exposed addresses to access e.g. http://1xx.xxx.x.xxx:<PORT>/Mobile
2025-11-11 13:49:46 +00:00
## Tech Stack
2025-11-11 13:52:58 +00:00
2025-11-11 13:49:46 +00:00
- **React** UI library
- **Vite** Build tool
- **Yarn** Package manager
## Configuration
2025-11-11 13:52:58 +00:00
2025-11-11 13:49:46 +00:00
Create a `.env` file to access the Mav Mobile box in unit 5 for or for any environment-specific settings:
2025-11-11 13:52:58 +00:00
2025-11-11 13:49:46 +00:00
```env
2025-11-11 13:52:58 +00:00
VITE_AGX_BOX_URL=http://1xx.xxx.xxx.xxx:<PORT>
2025-11-11 13:49:46 +00:00
```
2025-11-11 13:52:58 +00:00
## Development
2025-11-11 13:49:46 +00:00
### Linting & Formatting
2025-11-11 13:52:58 +00:00
2025-11-11 13:49:46 +00:00
```bash
yarn lint
yarn format
```
### Testing
2025-11-11 13:52:58 +00:00
2025-11-11 13:49:46 +00:00
(Currently not implemented consider adding Jest or Vitest)
2025-11-11 13:52:58 +00:00
## Deployment
2025-11-11 13:49:46 +00:00
To build for production:
2025-11-11 13:52:58 +00:00
2025-11-11 13:49:46 +00:00
```bash
yarn build
```
Navigate to your Mav-Mobile-UI folder
2025-11-11 13:52:58 +00:00
Select the Dist folder
2025-11-11 13:49:46 +00:00
Compress to (ZIP)
2025-11-11 13:52:58 +00:00
Log into box on Moba using Session > SSH and putting IP in Remote Host.
2025-11-11 13:49:46 +00:00
Creds are mav:mav
Drag and drop dist.zip into file explorer menu on left hand side (has to be named dist.zip exactly).
2025-11-11 13:52:58 +00:00
Run command
2025-11-11 13:49:46 +00:00
```bash
sudo ./integrate-web-ui.sh
```
2025-11-11 13:52:58 +00:00
Run
2025-11-11 13:49:46 +00:00
```bash
sudo nano web-static/index.html
2025-11-11 13:52:58 +00:00
```