Git Product home page Git Product logo

invoiceninja.github.io's Introduction

Sublime's custom image

v5-develop phpunit Codacy Badge CLA assistant

Invoice Ninja 5

Invoice Ninja Version 5 is here! We've taken the best parts of version 4 and added the most requested features to create an invoicing application like no other. Check the Invoice Ninja YouTube Channel to get up to speed, or try the Demo now.

Choose your setup

  • Hosted: Our hosted version is a Software as a Service (SaaS) solution. You're up and running in under 5 minutes, with no need to worry about hosting or server infrastructure.
  • Self-Hosted: For those who prefer to manage their own hosting and server infrastructure. This version gives you full control and flexibility.

All Pro and Enterprise features from the hosted app are included in the open-source code. We offer a $30 per year white-label license to remove the Invoice Ninja branding from client-facing parts of the app.

Get social with us

Documentation

Installation Options and Clients

Mobile Apps

Desktop Apps

Self-Hosted Server Installation

Note: The self-hosted options do support the desktop and mobile apps.

Recommended Providers

[Advanced] Quick Hosting Setup

In addition to the official Invoice Ninja - Self-Hosted Installation Guide we have a few commands for you.

git clone --single-branch --branch v5-stable https://github.com/invoiceninja/invoiceninja.git
cp .env.example .env
composer i -o --no-dev

Please Note: Your APP_KEY in the .env file is used to encrypt data, if you lose this you will not be able to run the application.

Run if you want to load sample data, remember to configure .env

php artisan migrate:fresh --seed && php artisan db:seed && php artisan ninja:create-test-data

To run the web server

php artisan serve 

Navigate to (replace localhost with the appropriate domain)

http://localhost:8000/setup - To setup your configuration if you did not load sample data.
http://localhost:8000/ - For Administrator Logon

user: [email protected]
pass: password

http://localhost:8000/client/login - For Client Portal

user: [email protected]
pass: password

Developers Guide

In addition to the official Invoice Ninja - Developer Guide we've got your back with some insights.

App Design

The API and client portal have been developed using Laravel if you wish to contribute to this project familiarity with Laravel is essential.

When inspecting functionality of the API, the best place to start would be in the routes/api.php file which describes all of the availabe API endpoints. The controller methods then describe all the entry points into each domain of the application, ie InvoiceController / QuoteController

The average API request follows this path into the application.

  • Middleware processes the request initially inspecting the domain being requested + provides the authentication layer.
  • The request then passes into a Form Request (Type hinted in the controller methods) which is used to provide authorization and also validation of the request. If successful, the request is then passed into the controller method where it is digested, here is an example:
public function store(StoreInvoiceRequest $request)
{

    $invoice = $this->invoice_repo->save($request->all(), InvoiceFactory::create(auth()->user()->company()->id, auth()->user()->id));

    $invoice = $invoice->service()
                        ->fillDefaults()
                        ->triggeredActions($request)
                        ->adjustInventory()
                        ->save();

    event(new InvoiceWasCreated($invoice, $invoice->company, Ninja::eventVars(auth()->user() ? auth()->user()->id : null)));

    return $this->itemResponse($invoice);

}

Here for example we are storing a new invoice, we pass the validated request along with a factory into the invoice repository where it is processed and saved.

The returned invoice then passes through its service class (app/Services/Invoice) where various actions are performed.

A event is then fired which notifies listeners in the application (app/Providers/EventServiceProvider) which perform non blocking sub tasks

Finally the invoice is transformed (app/Transformers/) and returned as a response via Fractal.

Developer environment

Using the Quick Hosting Setup describe above you can quickly get started building out your development environment. Instead of using

composer i -o --no-dev

use

composer i -o

This provides the developer tools including phpunit which allows the test suite to be run.

If you are considering contributing back to the main repository, please add in any tests for new functionality / modifications. This will greatly increase the chances of your PR being accepted

Also, if you plan any additions for the main repository, you may want to discuss this with us first on Slack where we can assist with any technical information and provide advice.

Credits

Security

If you find a security issue with this application, please send an email to [email protected]. Please follow responsible disclosure procedures if you detect an issue. For further information on responsible disclosure please read here.

License

