Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
SteRiccio committed Jan 29, 2025
0 parents commit b91fc60
Show file tree
Hide file tree
Showing 555 changed files with 43,578 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"presets": ["babel-preset-expo"],
"plugins": [
[
"module-resolver",
{
"root": ["./src"]
}
],
"transform-remove-strict-mode"
],
"env": {
"production": {
"plugins": ["react-native-paper/babel"]
}
}
}
77 changes: 77 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ "main" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
schedule:
- cron: '15 0 * * 0'

jobs:
analyze:
name: Analyze
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ]
# Use only 'java' to analyze code written in Java, Kotlin or both
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
20 changes: 20 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependency Review Action
#
# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging.
#
# Source repository: https://github.com/actions/dependency-review-action
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
name: 'Dependency Review'
on: [pull_request]

permissions:
contents: read

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v3
- name: 'Dependency Review'
uses: actions/dependency-review-action@v2
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
node_modules/
.expo/
dist/
npm-debug.*
.env
*.jks
*.p8
*.p12
*.key
*.mobileprovision
*.orig.*
web-build/
yarn-error.log

# macOS
.DS_Store
4 changes: 4 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
scripts-prepend-node-path=true
//npm.pkg.github.com/:_authToken=${NPM_TOKEN}
@openforis:registry=https://npm.pkg.github.com
always-auth=true
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"eslint.run": "onSave",
"eslint.format.enable": true,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
}
}
Binary file added .yarn/install-state.gz
Binary file not shown.
934 changes: 934 additions & 0 deletions .yarn/releases/yarn-4.6.0.cjs

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
nodeLinker: node-modules

npmScopes:
openforis:
npmAlwaysAuth: true
npmAuthToken: "${NPM_TOKEN}"
npmRegistryServer: "https://npm.pkg.github.com"

yarnPath: .yarn/releases/yarn-4.6.0.cjs
76 changes: 76 additions & 0 deletions App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
import React from "react";
import { KeyboardAvoidingView } from "react-native";
import { Provider } from "react-redux";
import { configureStore } from "@reduxjs/toolkit";
import { Provider as PaperProvider, ThemeProvider } from "react-native-paper";
import { StatusBar } from "expo-status-bar";
import ErrorBoundary from "react-native-error-boundary";

import { AppConfirmDialog } from "appComponents/AppConfirmDialog";
import { AppMessageDialog } from "appComponents/AppMessageDialog";
import { JobMonitorDialog } from "appComponents/JobMonitorDialog";
import { AppToast } from "appComponents/AppToast";
import { ErrorFallbackComponent } from "appComponents/ErrorFallbackComponent";

import { AppStack } from "navigation/AppStack";
import { rootReducer } from "state/reducers";
import { useEffectiveTheme } from "hooks";
import { BaseStyles, Environment } from "utils";

import { AppInitializer } from "./src/AppInitializer";

const store = configureStore({ reducer: rootReducer });

const AppInnerContainer = () => {
if (__DEV__) {
console.log(`rendering AppInnerContainer`);
}
const theme = useEffectiveTheme();

const onError = (error, stackTrace) => {
console.log(stackTrace, error);
};

const internalContainer = (
<AppInitializer>
<AppStack />
</AppInitializer>
);

return (
<PaperProvider theme={theme}>
<ThemeProvider theme={theme}>
<ErrorBoundary
onError={onError}
FallbackComponent={ErrorFallbackComponent}
>
<StatusBar style={theme.dark ? "light" : "dark"} />
{Environment.isIOS ? (
<KeyboardAvoidingView behavior="height" style={BaseStyles.flexOne}>
{internalContainer}
</KeyboardAvoidingView>
) : (
internalContainer
)}
</ErrorBoundary>
<AppMessageDialog />
<AppConfirmDialog />
<JobMonitorDialog />
<AppToast />
</ThemeProvider>
</PaperProvider>
);
};

const App = () => {
if (__DEV__) {
console.log(`rendering App`);
}
return (
<Provider store={store}>
<AppInnerContainer />
</Provider>
);
};

export default App;
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

# Change Log
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.0.0] - TO BE RELEASED
### First release
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 Open Foris Initiative

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
26 changes: 26 additions & 0 deletions PRIVACY-POLICY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Privacy Policy
----------------

