ISPANA Backend API Changelog — v1.0.0 Catatan Rilis API Backend ISPANA — v1.0.0

a22 2026-07-26

Focus: WhatsApp Message History Backend & Phone Auto-Sanitization

  • a. [whatsapp_history_datasource.dart] (DataSource): Added collection data_whatsapp_history access with methods to insert sent logs, query vendor history sorted by date descending, and search recipient candidates (customers and employees) for autocomplete.
  • b. [whatsapp_history_repository.dart] (Repository): Created repository orchestration to dispatch WhatsApp notifications via WhatsappService, sanitize target phone numbers (converting leading 0 to country code 62), and insert history records with vendor tenant isolation.
  • c. [settings_controller.dart] & [server.dart] (Controller & Server): Mounted endpoints POST /<vendorId>/settings/whatsapp-gateway/send, GET /<vendorId>/settings/whatsapp-gateway/history, and GET /<vendorId>/settings/whatsapp-gateway/recipients with JWT vendor authorization checks.
  • d. [whatsapp_service.dart] (Service): Added backend normalization in sendNotification converting leading 0 numbers to country code 62 before generating WAHA chat IDs (628...@c.us).
  • e. [pubspec.yaml]: Bumped API version to 1.0.0+22.
Git Commit Tag: ispana-api-v1.0.0a22
a21 2026-07-25

Focus: Database-Wide 30-Day Soft-Delete Automated Cron Removal

  • a. [clean_mongo.sh]: Configured Linux bash cron script to execute database-wide physical removal for all soft-deleted records (isDeleted: true) across all collections in ispana_db older than 30 days of updatedAt / deletedAt.
  • b. [Security & Data Integrity]: Excluded critical audit and financial collections (data_invoices, data_finance, data_audit_logs, system.views) from physical purge per Rule 10 retention standard.
  • c. [pubspec.yaml]: Bumped API version to 1.0.0+21.
Git Commit Tag: ispana-api-v1.0.0a21
a20 2026-07-12

Focus: Multi-provider SMTP configuration (Custom SMTP or Gmail fallback)

  • [.env & .env.example]: Added SMTP_HOST, SMTP_PORT, SMTP_SSL, and SMTP_IGNORE_BAD_CERT variables.
  • [env_config.dart]: Exposed getters for new SMTP config parameters.
  • [email_service.dart]: Refactored constructor to initialize either a custom SMTP server (SmtpServer) or fallback to gmail() if SMTP_HOST is empty. Updated error handling to extract detailed SMTP problems from MailerException.
  • [scratch/test_smtp.dart]: Created SMTP test scratch script.
  • [pubspec.yaml]: Bumped version to 1.0.0+20.
Git Commit Tag: ispana-api-v1.0.0a20
a19 2026-06-26

Focus: L2TP VPN Tunneling feature restoration & RADIUS authorization integration

  • [vpn_tunnel_model.dart]: Created L2TP VPN user data model representation.
  • [auth_remote_data_source.dart]: Added MongoDB unique indexing for VPN users collection.
  • [network_data_source.dart]: Added MongoDB query support for VPN users CRUD operations.
  • [network_repository.dart]: Implemented validation, logical tenant isolation, soft-deletion, and credentials lookup fallback.
  • [network_controller.dart]: Added CRUD HTTP endpoints and updated RADIUS authorization checks to allow VPN users.
  • [vendor_controller.dart]: Mounted dynamic wildcard mappings for VPN endpoints.
Git Commit Tag: ispana-api-v1.0.0a19
a18 2026-06-07

Focus: Customer Isolation Backend & System Profiles

  • [pppoe_profile_model & customer_model]: Added isSystemProfile, subscriptionEndDate, and isolationType.
  • [network_data_source & repository]: Handled isolation profile verification and protected system profiles.
  • [customer_repository & controller]: Added isolateCustomer and activateCustomer APIs with audit logs.
  • [network_controller.dart]: Dynamically routed isolated clients to ISPANA_ISOLATION_POOL and set rate limit to 256k/256k in RADIUS handler.
Git Commit Tag: ispana-api-v1.0.0a18
a17 2026-06-05

Focus: Dynamic RADIUS IP Pool Assignment

  • [network_controller.dart]: Injected the resolved PPPoE Profile ipPool field as reply:Framed-Pool in RADIUS access response payload.
Git Commit Tag: ispana-api-v1.0.0a17
a16 2026-06-02

Focus: Decoupled Vertical Slice Domain Migration & Purged Monolithic Backend

  • [vendor]: Split monolithic classes into isolated domains (staff, landmark, customer, network).
  • [server.dart]: Re-wired dependencies to instantiate domain-specific datasources, repositories, and controllers.
  • [Deprecation & Purge]: Purged deprecated monolithic files.
Git Commit Tag: ispana-api-v1.0.0a16
a15 2026-06-01

Focus: POP Landmark Mapping & Double-Collection Router Updates

  • [vendor_network_logic.dart]: Updated createRouter to insert router identity to data_routers and sync device structure to data_landmarks.
Git Commit Tag: ispana-api-v1.0.0a15
a14 2026-05-31

