Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ root = true

# Change these settings to your own preference
indent_style = space
indent_size = 4
indent_size = 2

# We recommend you to keep these unchanged
end_of_line = lf
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v14.21.3
43 changes: 25 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<img height="150px" src="https://res.cloudinary.com/bytefury/image/upload/v1574149856/Crater/craterframe.png">
<img height="150px" src="https://res.cloudinary.com/bytefury/image/upload/v1574149856/Invoice Shelf/invoiceshelfframe.png">

## Introduction

Crater is an open-source web & mobile app that helps you track expenses, payments & create professional invoices & estimates.
Invoice Shelf is an open-source web & mobile app that helps you track expenses, payments & create professional invoices & estimates.

This repository contains the source code for the mobile app clients for [Crater](https://craterapp.com).
This repository contains the source code for the mobile app clients for [Invoice Shelf](https://invoiceshelf.com).

Its built with Expo (React Native).

_Please note:_ To use this app on your mobile device, you need to have the crater app installed on your server. Once the app is installed and configured on your server. You can simply input your endpoint URL and use your app login credentials to log into your account. See [here](#web) to know more about the web version.
_Please note:_ To use this app on your mobile device, you need to have the invoiceshelf app installed on your server. Once the app is installed and configured on your server. You can simply input your endpoint URL and use your app login credentials to log into your account. See [here](#web) to know more about the web version.

# Table of Contents

Expand All @@ -18,40 +18,47 @@ _Please note:_ To use this app on your mobile device, you need to have the crate
4. [Credits](#credits)
5. [License](#license)

## Prerequisite

- Node.js: `14 LTS`
- Java Development Kit (JDK): `8 (1.8.0_422)`

Ensure you have the correct versions installed before starting development.

## Installation

Below are the steps for starting up the crater app locally for development. If you aren't looking to customise or contribute to mobile apps then you can ignore the steps below and use the Crater [IOS & Android Apps](#mobile-app-links) directly.
Below are the steps for starting up the invoiceshelf app locally for development. If you aren't looking to customise or contribute to mobile apps then you can ignore the steps below and use the Invoice Shelf [IOS & Android Apps](#mobile-app-links) directly.

- Clone this repository
- Install Expo CLI : `npm install -g expo-cli`
- Change your current working directly in terminal to the cloned folder: `cd crater`
- run command: `npm start`
- Clone this repository
- Install Expo CLI : `npm install -g expo-cli`
- Change your current working directly in terminal to the cloned folder: `cd invoiceshelf`
- run command: `npm start`

## Web

- [Repository Link](https://github.com/crater-invoice/crater)
- [Download Link](https://craterapp.com/downloads)
- [Repository Link](https://github.com/invoiceshelf-invoice/invoiceshelf)
- [Download Link](https://invoiceshelf.com/downloads)

## Mobile App Links

- [Android](https://play.google.com/store/apps/details?id=com.craterapp.app)
- [IOS](https://apps.apple.com/app/id1489169767)
- [Android](https://play.google.com/store/apps/details?id=com.invoiceshelf.com.app)
- [IOS](https://apps.apple.com/app/id1489169767)

## Copyright

© 2021 Crater Invoice, Inc.

## License

Crater is released under the GNU AFFERO GENERAL PUBLIC LICENSE Version 3.
Invoice Shelf is released under the GNU AFFERO GENERAL PUBLIC LICENSE Version 3.
See [LICENSE](LICENSE) for details.

## Release Channels:

- development
- staging
- production
- production-4
- development
- staging
- production
- production-4

Example: expo build:ios --release-channel staging

Expand Down
115 changes: 60 additions & 55 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,58 +1,63 @@
{
"expo": {
"name": "Crater Invoice",
"slug": "crater",
"privacy": "public",
"platforms": [
"ios",
"android",
"web"
],
"version": "6.0.2",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "cover",
"backgroundColor": "#F9FBFF"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"userInterfaceStyle": "automatic",
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.craterapp.app",
"buildNumber": "24",
"usesIcloudStorage": true,
"infoPlist": {
"NSFaceIDUsageDescription": "This app will optionally use Face ID or Touch ID to save login"
}
},
"android": {
"package": "com.craterapp.app",
"versionCode": 23,
"softwareKeyboardLayoutMode": "pan",
"userInterfaceStyle": "automatic",
"permissions": [
"CAMERA",
"READ_CALENDAR",
"READ_EXTERNAL_STORAGE",
"WRITE_EXTERNAL_STORAGE",
"USE_FINGERPRINT",
"USE_BIOMETRIC",
"VIBRATE",
"com.htc.launcher.permission.READ_SETTINGS"
]
},
"description": "",
"androidStatusBar": {
"backgroundColor": "#F9FBFF",
"barStyle": "dark-content",
"translucent": true
}
"expo": {
"name": "Invoice Shelf",
"slug": "invoiceshelf",
"privacy": "public",
"platforms": [
"ios",
"android",
"web"
],
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "cover",
"backgroundColor": "#F9FBFF"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"userInterfaceStyle": "automatic",
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.invoiceshelf.app",
"buildNumber": "24",
"usesIcloudStorage": true,
"infoPlist": {
"NSFaceIDUsageDescription": "This app will optionally use Face ID or Touch ID to save login"
}
},
"android": {
"package": "com.invoiceshelf.app",
"versionCode": 23,
"softwareKeyboardLayoutMode": "pan",
"userInterfaceStyle": "automatic",
"permissions": [
"CAMERA",
"READ_CALENDAR",
"READ_EXTERNAL_STORAGE",
"WRITE_EXTERNAL_STORAGE",
"USE_FINGERPRINT",
"USE_BIOMETRIC",
"VIBRATE",
"com.htc.launcher.permission.READ_SETTINGS"
]
},
"description": "",
"androidStatusBar": {
"backgroundColor": "#F9FBFF",
"barStyle": "dark-content",
"translucent": true
},
"extra": {
"eas": {
"projectId": "c2f59606-3fd3-4eee-afc8-1a42d7762fa4"
}
}
}
}
Binary file modified 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 modified 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.
40 changes: 40 additions & 0 deletions eas.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"cli": {
"version": ">= 7.3.0"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal",
"node": "14.21.3",
"android": {
"image": "ubuntu-20.04-jdk-8-ndk-r21e",
"env": {
"PLATFORM": "android"
}
}
},
"preview": {
"distribution": "internal",
"node": "14.21.3",
"android": {
"image": "ubuntu-20.04-jdk-8-ndk-r21e",
"env": {
"PLATFORM": "android"
}
}
},
"production": {
"node": "14.21.3",
"android": {
"image": "ubuntu-20.04-jdk-8-ndk-r21e",
"env": {
"PLATFORM": "android"
}
}
}
},
"submit": {
"production": {}
}
}
13 changes: 11 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
{
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"prestart": "node scripts/check-versions.js",
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject",
"prettier-fix": "prettier --config .prettierlc.js --write 'src/**/*.js'",
"lints": "yarn prettier-fix",
"pretty": "prettier --write \"./**/*.{js,jsx,json}\""
"pretty": "prettier --write \"./**/*.{js,jsx,json}\"",
"build:android-eas": "eas build -p android",
"build:android-local": "eas build -p android --local",
"build:android-local-preview": "eas build -p android -e preview --local",
"build:ios-eas": "eas build -p ios",
"build:ios-local": "eas build -p ios --local",
"build:ios-local-preview": "eas build -p ios -e preview --local",
"build:web-local": "npx expo export -p web"
},
"dependencies": {
"@babel/core": "^7.0.0",
"@react-native-async-storage/async-storage": "~1.15.0",
"@react-native-community/datetimepicker": "3.5.2",
"@react-native-community/eslint-config": "0.0.5",
Expand All @@ -22,7 +31,7 @@
"@react-navigation/material-top-tabs": "^5.2.2",
"@react-navigation/native": "^5.0.0-alpha.27",
"@react-navigation/stack": "^5.0.0-alpha.58",
"axios": "^0.21.2",
"axios": "^0.19.2",
"babel-eslint": "^10.0.3",
"eslint-config-standard": "^14.1.0",
"eslint-plugin-flowtype": "^4.3.0",
Expand Down
55 changes: 55 additions & 0 deletions scripts/check-versions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
const {execSync} = require('child_process');

// Define the required versions
const requiredNodeVersion = '14';
const requiredJdkVersion = '1.8';

// Check Node.js version
const nodeVersion = process.version.split('.')[0].replace('v', ''); // Extract the major version number
if (nodeVersion !== requiredNodeVersion) {
console.error(
`Incorrect Node.js version. Required: ${requiredNodeVersion}, Found: ${nodeVersion}`
);
process.exit(1); // Exit the process with an error code
}

// Function to check JDK version using different flags and formats
function getJdkVersion() {
try {
// Try the newer --version flag first
const output = execSync('java --version 2>&1').toString();
console.log(output);
const match = output.match(/openjdk (\d+\.\d+)/);
if (match) {
return match[1];
}
} catch (error) {
// If the --version flag fails, fall back to the older -version flag
try {
const output = execSync('java -version 2>&1').toString();
const match = output.match(/"(\d+\.\d+)/);
if (match) {
return match[1];
}
} catch (error) {
throw new Error('Unable to determine JDK version');
}
}
throw new Error('Unable to determine JDK version');
}

// Check JDK version
try {
const jdkVersion = getJdkVersion();
if (jdkVersion !== requiredJdkVersion) {
console.error(
`Incorrect JDK version. Required: ${requiredJdkVersion}, Found: ${jdkVersion}`
);
process.exit(1); // Exit the process with an error code
}
} catch (error) {
console.error('Error checking JDK version:', error);
process.exit(1); // Exit the process with an error code
}

console.log('Environment versions are correct.');
Binary file removed src/assets/crater-logo-white.png
Binary file not shown.
Binary file removed src/assets/crater-logo.png
Binary file not shown.
Binary file added src/assets/invoiceshelf-logo-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 src/assets/invoiceshelf-logo.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 modified src/assets/logo-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/components/asset-image/asset-image.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, {Component} from 'react';
import {Image} from 'react-native';
import LogoDark from '../../assets/crater-logo.png';
import LogoWhite from '../../assets/crater-logo-white.png';
import LogoDark from '../../assets/invoiceshelf-logo.png';
import LogoWhite from '../../assets/invoiceshelf-logo-white.png';
import GoogleIcon from '../../assets/google.png';
import EmptyInvoices from '../../assets/empty-invoices-icon.png';
import EmptyCustomers from '../../assets/empty-customers-icon.png';
Expand Down
2 changes: 1 addition & 1 deletion src/components/file-picker/file-picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class Picker extends Component<IProps, IStates> {
}

const appName =
Constants?.manifest?.android?.package ?? 'com.craterapp.app';
Constants?.manifest?.android?.package ?? 'com.invoiceshelf.app';

IntentLauncher.startActivityAsync(
IntentLauncher.ACTION_APPLICATION_DETAILS_SETTINGS,
Expand Down
8 changes: 4 additions & 4 deletions src/locales/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -468,12 +468,12 @@
},
"update_app": {
"title": "انتهت صلاحية نسخة التطبيق !",
"description": "هذه النسخة من التطبيق خارج التاريخ. برجاء تركيب أحدث تعديل للاحتفاظ به باستخدام Crater."
"description": "هذه النسخة من التطبيق خارج التاريخ. برجاء تركيب أحدث تعديل للاحتفاظ به باستخدام Invoice Shelf."
},
"endpoint": {
"endpoint_url": "نقطة نهاية عنوان URL",
"endpoint_desc": "سيتم استخدام أعلى عنوان URL للاتصال مع crater الخاص بك الذي يتم استضافته ذاتيا.",
"url_placeholder": "Eg : https://craterapp.com",
"endpoint_desc": "سيتم استخدام أعلى عنوان URL للاتصال مع Invoice Shelf الخاص بك الذي يتم استضافته ذاتيا.",
"url_placeholder": "Eg : https://invoiceshelf.com",
"alert_invalid_url": "عنوان URL غير صحيح"
},
"estimates": {
Expand Down Expand Up @@ -723,7 +723,7 @@
"character": "الحروف فقط",
"numeric": "يجب أن يكون رقمي",
"more_than_due": "{ { تلميح } } لا يجب أن يكون أكثر من مقدار الاستحقاق.",
"url": "عنوان URL غير صحيح (مثال : https://craterapp.com)",
"url": "عنوان URL غير صحيح (مثال : https://invoiceshelf.com)",
"wrong": "حدث شيء خاطئ. من فضلك حاول مرة أخرى",
"min_character": "برجاء ادخال حروف { { minCharacter } } على الأقل",
"cron": "برجاء ادخال نسق cron صحيح."
Expand Down
Loading