Skip to content

Commit 761cc68

Browse files
committed
docs(readme): remove stale and promotional sections
1 parent e8fd5bf commit 761cc68

1 file changed

Lines changed: 20 additions & 61 deletions

File tree

README.md

Lines changed: 20 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,14 @@ SPDX-License-Identifier: AGPL-3.0-or-later
1313
[![CI](https://github.com/LibreCodeCoop/nfse-php/actions/workflows/phpunit.yml/badge.svg)](https://github.com/LibreCodeCoop/nfse-php/actions/workflows/phpunit.yml)
1414
[![codecov](https://codecov.io/gh/LibreCodeCoop/nfse-php/branch/main/graph/badge.svg)](https://codecov.io/gh/LibreCodeCoop/nfse-php)
1515

16-
---
16+
## Scope
1717

18-
## Why nfse-php?
19-
20-
Emitting NFS-e in Brazil involves XML signing with ICP-Brasil certificates, SOAP/REST calls to multiple municipal gateways, and safe credential management — all of which most accounting software gets wrong.
21-
22-
**nfse-php** handles all of it correctly:
23-
24-
- **XML signing** with PFX/PKCS#12 certificates (native PHP first, CLI repack fallback for OpenSSL legacy format)
25-
- **Credential isolation** — PFX passwords are never stored in your database; they live in [OpenBao](https://openbao.org/) / HashiCorp Vault KV v2
26-
- **Pluggable secret store** — swap OpenBao for any `SecretStoreInterface` implementation
27-
- **Tier-1 tests always run** via `donatj/mock-webserver` (no real cert required in CI)
28-
- **Strict PHP 8.2+ types** throughout
29-
30-
---
18+
- Emit NFS-e (`emit`)
19+
- Query NFS-e (`query`)
20+
- Cancel NFS-e (`cancel`)
21+
- Retrieve DANFSE bytes (`getDanfse`)
22+
- Sign DPS XML with PFX credentials
23+
- Read secrets from OpenBao/Vault or an in-memory store
3124

3225
## Requirements
3326

@@ -38,25 +31,30 @@ Emitting NFS-e in Brazil involves XML signing with ICP-Brasil certificates, SOAP
3831
| ext-dom | * |
3932
| ext-soap | * |
4033

41-
---
42-
4334
## Installation
4435

4536
```bash
4637
composer require librecodeoop/nfse-php
4738
```
4839

49-
---
50-
5140
## Quick Start
5241

5342
```php
43+
use LibreCodeCoop\NfsePHP\Config\CertConfig;
44+
use LibreCodeCoop\NfsePHP\Config\EnvironmentConfig;
45+
use LibreCodeCoop\NfsePHP\Dto\DpsData;
5446
use LibreCodeCoop\NfsePHP\Http\NfseClient;
5547
use LibreCodeCoop\NfsePHP\SecretStore\OpenBaoSecretStore;
56-
use LibreCodeCoop\NfsePHP\Dto\DpsData;
5748

5849
$store = new OpenBaoSecretStore(addr: 'http://localhost:8200', token: getenv('VAULT_TOKEN'));
59-
$client = new NfseClient(secretStore: $store, sandboxMode: true);
50+
$env = new EnvironmentConfig(sandboxMode: true);
51+
$cert = new CertConfig(
52+
cnpj: '11222333000181',
53+
pfxPath: '/secure/path/certificate.pfx',
54+
vaultPath: 'pfx/11222333000181',
55+
);
56+
57+
$client = new NfseClient(environment: $env, cert: $cert, secretStore: $store);
6058

6159
$dps = new DpsData(
6260
cnpjPrestador: '11222333000181', // Example only: configure with your provider CNPJ
@@ -68,13 +66,9 @@ $receipt = $client->emit($dps);
6866
echo $receipt->nfseNumber; // NFS-e number returned by the SEFIN gateway
6967
```
7068

71-
---
72-
7369
## Secret Storage with OpenBao
7470

75-
PFX passwords are **never** persisted in application databases. They are stored in OpenBao (or Vault) KV v2 under a path like `nfse/pfx/{cnpj}`.
76-
77-
The CNPJ values below are **fictitious examples**. Configure your own values through your application settings/environment.
71+
PFX passwords are stored in OpenBao (or Vault) KV v2, for example in `nfse/pfx/{cnpj}`.
7872

7973
```php
8074
use LibreCodeCoop\NfsePHP\SecretStore\OpenBaoSecretStore;
@@ -93,47 +87,12 @@ $store->put('pfx/11222333000181', ['password' => 'secret']);
9387
$password = $store->get('pfx/11222333000181')['password'];
9488
```
9589

96-
For development/CI without OpenBao, use `NoOpSecretStore` which reads directly from constructor arguments and never touches any server.
97-
98-
---
99-
100-
## Roadmap
101-
102-
- [x] DPS issuance via SEFIN Nacional REST API
103-
- [x] XML signing (PFX, ICP-Brasil)
104-
- [x] OpenBao / Vault KV v2 secret store
105-
- [x] Mock webserver for CI-friendly testing
106-
- [ ] NFS-e query (GET /dps/{id})
107-
- [ ] NFS-e cancellation
108-
- [ ] Webhook / event polling
109-
- [ ] Municipal gateway adapters beyond Niterói
110-
111-
---
112-
113-
## Commercial Support
114-
115-
This library is the foundation of the [akaunting-nfse](https://github.com/LibreCodeCoop/akaunting-nfse) module for [Akaunting](https://akaunting.com/).
116-
117-
Need SLA-backed support, custom municipal adapters, or managed hosting?
118-
Contact us: **comercial@librecodecoop.org.br**
119-
120-
---
90+
For development/CI without OpenBao, use `NoOpSecretStore` (in-memory only, no server calls).
12191

12292
## Contributing
12393

124-
We welcome issues and pull requests. Please read [CONTRIBUTING.md](CONTRIBUTING.md) before opening a PR.
125-
12694
All commits must use [Conventional Commits](https://www.conventionalcommits.org/) and be signed off (`git commit -s`).
12795

128-
---
129-
130-
## Give us a star!
131-
132-
If this library saves you hours of integration pain, please ⭐ the repository.
133-
It helps other developers discover the project and motivates the team to keep improving it.
134-
135-
---
136-
13796
## License
13897

13998
GNU Affero General Public License v3.0 or later — see [LICENSES/AGPL-3.0-or-later.txt](LICENSES/AGPL-3.0-or-later.txt).

0 commit comments

Comments
 (0)