DEV Community

Cover image for 🧾 How I Rebuilt My eAdvice System with C# Console Apps
seonglinchua
seonglinchua

Posted on

🧾 How I Rebuilt My eAdvice System with C# Console Apps

“I didn’t modernize my stack. I rethought my system.”

👋 Background

I was tasked with supporting and enhancing an eAdvice distribution system at my bank.

The problem? It was built on tight coupling, manual triggers, and legacy UI dependencies.

The workflow was error-prone, slow, and hard to scale.

So, I tore it down — and rebuilt it as a headless C# console application.

This is how I did it, and why you might want to do the same.


🧠 What Was Wrong with the Old System?

  • ⚠️ UI tightly coupled with core logic
  • 🐢 Manual click events to fetch data
  • 🧷 Dependencies that made automation nearly impossible
  • ❌ No logging or audit trail
  • 📎 Painful to manage errors and retries

I knew this wasn’t sustainable — especially with daily deadlines and growing compliance needs.


🧱 The Headless Approach

I rebuilt everything around this principle:

"Let the logic run without needing to be seen."

Key Design Decisions:

  • Convert UI code behind into reusable services
  • Store configs in JSON files
  • Add Serilog for structured logging
  • Use Task Scheduler to automate execution
  • Isolate mailing list fetch, PDF mapping, and Infobip sending into separate components
  • Capture every success/failure in a reconciliation table

⚙️ Technologies Used

Purpose Tool/Lib
Core app C# .NET Console App
DB access Dapper
Logging Serilog
File parsing EPPlus, iText7
Email sending Infobip Email API
Scheduling Windows Task Scheduler
Config appsettings.json + ENV overrides

🧩 Modular Workflow

Each step was designed as an isolated module:


🪛 Dev-Friendly Features

  • Logs are written both to file and console with timestamps.
  • The app supports --dryrun mode for safe testing.
  • Failures are automatically retried in the next run.
  • Configs can be changed without recompiling the app.

✨ Results

  • ✅ System now runs unattended every day
  • ✅ Reconciliation and error handling became transparent
  • ✅ No more relying on fragile UIs
  • ✅ Easy to support multiple advice types (e.g., PWM, V8)

🔮 What’s Next?

  • Adding queue retry logic for failed emails
  • Creating a web dashboard for ad-hoc resend and report lookup
  • Exploring cloud-based job runners for scalability
  • Plugging in GenAI classification for incoming requests

🙌 Your Turn

Have you turned a legacy system into something lean and modern?

Ever tried headless console automation in production?

Drop your experience below — or ask me anything about this build.

I’ll be sharing more posts like this daily 👇

Top comments (0)