### Introduction
This privacy policy governs your use of the software application Arena Mobile (“Application”) for mobile devices that was created by Open Foris Initiative.

### What information does the Application obtain and how is it used?
The Application obtains the information you provide when you use it (location, pictures, audio) and the collection of this information is always triggered by the user. Registration is not needed and we do not retain any information about how you use the Application.

### Does the Application collect precise real time location information of the device?
This Application collects precise information about the location of your mobile device only when the user triggers the collection of this information (e.g. in coordinate input fields, pressing the “Start” button).

### Do third parties see and/or have access to information obtained by the Application?
The Application does not transmit any data to external services.

### What are my opt-out rights?
You can stop all collection of information by the Application easily by uninstalling the Application. You may use the standard uninstall processes as may be available as part of your mobile device or via the mobile application marketplace or network.

### Data Retention Policy, Managing Your Information
We will retain User Provided data for as long as you use the Application and for a reasonable time thereafter.

### Changes
This Privacy Policy may be updated from time to time for any reason. We will notify you of any changes to our Privacy Policy by posting the new Privacy Policy here. You are advised to consult this Privacy Policy regularly for any changes, as continued use is deemed approval of all changes.

### Your Consent
By using the Application, you are consenting to our processing of your information as set forth in this Privacy Policy now and as amended by us.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Open Foris Arena Mobile

Arena Mobile is a user-friendly, free, and open-source application designed to streamline offline data collection on Android and iOS devices.
Serving as a companion to "Open Foris Arena", it offers seamless data handling with an intuitive interface, capable of capturing diverse data types such as numbers, coordinates, images, videos, and text.
Arena Mobile enables efficient collection of field data in various sectors, including forest inventories and interviews, by implementing customisable validation rules to ensure high-quality data.
Supported by a robust community, it integrates with the Arena platform for analytics and reporting, making it an ideal choice for various data assessment needs.
79 changes: 79 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"expo": {
"name": "Arena Mobile",
"slug": "arena-mobile",
"owner": "openforis",
"version": "2.0.0",
"icon": "./assets/icon.png",
"userInterfaceStyle": "automatic",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": ["**/*"],
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive_icon.png",
"backgroundColor": "#FFFFFF"
},
"package": "org.openforis.arena_mobile",
"versionCode": 1
},
"ios": {
"buildNumber": "1",
"bundleIdentifier": "org.openforis.arena-mobile",
"config": {
"usesNonExemptEncryption": false
},
"infoPlist": {
"LSMinimumSystemVersion": "13.0",
"NSCameraUsageDescription": "Camera is used only when collecting images in file attributes (if defined in your survey).",
"NSLocationWhenInUseUsageDescription": "Location is used only when collecting coordinates in coordinate attributes (if defined in your survey).",
"NSMicrophoneUsageDescription": "Microphone is used only when recording audio or video in file attributes (if defined in your survey).",
"NSMotionUsageDescription": "Devices's acceleraometer is used only when using the 'navigator' in coordinate attributes (if defined in your survey).",
"NSPhotoLibraryUsageDescription": "Access to the photo library is required only when selecting images to be used in file attributes (if defined in your survey)."
},
"supportsTablet": true
},
"web": {
"favicon": "./assets/favicon.png"
},
"extra": {
"eas": {
"projectId": "adc829ff-2bf8-4733-9e03-051d16d0f9ca"
}
},
"plugins": [
[
"expo-asset",
{
"assets": ["assets"]
}
],
[
"expo-build-properties",
{
"ios": {
"deploymentTarget": "15.5"
}
}
],
[
"./plugins/modifyAndroidManifestAttributes",
{
"application": {
"android:hardwareAccelerated": "true",
"android:largeHeap": "true"
}
}
],
"expo-asset",
"expo-localization",
"expo-secure-store"
]
}
}
Binary file added assets/adaptive_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/adaptive_icon_transparent.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/arrow_up_green.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/arrow_up_orange.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/arrow_up_red.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/circle_green.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/compass_bg_black.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/compass_bg_white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/compass_pointer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icon_512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icon_512x512_transparent.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icon_transparent.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit b91fc60

Please sign in to comment.