Pivella - Gestione P.IVA in forfettario
App per gestire il regime forfettario - P.IVA italiana
Live version: https://pivella.netlify.app/
- Node.js (v18 or higher recommended)
- npm (comes with Node.js)
- Clone the repository:
git clone https://github.com/MakhBeth/pivella.git
cd pivella- Install dependencies:
npm installStart the development server with hot module replacement:
npm run devThe application will be available at http://localhost:5173 (default Vite port).
Build the application for production:
npm run buildThe built files will be in the dist/ directory.
Preview the production build locally:
npm run previewCheck TypeScript types without building:
npm run lintpivella/
βββ src/
β βββ components/ # React components
β β βββ Header.tsx # Header component with navigation
β β βββ Header.module.css
β β βββ Footer.tsx # Footer component
β β βββ Footer.module.css
β β βββ Home.tsx # Main home page component
β β βββ Home.module.css
β β βββ ForfettarioApp.tsx # Main app logic
β βββ App.tsx # Root App component
β βββ App.module.css # Global styles
β βββ main.tsx # Application entry point
βββ public/ # Static assets
βββ index.html # HTML template
βββ vite.config.ts # Vite configuration
βββ tsconfig.json # TypeScript configuration
βββ package.json # Project dependencies and scripts
Pivella ships a local MCP server so that Claude, Codex, Cursor or any MCP client can read your data and propose changes, all on your computer. The assistant only proposes; you confirm in the app. It can also generate the FatturaPA XML or a courtesy PDF for a saved invoice, written into documenti/<year> in the sync folder without touching your Pivella data.
claude mcp add pivella -- npx -y pivella-mcp --dir /path/to/sync-folderSetup for every client, how it works and how to publish the package: mcp/README.md. Package on npm: pivella-mcp.
pivella-mcp 1.0 requires Pivella 7.0 and vice versa: the sync file moves to schema version 3. Update both together.
In Impostazioni β Assistente nel browser, enable WebMCP to let a compatible browser assistant query the selected profile and draft an invoice directly from the open app. No Node installation, MCP server or sync folder is needed. The setting is off by default and can be disabled at any time. Your assistant receives the data returned by its tool calls; its own data handling policy still applies.
The initial tools are list_users (selected profile only), list_clienti, list_fatture, get_riepilogo_anno, propose_fattura, list_proposals and get_proposal. Proposals persist in this browser for review in Impostazioni β Proposte dellβassistente. Confirming revalidates the current data, assigns the invoice number and downloads the XML; rejecting leaves the accounting data unchanged. Drafts are not included in backups or sync files. Confirmed invoices follow the existing backup and sync flows.
WebMCP needs browser and agent support, and Pivella must remain open. It is not a remote MCP URL that can be added to any MCP client. Unsupported browsers show the integration as unavailable; the local MCP server remains available. On pivella.it, Chrome 149+ enables WebMCP through the WebMCP origin trial (token in index.html, valid until 2027-03-30); other origins need the chrome://flags/#enable-webmcp-testing flag. For testing browser support, see the Chrome WebMCP documentation. The adapter uses document.modelContext with registration abort signals, and also supports the earlier navigator.modelContext / unregisterTool API.
- React 18.2.0 - UI library
- TypeScript 5.9.3 - Type safety
- Vite 5.0.8 - Build tool and dev server
- CSS Modules - Scoped component styling
- Recharts - Charting library
- Lucide React - Icon library
Each component follows this pattern:
ComponentName.tsx- TypeScript React component with typed propsComponentName.module.css- CSS module for component-specific styles
The project uses strict TypeScript configuration. All components are typed with proper interfaces for props and state.
The production build generates optimized static files including:
- Minified JavaScript bundles
- Optimized CSS
- Service Worker for PWA functionality
- Static assets
Configuration can be modified in vite.config.ts.
TypeScript compiler options are in tsconfig.json and tsconfig.node.json.
This project is part of the Pivella suite for managing Italian VAT regime (regime forfettario).
Contributions are welcome! Please feel free to submit a Pull Request.
This started as an experiment in pure vibecoding. V1 was built entirely with the Claude iOS app, but it couldn't handle deployment. After manually deploying and configuring Netlify (the meme "AI: why can't they see my new site on localhost" is real), I started using GitHub Copilot for new features.
It didn't go badly until: I found conflicts to resolve... in the node_modules folder, a couple of "undefined is not a function" (sigh), and most importantly, hallucinations. So I had to bring out Claude Code and managed to rewrite the project so it wasn't a complete mess anymore.
The vibecoding experiment failed on some CSS and UI bugs that I just couldn't solve with prompting alone, but the product is still nice and it's a tool I'm proud of. Let's see how it goes.