SShortSingh.
Back to feed

Developer publishes JavaScript validation library for Poland's KSeF e-invoicing system

0
·1 views

Poland's national e-invoicing platform, KSeF, requires businesses to submit invoices via a government API, but the Ministry of Finance only provides official SDKs for Java and .NET, leaving JavaScript developers without support. A developer extracted and open-sourced a standalone validation layer called ksef-invoice-validate to catch structural invoice errors before submission. The zero-dependency library runs in the browser and validates key fields including Polish tax ID checksums, VAT arithmetic, and calendar date integrity. It addresses common pitfalls such as floating-point rounding errors in currency calculations and JavaScript's silent date overflow behavior. The package is available on npm and returns stable error codes suited for use across different applications.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Developer shares four engineering lessons from building AI, education, and healthcare apps

A software developer has documented recurring engineering lessons drawn from building four distinct Next.js products across generative AI, job search, education, and clinic management domains. Klyro, an AI platform combining chat, web search, and image tools, required a unified system for authentication, billing, and credit management across multiple services. RoleMint is a job-search assistant that generates application materials while keeping humans in the approval loop, and BrightLearn is an open-source educational platform built around structured content and user progress tracking. FizioKinetoMaxim is a role-based CRM for a physiotherapy clinic, handling appointments, patient records, and audit trails using Next.js and Convex for real-time data. Across all four projects, the developer found that consistent user experience, data relationships, and access control were as critical as the core features themselves.

0
ProgrammingDEV Community ·

Binary search on rank data cuts 4-million-item crawl from a week to a day

A software engineer needed to crawl roughly 4 million items from a public registry within a single day using parallel workers. Splitting the keyspace evenly by alphabet failed because key distribution was uneven, leaving one shard carrying 71% of the total workload. The engineer instead used the registry's listing API, which returns a key's global rank in the sorted order, as a binary search oracle. Running about 40 API calls per boundary, the algorithm identified cut points where each shard held an equal share of items regardless of alphabet width. The resulting balanced partition reduced the fattest shard from 71% of the work to roughly 1/N, turning a projected week-long crawl into a one-day job.

0
ProgrammingDEV Community ·

Why Sanity CMS Is Gaining Traction as a Healthcare Content Management Solution

Healthcare organizations face strict demands around content accuracy, regulatory compliance, and data security when managing clinical and patient-facing material. Sanity, an API-first content management system, is being highlighted as a strong fit for the sector due to its customizable workflows, extended content history tracking, and enterprise-grade security features. The platform supports multi-tenant setups and internationalization, allowing large health organizations to manage content across departments, regions, and brands from a single system. Its role-based access controls and real-time collaboration tools help streamline review and approval processes among clinical and editorial teams. Sanity's open architecture also enables integration with healthcare information systems, patient portals, and continuing professional development tracking tools.

0
ProgrammingDEV Community ·

Solo dev discovers rollback API silently ignored user-specified deployment version

A developer building Staxa, a solo multi-tenant deployment platform, found that the POST rollback endpoint accepted a deployment ID in the URL but never actually read it. Instead of rolling back to the requested version, the system always restored the most recent successful deployment, regardless of what the user specified. The bug returned a 202 Accepted response and logged a successful rollback every time, leaving no visible errors to alert users or developers. The issue was discovered during a manual audit of API documentation against actual handler code, revealing the handler never called chi.URLParam to extract the deployment ID. The fix, merged via pull request, also exposed a second underlying schema bug where the is_current flag was scoped to the entire tenant rather than to individual services.

Developer publishes JavaScript validation library for Poland's KSeF e-invoicing system · ShortSingh