Skip to content
Merged
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
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ docker build -t invoiceshelf/docs .

## Deployment

Documentation is automatically built and published to GitHub Container Registry on every push to master.
Every push builds and publishes a commit-SHA image. Pushes to `master` also publish the
`latest` image.

Images are available at:
- `ghcr.io/invoiceshelf/docs:latest` - Latest master branch
- `ghcr.io/invoiceshelf/docs:<commit-sha>` - Specific commit builds
- `ghcr.io/invoiceshelf/docs:latest` - Latest `master` build
- `ghcr.io/invoiceshelf/docs:<commit-sha>` - A specific commit build
11 changes: 7 additions & 4 deletions docs/developer-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ lang: en-US
# Developer Guide

This guide will help you set up your development environment and get started with InvoiceShelf.
There are three primary ways to install and set up InvoiceShelf for development: Docker, NGINX/PHP-FPM, and Laravel Herd.
There are three primary ways to set up InvoiceShelf for development: Docker,
NGINX/PHP-FPM, and Laravel Herd. The application currently uses Laravel 13, PHP 8.4,
Node.js 24, and pnpm.


## Docker Environment

If you want to use the pre-configured Docker dev environment
Use the application's `./devenv` wrapper to choose and start the pre-configured Docker
development environment.

[[Read more]](./developer/docker.md)

Expand All @@ -24,7 +27,7 @@ If you want to use Laravel Herd on your Windows/Mac machine

## Manual Nginx/php-fpm

If you want to install InvoiceShelf on plain Linux Debian/Ubuntu
Use this when you want to run the application directly on a Linux host.

[[Read more]](./developer/manual.md)

Expand All @@ -36,4 +39,4 @@ Hopefully one of those guides will help you get started with InvoiceShelf develo

