-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from HardMax71/mobile_app
start setup for mobile app
- Loading branch information
Showing
7 changed files
with
192 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
# NexusWare Mobile App | ||
|
||
## Overview | ||
|
||
NexusWare Mobile is built using the Toga framework, providing a native mobile experience for warehouse management tasks. | ||
This README provides detailed instructions for setting up, installing, and running the mobile application. | ||
|
||
## Prerequisites | ||
- Python 3.8 or higher | ||
- pip (Python package installer) | ||
- Git | ||
- Xcode (for iOS development on macOS) | ||
- Android Studio and SDK (for Android development) | ||
|
||
## Development Environment Setup | ||
|
||
### macOS Setup for iOS Development | ||
1. Install Xcode from the App Store | ||
2. Install Xcode Command Line Tools: | ||
`xcode-select --install` | ||
3. Accept Xcode license: | ||
`sudo xcodebuild -license accept` | ||
|
||
### Android Setup | ||
1. Install Android Studio | ||
2. Install Android SDK through Android Studio | ||
3. Add the following to your ~/.bash_profile or ~/.zshrc: | ||
```bash | ||
export ANDROID_SDK_ROOT=$HOME/Library/Android/sdk | ||
export PATH=$PATH:$ANDROID_SDK_ROOT/tools/bin | ||
export PATH=$PATH:$ANDROID_SDK_ROOT/platform-tools | ||
``` | ||
|
||
## Project Setup | ||
|
||
1. Clone the repository and navigate to mobile app directory: | ||
```bash | ||
git clone https://github.com/HardMax71/NexusWare.git | ||
cd NexusWare | ||
git checkout -b mobile_app | ||
cd mobile_app | ||
``` | ||
|
||
2. Create and activate virtual environment: | ||
```bash | ||
python3 -m venv venv | ||
source venv/bin/activate # On macOS/Linux | ||
# or | ||
.\venv\Scripts\activate # On Windows | ||
``` | ||
|
||
3. Install required packages: | ||
`pip install toga briefcase` | ||
|
||
4. Project Structure: | ||
|
||
``` | ||
mobile_app/ | ||
├── src/ | ||
│ └── nexusware/ | ||
│ ├── __init__.py | ||
│ ├── __main__.py | ||
│ └── app.py | ||
├── pyproject.toml | ||
└── LICENSE | ||
``` | ||
|
||
## Development | ||
|
||
### Running in Dev Mode | ||
To test the application during development: | ||
`briefcase dev` | ||
|
||
### Creating Platform-Specific Projects | ||
Create scaffolding for different platforms: | ||
# For iOS | ||
`briefcase create ios` | ||
|
||
# For Android | ||
`briefcase create android` | ||
|
||
### Building the Application | ||
Build for specific platforms: | ||
# For iOS | ||
`briefcase build ios` | ||
|
||
# For Android | ||
`briefcase build android` | ||
|
||
### Running on Devices/Simulators | ||
# Run on iOS simulator | ||
`briefcase run ios` | ||
|
||
# Run on Android emulator | ||
`briefcase run android` | ||
|
||
### Debugging | ||
- Logs are stored in the `logs/` directory | ||
- Use briefcase run ios -v or briefcase run android -v for verbose output | ||
- Check iOS console logs in Xcode | ||
- Use Android Studio's logcat for Android debugging | ||
|
||
## Support | ||
- Create issues in GitHub repository | ||
- Check Toga documentation: https://toga.readthedocs.io/ | ||
- Check Briefcase documentation: https://briefcase.readthedocs.io/ | ||
|
||
## License | ||
This project is licensed under the MIT License - see the LICENSE file for details. |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[tool.briefcase] | ||
project_name = "NexusWare Mobile" | ||
bundle = "com.example.nexusware" | ||
version = "0.1.0" | ||
url = "https://example.com/nexusware" | ||
license.file = "LICENSE" | ||
author = "Your Name" | ||
author_email = "[email protected]" | ||
|
||
[tool.briefcase.app.nexusware] | ||
formal_name = "NexusWare Mobile" | ||
description = "NexusWare Mobile Application" | ||
sources = ['src/nexusware'] | ||
requires = [ | ||
'toga>=0.3.0', | ||
] | ||
|
||
[tool.briefcase.app.nexusware.macOS] | ||
requires = [ | ||
'toga-cocoa>=0.3.0', | ||
] | ||
|
||
[tool.briefcase.app.nexusware.ios] | ||
requires = [ | ||
'toga-iOS>=0.3.0', | ||
] |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from nexusware.app import main | ||
|
||
if __name__ == '__main__': | ||
main().main_loop() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import toga | ||
from toga.style import Pack | ||
from toga.style.pack import COLUMN, ROW | ||
|
||
class NexusWareMobile(toga.App): | ||
def __init__(self): | ||
super().__init__() | ||
|
||
def startup(self): | ||
# Create a main window with a title | ||
self.main_window = toga.MainWindow(title="NexusWare Mobile") | ||
|
||
# Create a main box with vertical layout | ||
main_box = toga.Box(style=Pack(direction=COLUMN, padding=10)) | ||
|
||
# Add a header label | ||
header_label = toga.Label( | ||
"NexusWare Mobile", | ||
style=Pack(padding=(0, 0, 20, 0), font_size=20, font_weight='bold') | ||
) | ||
|
||
# Create a button that will show a message | ||
self.button = toga.Button( | ||
'Test Connection', | ||
on_press=self.show_message, | ||
style=Pack(padding=5) | ||
) | ||
|
||
# Create a text input | ||
self.input = toga.TextInput( | ||
placeholder='Scan barcode...', | ||
style=Pack(padding=5) | ||
) | ||
|
||
# Add all widgets to the main box | ||
main_box.add(header_label) | ||
main_box.add(self.input) | ||
main_box.add(self.button) | ||
|
||
# Add the main box to the main window | ||
self.main_window.content = main_box | ||
self.main_window.show() | ||
|
||
def show_message(self, widget): | ||
self.main_window.info_dialog( | ||
'Connection Test', | ||
'Successfully connected to NexusWare!' | ||
) | ||
|
||
def main(): | ||
return NexusWareMobile() |