Kanya Ratanak Sros
Elixir Nawala

Elixir Nawala

Elixir Nawala is a Phoenix-based domain monitoring platform for domain status observability, Telegram notification management, and shortlink management in one integrated system.

1. Folder Structure

elixir_nawala/
├─ assets/                      # Frontend source (CSS, JS, npm dependencies)
│  ├─ css/
│  ├─ js/
│  ├─ package.json
│  └─ package-lock.json
├─ config/                      # Environment configuration (dev/test/prod/runtime)
│  ├─ config.exs
│  ├─ dev.exs
│  ├─ test.exs
│  ├─ prod.exs
│  └─ runtime.exs
├─ lib/
│  ├─ elixir_nawala/            # Domain logic and business contexts
│  │  ├─ accounts/              # Admin authentication and password reset
│  │  ├─ checker/               # Checker scheduler
│  │  ├─ monitor/               # Domain, check result, notification, setting
│  │  ├─ sflink/                # External SFLINK client
│  │  ├─ shortlink/             # Shortlink entities and rotator logic
│  │  ├─ telegram/              # Telegram client, notifier, scheduler
│  │  ├─ workers/               # Oban background jobs
│  │  ├─ application.ex         # OTP supervision tree
│  │  └─ repo.ex                # Ecto repository
│  ├─ elixir_nawala.ex
│  └─ elixir_nawala_web/        # Web layer (Router, Controllers, LiveView, Components)
├─ priv/
│  ├─ repo/
│  │  ├─ migrations/            # Database schema evolution
│  │  └─ seeds.exs
│  ├─ gettext/
│  └─ static/
├─ test/
│  ├─ support/
│  └─ test_helper.exs
├─ .env.example
├─ .formatter.exs
├─ .gitignore
├─ mix.exs
├─ mix.lock
└─ README.md

2. System Architecture

[Admin/User Browser]
        |
        v
[Phoenix Router + Controllers + LiveView]
        |
        v
[Domain Contexts]
Accounts | Monitor | Shortlink | Telegram | Sflink
        |
        v
[Ecto Repo + PostgreSQL]
        |
        +--> [Oban Queues]
        |      - checker
        |      - notifications
        |
        +--> [External Integrations]
               - SFLINK API
               - Telegram Bot API

Core architecture components:

  • Phoenix Web Layer handles HTTP routing, admin session flow, and real-time dashboard interactions via LiveView.
  • Context Modules isolate business logic by domain (Accounts, Monitor, Shortlink).
  • Oban Workers execute asynchronous workloads such as domain checks, alerts, and periodic summaries.
  • Ecto + PostgreSQL acts as the system of record for application state.
  • External Clients (Sflink.Client, Telegram.Client) encapsulate third-party service communication.

3. Tech Stack

Layer Technology
LanguageElixir ~> 1.15
Web FrameworkPhoenix ~> 1.7
Realtime UIPhoenix LiveView ~> 1.0
DatabasePostgreSQL + Ecto SQL
Background JobsOban
HTTP ClientReq
Password Hashingpbkdf2_elixir
Web ServerBandit
Frontend BuildTailwind CSS + esbuild
SerializationJason
ObservabilityTelemetry Metrics + Telemetry Poller
i18nGettext
Email LayerSwoosh + Finch