Skip to content

emissor-nfse-nacional

Self-hosted NFS-e issuer for Brazilian Simples Nacional companies, on Cloudflare

Permissive (OSI) · MIT

Listed by , founder & editor

53

Health

Slowing

Overview

Stars

273

Last commit

6 days ago

Nov 2026

Repository age

1 months

since Nov 2026

Latest version

–

Contributors

–

2 active in 90 days

Releases

0

last 12 months

Language

TypeScript

This is an issuer of NFS-e, the Brazilian service invoice, that talks directly to the national NFS-e system API. There are no middlemen and no per-invoice fee. It runs on your Cloudflare account: your system sends the sale data and receives the authorized invoice, with the XML, the PDF and links you can send to the customer.

It issues, cancels and replaces invoices. Each sale uses an id you choose, so repeating a request returns the same invoice instead of a duplicate. If the government response is lost, it checks whether the invoice was issued before resending. It produces the DANFSe PDF, using the government one when available or building one from the authorized XML with a QR code. Tests validate documents against the official XSDs and check signatures with xmlsec1.

It targets Simples Nacional companies (ME, EPP and MEI) providing services in their own municipality. It is used in production by one ME/EPP. Companies outside Simples are not supported, and IBS and CBS are not yet handled. MIT licensed, TypeScript.

Who it's for

Small service companies in Simples Nacional

It issues national NFS-e directly with no per-invoice fee and covers 5,545 of 5,571 municipalities for ME and EPP.

Skip if: Your company is Lucro Presumido or Lucro Real.

Developers building billing for Brazilian clients

You send the sale data from your system and get back the authorized XML, PDF and signed links.

Skip if: You need services taxed outside the provider's municipality or work such as construction.

MEI owners with technical help

It follows the official MEI rules and works in all municipalities.

Skip if: You need something proven in production for MEI, which is not yet tested.

The problem it solves

Issuing NFS-e through intermediaries usually means a fee per invoice. This issuer connects straight to the national system so you pay no per-note cost and keep control of the integration.

Strengths

  • Talks directly to the national NFS-e API with no per-invoice fee
  • Idempotent issuing: the same id returns the same invoice
  • Checks whether an invoice was issued after a lost response
  • Tests validate against official XSDs and check signatures with xmlsec1
  • Cancels and replaces invoices, and creates signed PDF and XML links

Trade-offs

  • Only for ME, EPP and MEI in Simples Nacional
  • IBS and CBS are not highlighted yet; update needed before 1/1/2027
  • Covers 272 of 337 national service codes, plus 31 in some cases
  • No releases in the last year and slowing maintenance

Self-host emissor-nfse-nacional

Self-hostable
Yes

Frequently asked questions

Does it work for MEI?

Yes, by the official rules, but it has not been tested in production for MEI. MEI via API needs an A1 e-CNPJ certificate.

Does it work outside Simples Nacional?

No. Notes from those companies would be refused.

Is there a per-invoice cost?

No. It calls the national API directly from your Cloudflare account.

Can I self-host it?

Yes. It runs on your own Cloudflare account.

Similar tools in Accounting and invoicing software

UniBee

Accounting and invoicing software

237 40 11 months ago Dormant AGPL-3.0

dubbl

Accounting and invoicing software

Self-hostable double-entry accounting with invoicing, payroll and inventory built in

70 30 5 months ago Dormant Apache-2.0

Replaces Xero

Lago

Accounting and invoicing software

Self-hosted usage-based billing engine for teams that meter product usage and invoice it

11k 804 4 days ago Thriving AGPL-3.0

Replaces ChargebeeStripe Billing

Fava

Accounting and invoicing software

Web interface for Beancount plain-text double-entry accounting

2.6k 427 today Active MIT

Replaces QuickBooksQuicken

FOSSBilling

Accounting and invoicing software

Self-hosted billing and client management for web hosting and online service businesses

1.8k 373 today Active Apache-2.0

GnuCash

Accounting and invoicing software

Free double-entry desktop accounting for individuals and small businesses

4.4k 1k yesterday Active GPL-2.0+

Replaces QuickenQuickBooks