Kontrahent.sk is a full-stack platform for monitoring Slovak business counterparties. It helps users assess financial and legal risk, search and analyze companies, track important changes, and receive alerts through Telegram and Web Push notifications.
When working with suppliers, clients, or other business partners, it is important to understand their reliability before problems become expensive. Kontrahent.sk brings together company search, debt and legal-event monitoring, risk indicators, and personal watchlists in one interface.
- Public company search with external-source enrichment and local cache fallback.
- Company detail pages with risk score, debt indicators, legal-event signals, and financial history.
- Personal watchlist for tracking selected companies over time.
- Alert center with read/unread management.
- Telegram and Web Push notification delivery.
- Daily synchronization of debt-related source data.
- Background monitoring jobs for watchlist changes.
- English and Slovak interface localization.
- Progressive Web App support for installable mobile/desktop experience.
frontend/app/page.tsx— landing pagefrontend/app/search— company discovery and search flowsfrontend/app/company— company detail pagesfrontend/app/dashboard— personal monitoring dashboardfrontend/app/notifications— alerts and notification centerfrontend/app/profile— user profile and preferencesfrontend/app/auth— authentication flows
backend/src/companies— company search, browse, details, enrichmentbackend/src/watchlist— tracked counterparties per userbackend/src/monitoring— sync jobs and monitoring logicbackend/src/notifications— Telegram, push, and alert deliverybackend/src/auth— authenticated API accessbackend/src/supabase— Supabase integration layer
kontrahent/
|-- backend/ # NestJS API
|-- frontend/ # Next.js 14 app (App Router, PWA)
|-- supabase/ # SQL schema files
| |-- schema.sql
| `-- schema_sync_tables.sql
|-- docker-compose.yml
|-- DATA_SOURCES.md # Data origin and ingestion logic
`-- package.json # Root helper scripts
- Frontend: Next.js 14, React 18, Tailwind CSS, Recharts, next-pwa
- Backend: NestJS, TypeScript, Axios, Cheerio, BullMQ-ready dependencies
- Database/Auth: Supabase, PostgreSQL, Row Level Security
- Notifications: Telegram Bot API, Web Push
- Scheduling:
@nestjs/schedule - Localization: custom i18n layer for English and Slovak
The application aggregates company and risk-related information from multiple sources.
A full breakdown is available in DATA_SOURCES.md.
Current source logic includes:
- RPO API (Statistical Office) for legal-entity search and identity/status enrichment
- RUZ API (Register of financial statements) for company profile and financial statements
- Financial Administration debtor exports for tax-debt synchronization
- Social Insurance debtor exports for social-debt synchronization
- Node.js 20+ (recommended)
- npm 10+
- Supabase project (URL + keys)
- Optional: Docker Desktop 4+ for containerized local development
From the repository root:
npm install
npm --prefix backend install
npm --prefix frontend install- Create a Supabase project.
- Run
supabase/schema.sql. - Run
supabase/schema_sync_tables.sql. - In Supabase Auth settings, add local redirect URL
http://localhost:3000/auth/callback. - If needed, enable Google OAuth in Supabase Auth.
cp backend/.env.example backend/.envPowerShell alternative:
Copy-Item backend/.env.example backend/.envRequired for normal operation:
SUPABASE_URLSUPABASE_SERVICE_ROLE_KEYFRONTEND_URL
Important optional variables:
PORT(default3001)RPO_API_BASERUZ_API_BASETELEGRAM_BOT_TOKENTELEGRAM_BOT_POLLING_ENABLEDVAPID_PUBLIC_KEY,VAPID_PRIVATE_KEY,VAPID_EMAILREDIS_URL
cp frontend/.env.local.example frontend/.env.localPowerShell alternative:
Copy-Item frontend/.env.local.example frontend/.env.localRequired:
NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEYNEXT_PUBLIC_API_URLNEXT_PUBLIC_SITE_URL
Use two terminals:
# Terminal 1
npm --prefix backend run start:dev
# Terminal 2
npm --prefix frontend run devOr use root helper scripts:
npm run start:dev:backend
npm run start:dev:frontendThe repository includes a local Docker setup for:
frontend— Next.js dev server with hot reloadbackend— NestJS dev server with hot reloadredis— local Redis service
docker compose up --build- Frontend:
http://localhost:3000 - Backend:
http://localhost:3001 - Swagger (dev only):
http://localhost:3001/api/docs - Redis:
localhost:6379
| Scope | Command | Description |
|---|---|---|
| Root | npm run start:dev |
Start backend dev server via nodemon |
| Root | npm run start:dev:backend |
Start backend dev server |
| Root | npm run start:dev:frontend |
Start frontend dev server |
| Root | npm run build |
Build backend + frontend |
| Backend | npm --prefix backend run build |
Build backend |
| Backend | npm --prefix backend run test |
Run backend tests |
| Frontend | npm --prefix frontend run dev |
Start frontend dev server |
| Frontend | npm --prefix frontend run build |
Build frontend |
| Frontend | npm --prefix frontend run lint |
Run frontend lint |
GET /companies/search?q=...&page=...GET /companies/browse?...filtersGET /companies/:icoGET /companies/:ico/historyGET /monitoring/status
GET /watchlistPOST /watchlistPATCH /watchlist/:icoDELETE /watchlist/:icoGET /companies/:ico/refreshPOST /monitoring/syncPOST /notifications/push/subscribePOST /notifications/telegram/connectGET /notifications/alertsPOST /notifications/alerts/read-allGET /notifications/vapid-public-keyPOST /notifications/test-all
Configured in backend and executed while the backend process is running:
0 2 * * *(Europe/Bratislava) — debt-source synchronization viaDataSyncService0 3 * * *(Europe/Bratislava) — nightly watchlist monitoring and alert dispatch viaMonitoringService
- Create a bot with
@BotFather. - Put the token into
TELEGRAM_BOT_TOKEN. - Send
/startto your bot and use the returnedchat_id. - Connect the
chat_idin the app UI.
- Generate VAPID keys:
npx web-push generate-vapid-keys- Put the keys and contact email into backend
.env. - Enable browser notifications in the UI.
- PWA is enabled in production builds.
- PWA is disabled in development to avoid service worker cache conflicts during local iteration.
- Supported UI languages: English (
en) and Slovak (sk) - Runtime language switcher is available in the app
- Selected language is stored in
localStorageunderkontrahent.locale
- Main application modules are wired in
backend/src/app.module.ts. - Repository-wide helper scripts live in the root
package.json. - App install metadata is configured in
frontend/public/manifest.json.
- Add screenshots and product walkthrough GIFs to the README
- Add repository topics and social preview image in GitHub settings
- Add license metadata
- Add CI status badges once workflows are configured