Intonational - Microservices Backend with FastAPI
Intonational is a work-in-progress microservices backend built with FastAPI, designed to provide weather forecasts, currency exchange rates, and travel advisories. The project separates static data services (historical weather, geocodes, travel advisories) and dynamic data services (weather forecasts, FX rates) to provide clean, modular APIs. External data sources include Open Meteo for weather data, ExchangeRate Host for currency rates, and scraped travel advisories from the US State Department. Playwright is used in combination with BeautifulSoup for scraping these advisories. Redis caching improves performance, and MongoDB stores structured and unstructured data.
Currently under active development. Features and integrations are continuously being added, refined, and tested locally.
The development workflow includes:
- ๐ก Define microservice responsibilities and data flows.
- ๐ ๏ธ Choose the tech stack: Python, FastAPI, Redis, MongoDB, Playwright + BeautifulSoup for scraping.
- ๐งโ๐ป Implement services, REST endpoints, and data models.
- ๐ง Test and debug services locally, ensure caching and data aggregation work correctly.
- โจ Iteratively refine APIs, scraping, and aggregation logic.
Key Features
- โ Microservices architecture
- Services are separated into static and dynamic data APIs, improving modularity and scalability.
- ๐ Data aggregation & caching
- Redis caches FX rates and weather forecasts to minimize repeated API calls and improve response time.
- ๐ REST APIs with FastAPI
- Endpoints handle data retrieval, aggregation, and caching in a modular backend architecture.
- ๐๏ธ Multi-database integration
- MongoDB stores both structured and unstructured data for travel advisories and geocodes.
- ๐งช Web scraping
- Playwright in combination with BeautifulSoup is used to scrape travel advisories from the US State Department.
- โก Performance optimization
- Redis TTL and key strategies reduce unnecessary API calls; asynchronous FastAPI endpoints improve throughput.
- ๐ Aggregated historical & forecast data
- Provides combined views of weather and FX rates for analysis or travel-related applications.
Backend
- Python
- FastAPI
- Redis for dynamic-data caching
- MongoDB - semi-static-data storage
- Playwright + BeautifulSoup - data scraping
- Pydantic for data validation
Other
- Docker & Docker Compose for local development
- CI/CD with GitHub Actions (planned)
- Postman for API testing
- Visual Studio Code