A modern web application for tracking and analyzing consumer prices in the Bulgarian market. Built with SvelteKit, TypeScript, and Chart.js, this tool provides comprehensive price analysis across food, fuel, and utility categories.
Create a .env
file with the following variables:
EUROSTAT_API=https://ec.europa.eu/eurostat/api/dissemination/sdmx/3.0/data/dataflow/ESTAT
FUELO_API_URL=https://api.fuelo.net
FUELO_API_KEY=your_fuelo_api_key
git clone <repository-url>
cd svetle
yarn install
yarn dev
http://localhost:5173
yarn dev
- Start development serveryarn build
- Build for productionyarn preview
- Preview production buildyarn check
- Type check the projectyarn lint
- Run ESLint and Prettieryarn format
- Format code with Prettiersrc/
├── components/ # Reusable Svelte components
│ ├── charts/ # Chart components
│ │ ├── foodChart.svelte # Food price charts
│ │ ├── fuelBarChart.svelte # Fuel price comparison
│ │ └── utilityChart.svelte # Utility price charts
│ ├── main/ # Main interactive components
│ │ ├── dateRange.svelte # Time range selector
│ │ ├── foodItems.svelte # Food item selector
│ │ ├── fuelItems.svelte # Fuel type selector
│ │ ├── utilityItems.svelte # Utility selector
│ │ └── Form.svelte # Purchasing power calculator
│ └── structural/ # Layout and structural components
│ ├── Header.svelte # Application header
│ ├── Footer.svelte # Application footer
│ ├── chartSection.svelte # Chart display section
│ └── controlSection.svelte # Control panel section
├── lib/ # Core business logic
│ ├── assets/ # Static assets
│ │ ├── header-image.webp # Header background image
│ │ └── pie-chart-logo.svg # Application logo
│ ├── constants.ts # Data definitions and mappings
│ ├── interfaces.ts # TypeScript type definitions
│ ├── stores.ts # Svelte stores for state management
│ ├── dataFetcher/ # Data fetching modules
│ │ ├── dataFetch.ts # Base data fetching utilities
│ │ ├── foodDataFetcher.ts # Food price data processing
│ │ ├── fuelDataFetcher.ts # Fuel price data processing
│ │ └── utilityDataFetcher.ts # Utility data processing
│ ├── dataManagement/ # Data management utilities
│ │ └── dataManager.ts # Central data management
│ ├── dataProcessing/ # Data transformation modules
│ │ ├── dataProcessing.ts # Eurostat data transformation
│ │ ├── dataElectricityProcessing.ts # Electricity data processing
│ │ └── dataWaterProcessing.ts # Water price processing
│ ├── offlineData/ # Static/offline data
│ │ └── waterPricesAvg.ts # Average water price data
│ └── utils/ # Helper utilities
│ ├── datesAndRanges.ts # Date and range utilities
│ └── helperMethods.ts # General helper functions
├── routes/ # SvelteKit pages and API routes
│ ├── +layout.svelte # Application layout
│ ├── +page.svelte # Main application page
│ └── api/ # Backend API endpoints
│ ├── food-prices/ # Food price data endpoint
│ ├── fuel-prices/ # Fuel price data endpoint
│ ├── utility-prices/ # Utility price data endpoint
│ └── calculate-pp-change/ # Purchasing power calculator
└── styles/ # Global styles and Tailwind configuration
If you want to extend or modify the purchasing power analysys form please check the Form Config Manual
This project is licensed under the MIT License - see the LICENSE file for details.