Quick Start #
Node.js #
Recommended API:
git clone https://github.com/nervatura/nervatura-examples.git
cd nervatura-examples/node
npm install
npm start
Open your browser to http://localhost:8080
You do not need a Nervatura backend server to use the 
  CLI and 
  CGO. Automatic server start can be turned off with NT_EXAMPLE_SERVICE_DISABLED=true  (see in the nervatura-examples/node/.env file).
Python #
Recommended API:
- 
Download the Python examples git clone https://github.com/nervatura/nervatura-examples.gitcd nervatura-examples/pythonpip install -r requirements.txtpython main.pyOpen your browser to http://localhost:8000 
- 
Nervatura backend 
- 
Linux sudo snap install nervaturasudo systemctl stop snap.nervatura.nervatura.serviceThe CLI and CGO is ready to use. To use the gRPC and HTTP, start Nervatura service with the .env.example settings ( nervatura-examples/pythondirectory):/snap/nervatura/current/nervatura -tray -env $(pwd)/.env.example
- 
Windows: winget install --id Nervatura.Nervatura --source winget- change the value of the NT_EXAMPLE_SERVICE_PATH(nervatura-examples/python/.env.examplefile): “/snap/nervatura/current/nervatura” -> “C:/Program Files/Nervatura/nervatura.exe”
- change the value of the NT_EXAMPLE_SERVICE_LIB(nervatura-examples/python/.env.examplefile): “/snap/nervatura/current/nervatura.so” -> “C:/ProgramData/Nervatura/nervatura.dll”
 Start the Nervatura backend server ( gRPC and HTTP examples) with the .env.example settings ( nervatura-examples/pythondirectory):& "C:\Program Files\Nervatura\nervatura.exe" -tray -env .env.example
- change the value of the 
- 
Docker (without CGO) Change the value of the NT_EXAMPLE_SERVICE_PATH(nervatura-examples/python/.env.examplefile): “/snap/nervatura/current/nervatura” -> “docker”Start the Nervatura backend server with the .env.example settings ( nervatura-examples/pythondirectory):docker run -i -t --rm --name nervatura --env-file .env.example -p 5000:5000 -p 9200:9200 -v $(pwd)/data:/data nervatura/nervatura:latest
Go #
Recommended API:
- 
Download the Go examples git clone https://github.com/nervatura/nervatura-examples.gitcd nervatura-examples/gogo mod vendorgo run ./main.goOpen your browser to http://localhost:7000 
- 
Nervatura backend ( nervatura-examples/godirectory)
- 
Docker docker run -i -t --rm --name nervatura --env-file .env.example -p 5000:5000 -p 9200:9200 -v $(pwd)/data:/data nervatura/nervatura:latest
- 
Linux and Windows Follow the instructions in the python example 
PHP #
Recommended API:
- 
Download and install the PHP examples (linux) git clone https://github.com/nervatura/nervatura-examples.gitcd nervatura-examples/phpcomposer installcd publicphp -S localhost:8000Open your browser to http://localhost:8000 
- 
gRPC install (linux, optional) sudo pecl install grpcsudo pecl install protobufphp -d extension=grpc.so -d extension=protobuf.so -S localhost:8000More details or Windows installation: Install gRPC for PHP 
- 
Nervatura backend ( nervatura-examples/phpdirectory)
- 
Docker docker run -i -t --rm --name nervatura --env-file .env.example -p 5000:5000 -p 9200:9200 -v $(pwd)/data:/data nervatura/nervatura:latest
- 
Linux and Windows Follow the instructions in the python example 
Flutter and Dart #
Recommended API:
- 
Download the Flutter/Dart examples git clone https://github.com/nervatura/nervatura-examples.gitcd nervatura-examples/flutter
- 
Nervatura backend 
- 
Linux sudo snap install nervaturasudo systemctl stop snap.nervatura.nervatura.serviceThe CLI and CGO is ready to use. To use the gRPC and HTTP, start Nervatura service with the .env.example settings ( nervatura-examples/flutterdirectory):/snap/nervatura/current/nervatura -env $(pwd)/.env.example
- 
Windows: winget install --id Nervatura.Nervatura --source winget- change the value of the NT_EXAMPLE_SERVICE_PATH(nervatura-examples/flutter/.env.examplefile): “/snap/nervatura/current/nervatura” -> “C:/Program Files/Nervatura/nervatura.exe”
- change the value of the NT_EXAMPLE_SERVICE_LIB(nervatura-examples/flutter/.env.examplefile): “/snap/nervatura/current/nervatura.so” -> “C:/ProgramData/Nervatura/nervatura.dll”
 Start the Nervatura backend server ( gRPC and HTTP examples) with the .env.example settings ( nervatura-examples/flutterdirectory):& "C:\Program Files\Nervatura\nervatura.exe" -env .env.example
- change the value of the 
- 
Docker (without CGO) Change the value of the NT_EXAMPLE_SERVICE_PATH(nervatura-examples/flutter/.env.examplefile): “/snap/nervatura/current/nervatura” -> “docker”Start the Nervatura backend server with the .env.example settings ( nervatura-examples/flutterdirectory):docker run -i -t --rm --name nervatura --env-file .env.example -p 5000:5000 -p 9200:9200 -v $(pwd)/data:/data nervatura/nervatura:latest
- 
Dart backend Install the dependencies and start the Dart backend server with the .env.example settings ( nervatura-examples/flutterdirectory):dart pub get -C server
- 
Run without CGO settings: dart run server/lib/server.dart
- 
Run with CGO (linux example): NT_API_KEY=EXAMPLE_API_KEY NT_TOKEN_PUBLIC_KID=PUBLIC_KID NT_TOKEN_PUBLIC_KEY=data/public.key dart run server/lib/server.dart
- Flutter client
- 
Install the all dependencies ( nervatura-examples/flutter/clientdirectory):flutter pub get
- 
Windows or Linux desktop: Run without CGO settings (linux example): flutter run -d linux --dart-define-from-file=env-example.jsonRun with CGO (linux example): NT_API_KEY=EXAMPLE_API_KEY NT_TOKEN_PUBLIC_KID=PUBLIC_KID NT_TOKEN_PUBLIC_KEY="../data/public.key" NT_ALIAS_DEMO="sqlite://file:../data/demo.db?cache=shared&mode=rwc" flutter run -d linux --dart-define-from-file=env-example.json
- 
Web or other platform: flutter run -d chrome --dart-define-from-file=env-example.json
Examples #
Create a demo database #
Basic password login #
Custom token (passwordless) login #
Nervatura Client custom token login #
Using external API for token based authentication #
- HTTP, gRPC
- use of an external identification service provider (Facebook, GitHub, Google, Firebase and others)
Nervatura Client language translation #
- client_config.json file example
Create an invoice #
- HTTP, CLI, CGO , gRPC
- creating or updating a new or existing customer, customer address and contact data
- create a new invoice
- create and download a PDF invoice