Focus: Decoupled Customer Personal Identity & Subscriptions DB

  • [auth_remote_data_source.dart]: Added indexes for data_vendor_customers and DB migration block.
  • [vendor_remote_data_source.dart]: Refactored Customer CRUD methods to split-write personal profile data to data_customers and subscription data to data_vendor_customers.
Git Commit Tag: ispana-api-v1.0.0a14
a13 2026-05-30

Focus: RADIUS Dynamic NAS IP Lookup & Active Sessions Tracking

  • [auth_remote_data_source.dart]: Added index definitions for routers, customers, and active sessions.
  • [vendor_controller.dart]: Outlined dynamic NAS IP router lookup endpoint (/radius/nas) and mounted authorize and accounting endpoints.
  • [vendor_remote_data_source & repository]: Added active sessions CRUD methods.
Git Commit Tag: ispana-api-v1.0.0a13
a12 2026-05-28

Focus: Customer Management CRUD API & Registry Integration

  • [customer_model.dart]: Extended data schema mapping.
  • [vendor_remote_data_source.dart]: Added MongoDB collection operations and registry query helpers.
  • [vendor_repository_impl.dart]: Designed logical actions mapping tenant isolation, find-or-create registry accounts, and bulk import tasks.
  • [vendor_controller.dart]: Attached endpoint controllers.
Git Commit Tag: ispana-api-v1.0.0a12
a11 2026-05-01

Focus: Media Upload Support (Photos)

  • [media_controller.dart]: Created new controller to handle multipart/form-data photo uploads.
  • [bin/server.dart]: Mounted media route and configured shelf_static to serve uploaded images.
Git Commit Tag: ispana-api-v1.0.0a11
a10 2026-04-21

Focus: Landmark Model Re-Architecture & Draft System Support

  • [landmark_model.dart]: Removed directional properties, introduced connectedPortIds array.
  • [vendor_remote_data_source.dart]: Implemented data_landmark_drafts collection management.
  • [vendor_gis_logic.dart]: Implemented draft resolution logic to merge approved network changes.
Git Commit Tag: ispana-api-v1.0.0a10
a9 2026-04-05

Focus: Router Operations Reliability - FreeRADIUS Sync Failure Handling

  • [VendorNetworkLogic]: Wrapped RadiusService.syncRouters() calls in try-catch blocks.
  • Bug Fix: Router CRUD operations now succeed even when FreeRADIUS service is inactive.
  • Impact: Eliminates snackbar errors while preserving database consistency.
Git Commit Tag: ispana-api-v1.0.0a9
a8 2026-04-02

Focus: Feature Rollback & Abortion (Check Pipeline)

  • [VendorController]: Removed specialized diagnostic routes and _getRouterStatus handler.
  • [VendorRemoteDataSource]: Removed addRadiusLog and updateRouterLastSeen methods.
  • [VendorNetworkLogic]: Removed diagnostic logging integration.
Git Commit Tag: ispana-api-v1.0.0a8
a7 2026-04-02

Focus: MikroTik-Friendly Pulse & Heartbeat

  • [VendorController]: Added RESTful route support for /vendor/radius/nas/ip/<ip>.
  • [_getNASInfo]: Refactored to support both query parameters and path parameters.
Git Commit Tag: ispana-api-v1.0.0a7
a6 2026-04-02

Focus: RADIUS Diagnostics & Structured Logging

  • [VendorRemoteDataSource]: Implemented addRadiusLog to record historical NAS check-in events.
  • [VendorNetworkLogic]: Integrated logic to automatically log hits when a router is seen by RADIUS bridge.
Git Commit Tag: ispana-api-v1.0.0a6
a5 2026-03-31

Focus: Vendor Repository Architectural Refactoring

  • [VendorRepositoryImpl]: Refactored to delegate Network and GIS logic to internal helpers.
  • [VendorNetworkLogic]: Encapsulates Router, VPN, and PPPoE Profile management logic.
  • [VendorGisLogic]: Encapsulates Landmark and Map-related data management.
  • [AuthHelper]: Integrated for centralized password hashing and TokenID generation.
Git Commit Tag: ispana-api-v1.0.0a5
a4 2026-03-31

Focus: Repository Refactoring & Utility Extraction

  • [AuthHelper]: Created a central utility for hashing, password generation, and Token ID orchestration.
  • [AuthRepositoryImpl]: Refactored internally to use AuthHelper.
Git Commit Tag: ispana-api-v1.0.0a4
a3 2026-03-31

Focus: API Documentation & Flexible Auth Identifiers

  • [README.md]: Developed a complete API reference, endpoint registry, and local setup guide.
  • [auth]: Updated AuthRepositoryImpl and AuthController to allow login via both Email and Token ID.
Git Commit Tag: ispana-api-v1.0.0a3
a2 2026-03-30

Focus: System Configuration & Feature Isolation

  • [system]: Created system_configs collection, implemented GET /v1/system/version and POST /v1/system/version.
  • [server.dart]: Registered SystemController routes.
Git Commit Tag: ispana-api-v1.0.0a2
a1 2026-03-30

Focus: Project Initialization & Core Architecture

  • Initial project baseline.
  • Set up clean architecture folders.
  • Implemented core auth features (OTP, JWT, Registry).
Git Commit Tag: ispana-api-v1.0.0a1