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.
- Multi-category Price Tracking: Monitor food, fuel, and utility prices with interactive charts
- Real-time Data Integration: Fetches live data from Eurostat API for food prices and Fuelo API for fuel prices
- Flexible Time Ranges: Analyze price trends from 3 months to 10 years
- Purchasing Power Calculator: Calculate how price changes affect your budget and purchasing power
- Bulgarian Market Focus: Specialized for Bulgarian market analysis with Bulgarian language interface
- Responsive Design: Modern UI built with Tailwind CSS
- Fast Performance: Lightweight SvelteKit application with optimized data fetching
- Food Prices: Eurostat HICP (Harmonised Index of Consumer Prices) - Base year 2015=100
- Fuel Prices: Fuelo.net API for current fuel pricing data
- Utility Prices: Eurostat electricity data with integrated water pricing
- Bread, Pork, Poultry, Milk, Eggs, Cooking Oil, Butter, Potatoes, Sugar
- Gasoline, Diesel, LPG, Methane
- Electricity, Water
- Frontend: SvelteKit 5, TypeScript
- Styling: Tailwind CSS with custom components
- Charts: Chart.js with svelte5-chartjs integration
- APIs: Custom SvelteKit API routes for data processing
- Build Tool: Vite
- Package Manager: Yarn
- Node.js (version 18 or higher)
- Yarn package manager
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- Clone the repository:
git clone <repository-url>
cd svetle- Install dependencies:
yarn install- Start the development server:
yarn dev- Open your browser and navigate to
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 Prettier
src/
├── 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
- Interactive charts showing price trends over selected time periods
- Multi-item comparison with color-coded data series
- Support for both absolute values and percentage changes
- Input your income and expenses to see how inflation affects your purchasing power
- Compare historical vs. current budget requirements
- Factor in actual price changes across all tracked categories
- Automatic data transformation from Eurostat's complex JSON structure
- Real-time fuel price integration from Fuelo API
- Caching mechanisms for improved performance
This project is licensed under the MIT License - see the LICENSE file for details.