eFiscal is a middleware platform for automated fiscalization of online orders.
It connects webshop/order systems (currently MerchantPro) with Serbian Tax Authority services to issue and track fiscal bills.
- Authenticated, role-based access with client/organization scope
- MerchantPro order fetch with filterable sync parameters
- Per-organization product catalog (CRUD, shop sync with progress, inline search on manual fiscal bills)
- Fiscal bill creation (order-based and manual flows)
- Retry and status tracking for fiscalization attempts
- Admin workflows for users, roles, organizations, and API connection templates
- Localized web UI (English and Serbian) with in-app language switcher
- Extensible integration model for future modules (WooCommerce, Shopify, ERP, courier, etc.)
- Frontend: React 19 + Vite + React Router + Axios + i18next (English and Serbian UI)
- Backend: Java 17+ / Spring Boot 3.4.x
- Database: PostgreSQL 15/16 (Flyway migrations)
- Auth/Security: Bearer token auth, role/action authorization, scoped access checks
- Dev/Deployment: Docker, Docker Compose
.
├── frontend/ # React app (Vite)
├── backend/ # Spring Boot API
├── docker-compose.yml # Local full stack (db + backend + frontend)
├── docker-compose.qa.yml # QA stack (localhost-bound, behind host Apache)
├── deploy/ # QA Apache vhost, deploy and backup scripts
├── DEPLOY_QA.md # QA VPS deployment runbook
├── ARCHITECTURE.md # System and flow overview
├── PRODUCT_REQUIREMENTS.md # Functional/non-functional requirements
├── API_CONTRACT.md # REST contract and error model
├── DATA_MODEL.md # Database model and migration rules
├── BACKEND_STRUCTURE.md # Backend architecture conventions
├── FRONTEND_STRUCTURE.md # Frontend architecture/UI conventions
└── FISCAL_BILL_MODULE_SPEC.md # Fiscal module behavior details
Choose one of the following workflows:
- Docker
- Docker Compose
- Java JDK 17+ (JDK 21 also supported by project scripts)
- Maven 3.9+
- Node.js 20+
- npm 10+
- PostgreSQL 15+ (if not using H2 default)
From the repository root:
docker compose up --buildServices:
- Frontend:
http://localhost:5173 - Backend API:
http://localhost:8080 - PostgreSQL:
localhost:5432(efiscal/efiscal)
Stop:
docker compose downStop and remove DB volume:
docker compose down -vThe root docker-compose.yml is for local development only (Vite dev server, default DB credentials, public ports). For the QA server use docker-compose.qa.yml behind host Apache - see DEPLOY_QA.md.
Use a local PostgreSQL and create:
- Database:
efiscal - User:
efiscal - Password:
efiscal
cd backend
./run-dev.shNotes:
run-dev.shauto-detects JDK 17/21 and runs Spring withdevprofile.- Default backend port:
8080. - Flyway migrations run on startup.
In another terminal:
cd frontend
npm install
npm run devFrontend runs on http://localhost:5173 and proxies /api to http://localhost:8080 by default.
backend/src/main/resources/application.yml supports env overrides:
SPRING_DATASOURCE_URLSPRING_DATASOURCE_USERNAMESPRING_DATASOURCE_PASSWORD
Default fallback is a file-based H2 database in PostgreSQL compatibility mode.
frontend/vite.config.js supports:
VITE_API_PROXY_TARGET(default:http://localhost:8080)
The project includes a development superadmin account:
- Email:
admin@efiscal.local - Password:
Admin123!
This credential is intended for local/dev usage only. Change seeded/default credentials before any shared or production deployment.
All backend endpoints are versioned under:
/api/v1
See full endpoint contracts and error model in API_CONTRACT.md.
- Auth: login/session bootstrap for protected APIs
- MerchantPro Sync: fetch orders with parameterized filters
- Products: organization-scoped catalog, DB-backed pull-from-shop sync (
GET /products/syncSSE +GET /products/sync/statuspoll,POST /products/sync/cancel), inline search on Create Fiscal Bill - Fiscal Bill: create, detail, retry, and status operations
- RBAC and Scope:
- action-based permissions
- client/org access restrictions
- subscription validation for non-superadmin users
- Administration:
- clients and organizations
- users and roles
- action catalog
- API connections/templates
- tax and payment type mappings
cd frontend
npm run dev
npm run build
npm run preview
npm run lint # ESLint, including i18next literal-string checksUI copy lives in frontend/src/locales/en.json and frontend/src/locales/sr.json. See FRONTEND_STRUCTURE.md (section 2A) for i18n conventions.
cd backend
./run-dev.sh
mvn testARCHITECTURE.mdPRODUCT_REQUIREMENTS.mdAPI_CONTRACT.mdDATA_MODEL.mdBACKEND_STRUCTURE.mdFRONTEND_STRUCTURE.mdFISCAL_BILL_MODULE_SPEC.md
This repository already contains core modules and scaffolding for:
- end-to-end local stack execution
- role/user and access-control management
- MerchantPro order operations
- product catalog and MerchantPro product sync
- fiscal bill workflows and related mappings (including inline catalog search on manual create)
Planned extension points include additional commerce/integration providers and broader automation modules.