Go to file
Hillel Coren 9eb4ad2019 Choose template to use when emailing multiple invoices at once #472 2023-06-11 12:44:18 +03:00
.github/workflows Clean up build 2023-03-27 21:12:54 +03:00
android Android APP: Take Picture to add to expense crashes the app #576 2023-05-28 12:28:43 +03:00
assets Selfhost font #397 2022-07-27 15:05:04 +03:00
fastlane/metadata/android/en-US
ios Set iOS/macOS build numbers 2023-03-27 21:00:01 +03:00
lib Choose template to use when emailing multiple invoices at once #472 2023-06-11 12:44:18 +03:00
linux Feature Request: Drag & drop file to upload #490 2023-05-31 21:50:17 +03:00
macos Feature Request: Drag & drop file to upload #490 2023-05-31 21:50:17 +03:00
samples
snap Update version 2023-06-08 16:18:02 +03:00
stubs Fix for back button 2023-06-06 17:36:22 +03:00
test_driver Flutter upgrader 2021-11-16 16:14:46 +02:00
web Selfhost canvaskit #396 2022-07-27 15:04:54 +03:00
windows Feature Request: Drag & drop file to upload #490 2023-05-31 21:50:17 +03:00
.gitignore Add product image URL and max qty 2023-02-09 10:47:10 +02:00
.metadata Upgrade Flutter 2023-02-26 17:27:06 +02:00
LICENSE.txt Revert license change 2021-07-07 15:48:28 +03:00
README.md readme links broken #500 2022-09-28 21:23:42 +03:00
analysis_options.yaml Apply use_build_context_synchronously lint 2022-07-13 22:26:16 +03:00
codemagic.yaml Codemagic 2023-03-19 22:07:14 +02:00
invoiceninja.iml
invoiceninja_android.iml
pubspec.foss.yaml Update version 2023-06-08 16:18:02 +03:00
pubspec.lock Feature Request: Drag & drop file to upload #490 2023-05-31 21:50:17 +03:00
pubspec.yaml Update version 2023-06-08 16:18:02 +03:00
run_all_it_tests.sh
starter.sh Cancel button for client settings doesn't work 2023-06-04 17:57:34 +03:00

README.md

Invoice Ninja

Client application for Invoice Ninja.

Desktop Apps

Mobile Apps

Dashboard View Invoice List Invoice New Invoice

Table of Contents


Setting up the app

  • Initialize the config file

    cp lib/.env.dart.example lib/.env.dart

  • Support running the code unsigned on Android

    cp android/app/build.gradle.dev android/app/build.gradle

  • Run the app

    flutter run

Note: if you don't have an Invoice Ninja backend setup you can test the app with these credentials:

  • Email: demo@invoiceninja.com
  • Password: Password0
  • URL: demo.invoiceninja.com

Steps to remove non-FOSS code

cp android/build.gradle.foss android/build.gradle
cp lib/utils/oauth.dart.foss lib/utils/oauth.dart
cp lib/utils/app_review.dart.foss lib/utils/app_review.dart
cp lib/ui/app/upgrade_dialog.dart.foss lib/ui/app/upgrade_dialog.dart
cp lib/ui/app/pinput.dart.foss lib/ui/app/pinput.dart
cp android/app/src/main/AndroidManifest.foss.xml android/app/src/main/AndroidManifest.xml
cp pubspec.foss.yaml pubspec.yaml 
rm pubspec.lock

Application Architecture

The application was created using the Flutter Redux Starter.

The architecture is based off these two projects:

File Structure

A High-level overview of the project structure:


lib/                     # Root Package
|
├─ data/                 # For data handling
│  ├─ mock/              # sample used for testing
│  ├─ models/            # Objects representing data
│  ├─ repositories/      # Source of data
|
├─ redux/                # manages app state
│  ├─ component/         # app building block
│     ├─ actions         # methods to update app state
|     ├─ middleware      # run in response to actions, execute before reducer
|     ├─ reducer         # intercepts actions, responsible for updating the state
|     ├─ selectors       # read data from the state, queries against your 'state database'
|     ├─ state           # immutable object that lives at the top of the widget hierarchy
|
├─ ui/                   # app views
│  ├─ component/         # views for different components
│    ├─ view/            # generel view for component
│    ├─ edit/            # change values on the views fields
|
├─ utils/                # Utility classes

The ui and redux folders contain components that are paired together. Put simply you will find an 'auth' folder in both the ui and redux folders.

For additional information on Redux architecture

Blog Posts

Code generation

  • Run flutter packages pub run build_runner build --delete-conflicting-outputs to regenerate the model files. It will also remove the old generated files so conflicts are avoided..

Tests

  • Run flutter drive --target=test_driver/all_it.dart to run the tests

Code Signing

  • Run cp android/app/build.gradle.prod android/app/build.gradle to support running the code signed
  • Run cp android/key.properties.example android/key.properties to create the keys file
  • Run keytool -genkey -v -keystore key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias invoiceninja to generate a key to be able to sign the android application.
  • Update android/key.properties according to the parameters you entered in previous command when you generated the key
  • Open a new Firebase project from your console. Firebase is used for authentication.
    • Inside the project go to Authentication and enable at least one method.
    • After go to add a new Android application. For the package name add com.invoiceninja.flutter
    • Press "Register App" button.
    • Download "google-services.json" and put it in android/app directory.

Credits

https://github.com/invoiceninja/invoiceninja#credits

Contributions

We gladly accept contributions! If you'd like to get involved with development please join our Slack group.