How purpurbc/company-intel works
Cintela is a Swedish company-data product: official SCB and Bolagsverket inputs are imported into PostgreSQL, exposed through a FastAPI service, and explored in a Next.js interface. The main user journey is company search and filtering through company history/details or geographic and national market overviews; profiles and saved segments support reuse. The README documents resumable imports and cache refresh behavior. Source excerpts confirm API startup/router registration and database-backed services, but not most endpoint-to-service or importer call wiring, so those links are omitted.
Main entry points: api.ts API client · main.py API application · database.py API connections · repository.py Company resolution
Components 26
Web experience
- Company search
web/src/app/companies/page.tsx - Company detail
web/src/app/company/[org_nr]/page.tsx - Geographic views
web/src/app/geography/page.tsx - County overview
web/src/app/county/[county_code]/page.tsx - Sweden overview
web/src/app/sweden/page.tsx - Saved segments
web/src/app/profile/page.tsx - API client
web/src/lib/api.ts
API and services
- API application
api/main.py - Company routes
api/routers/companies.py - Geography routes
api/routers/counties.py - Sweden routes
api/routers/sweden.py - Profile routes
api/routers/profile.py - Company search
api/services/company_service.py - County analytics
api/services/county_service.py - API connections
api/database.py
Data ingestion
- SCB imports
worker/scb/company_importer.py - SCB client
worker/scb/scb_base_client.py - Bulk imports
worker/bulk_files/importer.py - Statistics import
worker/bolagsverket_statistics/importer.py - Company resolution
worker/ingest/repository.py - Statistics persistence
worker/bolagsverket_statistics/repository.py - Worker connections
worker/database.py
Data storage
- PostgreSQL
db
Other components
- Analyst
- SCB
- Bolagsverket
Connections 28
- Analyst → Company search: searches
- Analyst → Geographic views: explores
- Analyst → Sweden overview: reviews
- Analyst → Saved segments: manages
- Company search → API client: requests
- Company detail → API client: requests
- Geographic views → API client: requests
- County overview → API client: requests
- Sweden overview → API client: requests
- Saved segments → API client: requests
- API client → API application: calls
- API application → Company routes: dispatches
- API application → Geography routes: dispatches
- API application → Sweden routes: dispatches
- API application → Profile routes: dispatches
- Company search → API connections: queries
- County analytics → API connections: queries
- API connections → PostgreSQL: reads
- SCB → SCB client: supplies data
- SCB client → SCB imports: serves requests
- SCB imports → Company resolution: imports records
- Bolagsverket → Bulk imports: supplies files
- Bolagsverket → Statistics import: supplies files
- Bulk imports → Company resolution: imports records
- Company resolution → Worker connections: persists
- Statistics import → Statistics persistence: stores snapshots
- Statistics persistence → Worker connections: uses connection
- Worker connections → PostgreSQL: writes