Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/laravieira/jf-bus
https://github.com/laravieira/jf-bus
Last synced: 3 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/laravieira/jf-bus
- Owner: laravieira
- Created: 2023-03-21T20:16:09.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-29T03:02:22.000Z (about 1 year ago)
- Last Synced: 2024-04-24T03:24:22.192Z (7 months ago)
- Language: TypeScript
- Size: 6.03 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# JF Bus App
The Juiz de Fora first app to let you recharge your Bilhete Único card on your phone.See the bus schedules of Juiz de Fora.
## Install requirements
* Install NodeJS, last tested on v21, instructions [here](https://github.com/nodesource/distributions#ubuntu-versions).## How to run the app
#### Install packages
```shell
npm run install:app
```#### How to run dev server locally
```shell
npm run android:server:dev
```
###### The dev server is necessary to run the `.dev.apk`.#### How to test
```shell
npm run test:app
```#### How to build `.dev.apk` online
###### Needs to prepare online environment first, check [here](#how-to-prepare-environment-for-online-build)
```shell
npm run android:build:dev:online
```#### How to build `.preview.apk` online
###### Needs to prepare online environment first, check [here](#how-to-prepare-environment-for-online-build)
```shell
npm run android:build:preview:online
```#### How to build `.dev.apk` locally
###### Needs to prepare build environment first, check [here](#how-to-prepare-environment-for-local-build)
```shell
npm run android:build:dev
```#### How to build `.preview.apk` locally
###### Needs to prepare build environment first, check [here](#how-to-prepare-environment-for-local-build)
```shell
npm run android:build:preview
```### How to prepare environment for local build
* Has to be in a Linux environment to build Android apk
* This is designed for Ubuntu on WSL2Download Java and Android SDK:
```shell
sudo apt install openjdk-17-jdk android-sdk -y
sudo mv /usr/lib/android-sdk /home/[user]
```
Download sdkmanager and accept licenses:
```shell
wget [download_link_command_line_tools_only](https://developer.android.com/studio)
unzip commandlinetools-linux-xxxxxx_latest.zip
mv cmdline-tools /home/[user]/android-sdk/cmdline-tools
sudo chown -R [user] /home/[user]/android-sdk
sudo chmod -R 774 /home/[user]/android-sdk
cd /home/[user]/android-sdk
./cmdline-tools/bin/sdkmanager --licenses --sdk_root=/home/[user]/android-sdk
nano /home/[user]/.bashrc # add "export ANDROID_HOME=/home/[user]/android-sdk" to the end of the file
```
Login and configure an expo account:
```shell
npm run eas:login
npm run eas:configure
```### How to prepare environment for online build
Login and configure an expo account:
```shell
npm run eas:login
npm run eas:configure
```## Scheduler Extractor
This is a script to extract the bus schedules from the [PJF website](https://www.pjf.mg.gov.br/onibus/itinerario/index.php) and save it to JSON files.
### The extracted data
* The last extracted data is at [scheduler/data](scheduler/data).
* The data models are at [scheduler/src/models](scheduler/src/models).#### How to install
```shell
npm run install:scheduler
```
#### How to run
```shell
npm run scheduler:start
```
#### How to test
```shell
npm run test:scheduler
```## SSHD for Windows
###### Useful for transferring files from Windows to your phone
(instalation here)[https://winscp.net/eng/docs/guide_windows_openssh_server#win10]
* Start the service:
```shell
Start-Service -Name sshd
```
* Stop the service:
```shell
Stop-Service -Name sshd
```
* Status of the service:
```shell
Get-Service -Name sshd
```
Config file is at `C:\ProgramData\ssh\sshd_config`
Login is the microsoft email/password