Invoice Ninja is released under the Elastic License.
See LICENSE for details.

invoiceninja.github.io's People

Contributors

adrianaditech avatar axolord avatar beganovich avatar bramdriesen avatar danielkoch avatar dependabot[bot] avatar domainfun avatar drdbanner avatar edent avatar encg avatar fibis avatar gurjindersingh avatar hillelcoren avatar iamarya2k24 avatar iedev1 avatar jameskimmel avatar lizaoreo avatar lukasmu avatar mascali33 avatar mikulabc avatar napsty avatar nerdwood avatar robwent avatar sergehendrickx avatar sndrr avatar tcedi avatar technicallycomputers avatar thomaskujawa avatar turbo124 avatar xeruf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

invoiceninja.github.io's Issues

Self Hosted Installation: Queue configuration results in multiple `artisan queue:work`

The Self Hosted Installation page documents queue configuration with

If you have root access to your system, then simply follow the Laravel [guide](https://laravel.com/docs/8.x/queues#supervisor-configuration) to configure the supervisor service to start and restart your queue.
You will then need to update the QUEUE_CONNECTION variable in the .env file as follows:
```
QUEUE_CONNECTION=database
```

If you have root access to your system, then simply follow the Laravel guide to configure the supervisor service to start and restart your queue.

You will then need to update the QUEUE_CONNECTION variable in the .env file as follows:

QUEUE_CONNECTION=database

However, setting QUEUE_CONNECTION=database will cause queue:work to be run from cron and queue:restart every 5 minutes: https://github.com/invoiceninja/invoiceninja/blob/019e3c0068dba809a39c0b11f83fcbc82c86e231/app/Console/Kernel.php#L92-L97 This results in artisan queue:work being invoked from supervisor (as per the guide) and cron simultaneously, and both processes to exit every 5 minutes, which is seems unnecessary. Is this really the desired result? Should administrators set INTERNAL_QUEUE_ENABLED=false once supervisor is configured to avoid this?

Thanks,
Kevin

Documentation page for dates

As of writing this, in the admin portal, we redirect people to official PHP docs when it comes to date formats. This must be improved by a dedicated page in docs.

Settings > Generated numbers > View date

image

What needs to be done:

  • Introduction on date formats in general
  • Common date formats

At the end of the article, we can include a link to the PHP docs themselves.

Technical details:

This definitely goes under "User guide" in docs. This is probably the right place to do it: https://invoiceninja.github.io/docs/advanced-settings/#generated_numbers

Preventing breaking div upon new page

Suggested by Hillel, we should add page-break-inside: avoid; to the customization page for PDFs, since few people use this to display long text & ensure it all lands on a single page.

mobile view body wider than viewport

Makes pages more or less unusable on mobile.

Kaputt

kaputt_720p_15F.mp4

Fixed

fixed_720p_15F.mp4
## Containers correction

<div class="max-w-screen-xl grid grid-cols-12 py-2 px-2">
    <div class="hidden md:block lg:col-span-2 space-y-6">
        <div class="hidden lg:block fixed mt-2 h-full overflow-y-auto pb-32 pl-4">
            <!-- Sidebar content -->
        </div>
    </div> <!-- End of sidebar -->

    <div id="page-content" class="col-span-12 md:col-span-8 lg:col-span-6 prose mx-auto">
        <div class="block lg:hidden flex flex-col mb-4 lg:mb-0">
            <button onclick="document.getElementById('mobile-menu-overlay').classList.remove('hidden');">← Documentation</button>
        </div>
        <!-- Main content -->
    </div> <!-- End of main content -->

    <div class="hidden md:block md:col-span-2 lg:col-span-4 p-4">
        <!-- Additional block content -->
    </div>
</div>


### Crucial CSS
.prose {
  width: 100%;
  max-width: 100vw; /* Ensure it doesn't exceed viewport width */
  margin: 0 auto;
  padding: 0 1rem;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .prose {
    padding: 0;
  }
}

Deprecate old docs

In what seems to be the old documentation I can select "v5" under versions: http://docs.invoiceninja.com/en/v5.0/

But the page title still says that I am viewing version 4.5.
So I would suggest to correct and add a big banner pointing to this new documentation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.