If you have any questions or run into issues, feel free to open an issue on [GitHub](https://github.com/InvoiceShelf/InvoiceShelf/issues).

Happy coding! 🧑‍💻
Happy coding! 🧑‍💻
81 changes: 43 additions & 38 deletions docs/developer/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,57 +5,60 @@ lang: en-US

# Setting Up with Docker

Using Docker is one of the easiest ways to set up InvoiceShelf for development. The necessary Docker configuration files are located in the `.dev` folder of the repository.
Using Docker is one of the easiest ways to set up InvoiceShelf for development. The
repository provides a `./devenv` wrapper that selects the supported Compose configuration,
adds the local hostname when needed, and starts the stack. The Compose files live in
`docker/development/`; `.dev` is no longer used.

## Step 1 : Clone the Repository

If you forked the project, you can use the fork url instead.

```bash
git clone https://github.com/InvoiceShelf/InvoiceShelf.git
git clone --branch 3.x https://github.com/InvoiceShelf/InvoiceShelf.git
cd InvoiceShelf
cp .env.example .env
```

If you are using Linux/macOS, you need to setup the correct permissions:
```bash
chmod 775 storage/framework storage/logs bootstrap/cache
```

## Step 2 : Set up DNS host

The dockerized development environment uses `invoiceshelf.test` local domain.

This domain needs to be set up on your machine to access the default configuration.

### a.) Linux/MacOS

If you are using Linux or macOS, edit `/etc/hosts` as root/sudo.

### b.) Windows
## Step 2 : Start the development environment

If you are using Windows, run Notepad as administrator and File > Open the `hosts` file in `C:Windows\System32\drivers\etc`
Run the wrapper with no arguments. It verifies Docker, adds `invoiceshelf.test` to the
hosts file when necessary (requesting sudo on Linux/macOS), then asks you to choose MySQL,
PostgreSQL, or SQLite and whether to enable Gotenberg.

### Finalize
```bash
./devenv
```

Add the following line at the end of the hosts file to make the invoiceshelf.test available:
Your selected Compose file is saved in `.devenvconfig`. Later sessions can use:

```
127.0.0.1 invoiceshelf.test
```bash
./devenv start
./devenv stop
./devenv logs
./devenv shell
./devenv run php artisan migrate
./devenv test
./devenv format
```

## Step 3 : Spin up Docker
## Step 3 : Install application dependencies

To spin up the Docker environment, run:
Install PHP dependencies and generate an application key inside the running PHP container:

```bash
docker compose -f docker/development/docker-compose.mysql.yml up --build
./devenv run composer install
./devenv run php artisan key:generate
```

Once the environment is up and running you have the following containers:
The frontend runs on the host. Install Node.js 24, enable Corepack, install the locked
dependencies, and keep the Vite development server running while you work:

- invoiceshelf-dev-php
- invoiceshelf-dev-mysql (or pgsql for sqlite)
- invoiceshelf-dev-nginx
```bash
corepack enable
pnpm install --frozen-lockfile
pnpm dev
```

## Step 4 : Access the Application

Expand All @@ -64,34 +67,36 @@ Once the containers are up and running, you can access the InvoiceShelf applicat

## Useful details

### a.) Working with composer/npm/phpunit
### a.) Working with Composer, pnpm, and tests

To access `composser`, `npm`, `vendor/bin/pint`, `vendor/bin/pest`, you need to SSH into the `invoiceshelf-dev-php` container as follows:
Use `./devenv run` to run a command in the PHP container, or use `./devenv shell` for an
interactive shell:

```bash
docker exec -it --user invoiceshelf invoiceshelf-dev-php /bin/bash
./devenv run php artisan migrate
./devenv test
./devenv format
```

### b.) Previewing the database

To see the database we use a tool called Adminer.

You can open it at http://invoiceshelf.test:8080

You can log in with the database details as [explained here](https://github.com/InvoiceShelf/InvoiceShelf/blob/develop/.dev/README.md#2-databases).
You can open it at `http://localhost:8080`.


### c.) Previewing Mail

To see the mail we use a tool called Mailpit.

You can open it at http://invoiceshelf.test:8025
You can open it at `http://localhost:8025`.

---

&nbsp;

For more details, refer to the [Docker setup README](https://github.com/InvoiceShelf/InvoiceShelf/blob/develop/.dev/README.md).
For implementation details, refer to
[docker/development](https://github.com/InvoiceShelf/InvoiceShelf/tree/3.x/docker/development).

&nbsp;

Expand Down
31 changes: 18 additions & 13 deletions docs/developer/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ lang: en-US

# Setting Up with NGINX/PHP-FPM

Setting up InvoiceShelf with NGINX and PHP-FPM is ideal for Linux systems. Follow the Laravel deployment guide for NGINX to set up your environment.
Setting up InvoiceShelf with NGINX and PHP-FPM is ideal for Linux systems. Follow the
[Laravel 13 NGINX deployment guide](https://laravel.com/docs/13.x/deployment#nginx) for the
web-server configuration.

## Step 1 : Install Dependencies

Expand All @@ -23,21 +25,22 @@ sudo apt install nginx
# Install required tools
sudo apt install git curl zip unzip sqlite3

# Install PHP/PHP-FPM
sudo apt install php8.3-fpm php8.3-gd php8.3-exif php8.3-mbstring php8.3-zip php8.3-curl php8.3-bcmath
# Install PHP 8.4/PHP-FPM and the extensions InvoiceShelf uses
sudo apt install php8.4-fpm php8.4-gd php8.4-exif php8.4-mbstring php8.4-zip php8.4-curl php8.4-bcmath php8.4-xml php8.4-intl

# Install NPM
# Install Node.js 24 and enable pnpm through Corepack
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
nvm install 20
nvm use 20
nvm install 24
nvm use 24
corepack enable
```

## Step 2 : Clone the Repository

If you forked the project, you can use the fork url instead.

```bash
git clone https://github.com/InvoiceShelf/InvoiceShelf.git
git clone --branch 3.x https://github.com/InvoiceShelf/InvoiceShelf.git
cd InvoiceShelf
```

Expand All @@ -58,11 +61,11 @@ cp .env.example .env

```bash
composer install
npm install
# If you want one-time build run:
npm run prod
pnpm install
# For a one-time production build:
pnpm build
# If you want dev builds run:
npm run dev
pnpm dev
```

## Step 5 : Generate Application Key
Expand All @@ -79,7 +82,9 @@ php artisan migrate

## Step 7 : Configure NGINX

Follow the Laravel guide to create NGINX server block configuration at [Laravel NGINX Deployment Guide](https://laravel.com/docs/11.x/deployment#nginx)
Follow the [Laravel 13 NGINX deployment guide](https://laravel.com/docs/13.x/deployment#nginx)
to create the NGINX server block configuration. Point the document root at the project's
`public` directory.

Finally, you need to restart NGINX.

Expand All @@ -93,4 +98,4 @@ Once the server is running, you can access the InvoiceShelf application in your

This guide should help you get started with InvoiceShelf development. If you have any questions or run into issues, feel free to open an issue on [GitHub](https://github.com/InvoiceShelf/InvoiceShelf/issues).

Happy coding! 🧑‍💻
Happy coding! 🧑‍💻
13 changes: 9 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
# Introduction

InvoiceShelf is an open-source web & mobile app that helps you track expenses, payments & create professional invoices & estimates.
InvoiceShelf is an open-source, self-hosted web application for creating professional
invoices and estimates, tracking payments, and managing expenses. The supported product is
the web application, built with Laravel and Vue.

Web Application is made using Laravel & VueJS while the Mobile Apps are built using React Native.
::: warning Alpha preview
These docs describe InvoiceShelf 3.x, which is still in alpha. Use the supported
2.x release for production data.
:::

## Features:
## Features

- [Dashboard](./guide/dashboard.md)
- [Customers](./guide/customers.md)
- [Items](./guide/items.md)
- [Estimates](./guide/estimates.md)
- [Invoices](./guide/invoices.md)
- [Recurring-Invoices](./guide/recurring-invoices.md)
- [Recurring invoices](./guide/recurring-invoices.md)
- [Payments](./guide/payments.md)
- [Expenses](./guide/expenses.md)
- [Taxes](./guide/taxes.md)
Expand Down
Loading
Loading