Getting started

Introduction

Project Overview

OnDelivery Dashboard is a comprehensive web-based logistics and delivery management system built with Angular. The application provides a complete suite of tools for managing deliveries, tracking packages, monitoring couriers, handling returns, and generating reports.

Key Features


Technology Stack

Core Framework

UI & Styling

Additional Libraries

Development Tools

Starting the project

Prerequisites

Installation

  1. Clone the repository
git clone <repository-url>
cd ondelivery-dash
  1. Install dependencies
npm install
  1. Configure API endpoints Edit src/app/addrezz.ts to set the appropriate API endpoints:
export const OSAS_API = "https://testapi.ondelivery.id";
export const BOOKING_API = "https://demoapisat.ondelivery.id";
export const USAPI_API = "http://localhost:3621";

Running the Application

Development Server

npm start
# or
ng serve

Navigate to http://localhost:4200/. The app will automatically reload on file changes.

Production Build

npm run build

Build artifacts are stored in the dist/ directory with output hashing for cache busting.

Development Build

npm run build-dev

Builds without production optimizations.

Run Tests

npm test

Run Linter

npm run lint

Project Architecture

Directory Structure

src/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ account-management/       # Account operations
β”‚   β”œβ”€β”€ admin-menu/                # Admin navigation
β”‚   β”œβ”€β”€ finance-management/        # Financial operations
β”‚   β”œβ”€β”€ home/                      # Dashboard/home page
β”‚   β”œβ”€β”€ incoming-scan/             # Incoming package scanning
β”‚   β”œβ”€β”€ indopaket/                 # Regional package handling
β”‚   β”œβ”€β”€ layouts/                   # Layout components (header, sidebar, breadcrumb)
β”‚   β”œβ”€β”€ login/                     # Authentication
β”‚   β”œβ”€β”€ manifest/                  # Manifest management
β”‚   β”œβ”€β”€ manual-handling/           # Manual handling operations
β”‚   β”œβ”€β”€ marketplace/               # Marketplace integration
β”‚   β”œβ”€β”€ material-component/        # Material Design wrappers
β”‚   β”œβ”€β”€ mitra-courier/             # Courier partner management
β”‚   β”œβ”€β”€ modal/                     # Modal dialogs
β”‚   β”œβ”€β”€ models/                    # Data models
β”‚   β”œβ”€β”€ monitoring-booking/        # Booking monitoring
β”‚   β”œβ”€β”€ monitoring-courier/        # Courier monitoring
β”‚   β”œβ”€β”€ notification/              # Notification system
β”‚   β”œβ”€β”€ outgoing-scan/             # Outgoing package scanning
β”‚   β”œβ”€β”€ package-return/            # Package returns
β”‚   β”œβ”€β”€ package-return-handling/   # Return processing
β”‚   β”œβ”€β”€ pod-approval/              # Proof of Delivery approval
β”‚   β”œβ”€β”€ profile/                   # User profile
β”‚   β”œβ”€β”€ reports/                   # Standard reports
β”‚   β”œβ”€β”€ reports-dc/                # Distribution center reports
β”‚   β”œβ”€β”€ saldo/                     # Account balance
β”‚   β”œβ”€β”€ services/                  # Business logic services
β”‚   β”œβ”€β”€ shared/                    # Shared utilities and components
β”‚   β”œβ”€β”€ tariff/                    # Pricing and tariff
β”‚   β”œβ”€β”€ tracking/                  # Package tracking
β”‚   β”œβ”€β”€ trucking/                  # Trucking operations
β”‚   β”œβ”€β”€ user-manage/               # User management
β”‚   β”œβ”€β”€ waybill/                   # Waybill management
β”‚   β”œβ”€β”€ api.service.ts             # Main API service
β”‚   β”œβ”€β”€ auth.guard.ts              # Authentication guard
β”‚   β”œβ”€β”€ role.guard.ts              # Role-based authorization guard
β”‚   β”œβ”€β”€ app.module.ts              # Root module
β”‚   └── app.routing.ts             # Routing configuration
β”œβ”€β”€ assets/                        # Static assets (images, icons)
β”œβ”€β”€ environments/                  # Environment configurations
└── index.html                     # Main HTML file

Architecture Pattern

The application follows Angular's module-based architecture:

  1. Root Module (app.module.ts) - Core module with essential dependencies
  2. Feature Modules - Lazy-loaded modules for each feature area
  3. Shared Module - Reusable components and utilities
  4. Services - Business logic and API communication
  5. Guards - Route protection and authorization
  6. Models - TypeScript interfaces for data structures

Module Loading Strategy