Local invoices application using git as sync service.
Find a file
2025-12-21 12:53:57 +00:00
components Add basic FS crud for data 2025-06-30 19:46:56 +02:00
composables Little fixes 2025-12-21 12:53:57 +00:00
layouts Check and fix with Biome 2025-07-11 19:53:09 +02:00
lib Little fixes 2025-12-21 12:53:57 +00:00
middleware Check and fix with Biome 2025-07-11 19:53:09 +02:00
pages Little fixes 2025-12-21 12:53:57 +00:00
plugins Check and fix with Biome 2025-07-11 19:53:09 +02:00
public Check and fix with Biome 2025-07-11 19:53:09 +02:00
server Initial commit 2025-04-28 21:11:33 +02:00
types Add basic FS crud for data 2025-06-30 19:46:56 +02:00
utils Initial commit 2025-04-28 21:11:33 +02:00
.gitignore Initial commit 2025-04-28 21:11:33 +02:00
app.vue Rename components to use variant and type 2025-05-01 19:34:43 +02:00
biome.json Check and fix with Biome 2025-07-11 19:53:09 +02:00
nuxt.config.ts Initial commit 2025-04-28 21:11:33 +02:00
package.json Check and fix with Biome 2025-07-11 19:53:09 +02:00
pnpm-lock.yaml Check and fix with Biome 2025-07-11 19:53:09 +02:00
README.md Update schema design 2025-05-08 20:01:52 +02:00
tsconfig.json Initial commit 2025-04-28 21:11:33 +02:00

local.invoices

Local first invoice application. Built on Nuxt. Below are the generic details for starting the project from the Nuxt starter. Edited slightly for some brevity.

Development Notes

Data

The idea is to have the data locally stored using Dexie.js and then "synchronised" using isomorphic.git or a local first sync library like zero, jazz or rxdb (in order of preference).

Structure

Working bit by bit, first developing the relationship between client and invoice.

---
title: Client -> Invoice Structure
---

erDiagram
    CLIENT {
        uuid id PK
        string name
        string email
        string phone
        string website
        string prefix
        uuid company_id
        uuid billing_address_id
        uuid shipping_address_id
        uuid currency_id
    }
    COMPANY {
        uuid id PK
        string name
        string registration
    }
    ADDRESS {
        uuid id PK
        string name
        array street
        string city
        string state
        string country
        string post_code
    }
    CURRENCY {
        int id PK
        string name
        string symbol
        string code
    }
    BANK {
        uuid id PK
        string bank_name
        string bank_number
        string bank_swift
    }
    INVOICE {
        uuid id PK
        uuid client_id FK
        string number
        date date
        date due_date
        string notes
        float total
        float paid
        uuid status_id
        float discount
    }
    INVOICE_ITEM {
        uuid id PK
        uuid invoice_id FK
        string name
        float quantity
        string unit
        float price
    }
    TAX {
        int id PK
        string name
        float rate
        string description
    }
    INVOICE_STATUS {
        uuid id PK
        string label
    }
    INVOICE_TAX_ITEM {
        int id PK
        int tax_id FK
        float value
    }
    INVOICE_PAYMENT {
        uuid id PK
        date date
        uuid invoice_id FK
        uuid client_id FK
        float amount
    }


    INVOICE ||--|{ INVOICE_ITEM : contains
    INVOICE ||--o{ INVOICE_TAX_ITEM : has
    INVOICE ||--|| CURRENCY : has
    INVOICE ||--|| INVOICE_STATUS : has
    INVOICE ||--o{ INVOICE_PAYMENT : has
    INVOICE ||--o{ INVOICE_PAYMENT : has

    INVOICE_TAX_ITEM }o--|| TAX : is

    CLIENT ||--|{ ADDRESS : has
    CLIENT ||--o{ INVOICE : has
    CLIENT ||--|| COMPANY : represents
    CLIENT ||--|| CURRENCY : has
    CLIENT ||--|| BANK : has
    CLIENT ||--o{ INVOICE_PAYMENT : has

Setup

Make sure to install dependencies:

# npm
npm install

# pnpm
pnpm install

Development Server

Start the development server on http://localhost:3000:

# npm
npm run dev

# pnpm
pnpm dev

Production

Build the application for production:

# npm
npm run build

# pnpm
pnpm build

Locally preview production build:

# npm
npm run preview

# pnpm
pnpm preview

Check out the deployment documentation for more information.