Advanced Search
Search Results
200 total results found
Core Features
1. Waybill Management Create Waybills - Generate shipping labels with unique AWB (Air Waybill) numbers Edit Waybills - Modify shipment details before dispatch Track Waybills - Real-time tracking with status updates Multi-AWB Operations - Batch operations ...
Directory Structure
ondelivery-api/ ├── ondeliv-backend.js # Main application entry point ├── package.json # Dependencies and scripts ├── README.md # Basic project information ├── BACKEND_DOCUMENTATION.md # This file │ ├── app/ ...
Database Architecture
The application uses two PostgreSQL databases: OSAS Database (Primary) Main operational database Contains waybills, scans, users, partners, etc. ONMART Database (Secondary) Marketplace-specific operations Separate schema for marketplace data Key Data...
Authentication and security
Authentication Methods 1. JWT Token Authentication (Primary) Usage: Protected API endpoints for authenticated users Implementation: Middleware: authJwt.verifyToken Header: Authorization: Bearer <token> Token includes: id, agentId, username, role, location_i...
API Endpoints
Authentication Endpoints Method Endpoint Auth Description POST /api/auth/signup None Register new user POST /api/auth/signin None Login and get JWT token GET /api/auth/profile JWT Get user profile GET /api/auth/agents JWT List all agents Waybil...
Courier Partner Integrations
Supported Courier Partners The system integrates with multiple courier partners in Indonesia: 1. JNE (Jalur Nugraha Ekakurir) Features: Status webhook integration Status code mapping to internal codes Real-time tracking updates Controller: app/controllers/3p...
External API Integrations
Configured External APIs 1. Agent Management System Purpose: Manage agent locations and configurations Configuration: Base URL: API_URL_AGENT_ONAGENT Authentication: JWT token Usage: Agent CRUD operations 2. User State Management Purpose: Track user session...
Environment Variables
Required Environment Variables Database Configuration # PostgreSQL - OSAS Database DB_HOST=localhost DB_PORT=5432 DB_USER=postgres DB_PASSWORD=your_password DBS=osas_db DB_DIALECT=postgres # Connection Pool DB_POOL_MAX=5 DB_POOL_MIN=0 DB_POOL_ACQUIRE=30000 DB...
Development Guidelines
Code Structure Conventions Controller Pattern // controllers/<feature>/<feature>.controller.js exports.functionName = async (req, res) => { try { // 1. Extract parameters const { param1, param2 } = req.body; // 2. Validate input (AJV schema...
Troubleshooting
Common Issues and Solutions 1. Database Connection Failed Error: Unable to connect Osas database: SequelizeConnectionError Solutions: Check PostgreSQL is running: systemctl status postgresql Verify database credentials in .env Ensure database exists: psql ...
Additional Resources
Key Files for Reference ondeliv-backend.js - Main application entry point app/models/index.js - Database model aggregation app/middleware/authJwt.js - Authentication logic app/utility/check-fee.util.js - Fee calculation logic app/utility/waybill.util.js ...
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...
Starting the project
Prerequisites Node.js (v14+ recommended) npm (v6+ recommended) Angular CLI (npm install -g @angular/cli) Installation Clone the repository git clone <repository-url> cd ondelivery-dash Install dependencies npm install Configure API endpoints Edit...
Project Architecture
Directory Structure src/ ├── app/ │ ├── account-management/ # Account operations │ ├── admin-menu/ # Admin navigation │ ├── finance-management/ # Financial operations │ ├── home/ # Dashboard/home page │ ...
Authentication and security
Authentication Flow Login (/login) User submits credentials API returns JWT token Token stored in localStorage as jwt User details and roles stored in localStorage Token Management JWT token sent with every API request via Authorization header Token v...
Application modules
The application consists of 27+ feature modules, each handling specific business functionality: Core Modules 1. Home Module (/home) Dashboard with key metrics and statistics Quick access to frequently used features Real-time notifications and alerts 2. Login...
Services & API Integration
Main API Service (api.service.ts) The central service for API communication with the backend. Key Methods: getUser(username, password) - User authentication getUserDetails() - Fetch user profile guardianTokens() - Validate JWT token Common HTTP methods wit...
Routing & Navigation
Route Configuration All routes are defined in app.routing.ts with lazy loading for performance. Main Routes Route Module Access / Redirect to /login Public /login LoginComponent Public /profile ProfileComponent Authenticated /home HomeModule Authe...
UI Components & Styling
Layout System The application uses Angular Flex Layout for responsive design: Flexbox-based layouts Responsive breakpoints Dynamic layout changes CSS Framework Bootstrap 5.3.2 provides: Grid system Utility classes Responsive components Form controls Angula...
State Management
LocalStorage The application uses browser localStorage for state persistence: Stored Data: jwt - JWT authentication token agentID - Current user/agent ID role - User roles (JSON array) username - Username Other session-specific data Observable Pattern (R...