Getting Started
Open-source POS with Brazilian fiscal module (NF-e/NFC-e)
What is FinOpenPOS?
FinOpenPOS is an open-source Point of Sale (POS) and inventory management system with a Brazilian fiscal module (NF-e/NFC-e). Built with Next.js 16, React 19 and embedded PostgreSQL via PGLite. Turborepo monorepo with the fiscal module as a standalone package.
Zero external dependencies to run — bun install && bun run dev and you're set.
Features
Business
- Dashboard with interactive charts (revenue, expenses, cash flow, profit margin)
- Product Management with categories and stock control
- Customer Management with active/inactive status
- Order Management with items, totals and status tracking
- Point of Sale (POS) for quick sales processing
- Cashier with income and expense transaction logging
- Authentication with email/password via Better Auth
- API Documentation auto-generated interactive docs via Scalar at
/api/docs
Fiscal (Brazilian NF-e / NFC-e)
- Electronic Invoicing — NF-e (model 55, B2B) and NFC-e (model 65, consumer)
- Tax Calculations — ICMS (15 CST + 10 CSOSN), PIS, COFINS, IPI, II, ISSQN
- SEFAZ Integration — authorize, cancel, void, query with mTLS client certificate
- Digital Signature — XML signing with A1 e-CNPJ certificate (PFX/PKCS#12)
- QR Code — NFC-e QR code generation (v2.00/v3.00, online + offline)
- Contingency — SVC-AN, SVC-RS (NF-e) and EPEC (NFC-e) offline modes
- IBS/CBS Reform Events — 14 event types for the Brazilian tax reform (PL_010)
- Settings UI — company info, address, certificate, CSC, default tax codes
- CEP Auto-fill — address completion via ViaCEP + BrasilAPI
Quick Start
git clone https://github.com/JoaoHenriqueBarbosa/FinOpenPOS.git
cd FinOpenPOS
cp apps/web/.env.example apps/web/.envEdit apps/web/.env with a secure secret:
BETTER_AUTH_SECRET=generate-with-openssl-rand-base64-32
BETTER_AUTH_URL=http://localhost:3001bun install
bun run devOpen http://localhost:3001 and use the Fill demo credentials button to sign in with the test account (test@example.com / test1234).
The first bun run dev automatically creates the database at apps/web/data/pglite, pushes the schema via Drizzle and seeds demo data (20 customers, 32 products, 40 orders, 25 transactions) + ~5570 IBGE cities.
Scripts
| Command | Description |
|---|---|
bun run dev | Start all apps via Turborepo |
bun run dev:web | Start only the web app |
bun run check | Lint and format with Biome |
cd apps/web && bun test | Run tRPC router tests |
cd packages/fiscal && bun test | Run fiscal module tests (754 tests) |
cd apps/web && bun run prepare-prod | Migrate from PGLite to PostgreSQL |