Project Overview
This project showcases the engineering of a
high-performance currency and cryptocurrency conversion
platform. It provides users with up-to-date rates, which are maintained
through automated background data fetching scheduled via
Quartz.NET. For enhanced SEO, the application utilizes Next.js for
Server-Side Rendering (SSR). Deployment relies on modern DevOps
practices, including delivery to a Kubernetes cluster managed via
Helm.
Key Technologies
- Backend: ASP.NET Core, C#, Quartz.NET
- Frontend: React, Next.js, Tailwind CSS
-
Database: PostgreSQL, Entity Framework Core
(with Migrations)
-
Architecture: Clean Architecture, Domain-Driven
Design (DDD) Principles
-
DevOps: Docker, Kubernetes (K8s), Helm, GitHub
Actions (CI/CD)
-
External APIs: FlateRate (Fiat Currencies),
CoinGecko (Cryptocurrencies)
Backend Architecture and Implementation
Architecting the backend involved using ASP.NET Core structured
according to Clean Architecture principles, ensuring a robust
separation of concerns and promoting maintainability.
Within this architecture, Domain-Driven Design (DDD) principles
were applied; concepts like Entities and
Value Objects (e.g., for Currency, CurrencyName) help
accurately model the core domain.
A critical backend function is the
scheduled acquisition of external data. This process is
managed by Quartz.NET, which triggers background jobs to
fetch fiat currency rates from FlateRate every 12 hours and
cryptocurrency rates from CoinGecko every minute, ensuring data
freshness without constantly polling external APIs.
For data persistence, the fetched USD-based rates are stored in a
PostgreSQL database using Entity Framework Core. Schema changes
are managed systematically via EF Core Migrations. The backend's
primary role, therefore, focuses on the reliable, scheduled
aggregation and storage of base currency data, serving it
efficiently to the frontend.
Frontend User Interface
Building the user interface involved using React and Next.js. The
strategic choice of Next.js enables
Server-Side Rendering (SSR), significantly benefiting
Search Engine Optimization (SEO). For styling, Tailwind CSS
was employed, facilitating the rapid development of a clean and
responsive interface with its utility-first approach.
A key responsibility delegated to the frontend is performing the
calculation of cross-currency conversions on the client-side
based on the USD-relative rates provided by the backend API; this
design keeps the backend logic streamlined.
The user experience focuses on clarity and ease of use. Features
include real-time display of the latest rates, an intuitive
mechanism for selecting currencies and inputting amounts,
full internationalization supporting six languages, and
dynamic theme switching between light and dark modes. To
manage component and application state, standard React patterns
are utilized.
Deployment Automation and Infrastructure
A comprehensive DevOps workflow ensures automated and
reliable deployments. To guarantee environmental consistency, both
the backend service and the frontend application are packaged into
Docker containers.
Deployment targets a Kubernetes (K8s) cluster for these
containerized applications. Helm charts streamline the
management of Kubernetes resources and the deployment process
itself, enhancing predictability and simplifying updates.
Automation for the entire cycle is handled via a GitHub Actions
CI/CD pipeline. Code commits automatically trigger builds, Docker
image creation and registry pushes, followed by the deployment of
new application versions to the Kubernetes cluster using Helm.
Conclusion
This Currency Conversion Platform demonstrates practical expertise
in building performant, full-stack web applications. It
effectively utilizes background job scheduling (Quartz.NET)
for reliable data acquisition, leverages Next.js for SEO benefits
via SSR, and implements efficient client-side logic for
calculations. The architecture (Clean Architecture, DDD
principles) and robust DevOps pipeline (Docker, Kubernetes, Helm,
CI/CD pipeline) showcase the ability to engineer and deploy
scalable, production-ready solutions with a focus on
maintainability and automation.