Advanced Search
Search Results
200 total results found
Additional resources
Official Documentation Angular Documentation Angular Material RxJS TypeScript Key Dependencies Documentation Socket.io Client ApexCharts SweetAlert2 Google Maps JavaScript API Learning Resources Angular Tutorial Angular University RxJ...
Project Overview
OnMarket Landing API is a comprehensive e-commerce backend framework built with Node.js and Express.js. It provides a complete marketplace solution with multi-vendor support, affiliate marketing, payment processing, order management, and real-time chat functio...
Architecture
Application Architecture ┌─────────────────────────────────────────────────────────┐ │ Client Applications │ │ (Web, Mobile, Third-party APIs) │ └────────────────────┬────────────────────────────────...
Getting started
Prerequisites Node.js: v14.x or higher (LTS recommended) npm: v6.x or higher (comes with Node.js) PostgreSQL: v12.x or higher MongoDB: v4.x or higher Redis: v6.x or higher Minio (optional): For S3-compatible object storage Installation Steps Clone th...
Environment Configuration
Required Environment Variables Create a .env file in the root directory with the following variables: # Application ENV=DEVELOPMENT # or PRODUCTION API_PORT=3610 BASE_DOMAIN=https://api.yourdomain.com ORIGIN_CORS=https://yourdomain.com # Directory Configurat...
Database Setup
PostgreSQL Setup Create Database CREATE DATABASE onmarket_db; CREATE USER onmarket_user WITH ENCRYPTED PASSWORD 'your_password'; GRANT ALL PRIVILEGES ON DATABASE onmarket_db TO onmarket_user; Database Models The application uses Sequelize ORM with auto-sy...
Project structure
on-market-landing-api/ │ ├── config/ # Configuration files │ ├── api.js # API endpoint configurations │ ├── bull.js # Bull queue configuration │ ├── db.js # Database configuration...
Core modules
1. Store Management Store registration and activation Store profile management Store schedule configuration Online/offline status Store front customization Key Files: controller/store.controller.js router/store.routes.js model/store.model.js 2. Produ...
API Documentation
Interactive API Documentation When running in DEVELOPMENT mode, access interactive API documentation at: http://localhost:3610/api/kitab-suci This uses Scalar API Reference with the OpenAPI 3.0 specification defined in docs/openapi.json. Authentication Method...
Authentication & Authorization
JWT Authentication Login Flow User authenticates through external auth service Receives JWT token Token contains: user_id, username, store_id (if applicable) Token Usage // Token verification in middleware const token = req.headers.authorization?.split('...
Features & Integrations
1. Three-Level Referral System Purpose: Incentivize user acquisition through multi-level referral bonuses. Structure: Level 1: 20% bonus from product price Level 2: 20% bonus from product price Level 3: 20% bonus from product price Implementation: See REFER...
Scheduled Tasks
The application runs several scheduled tasks defined in schedulers/scheduledTask.js: 1. Update Invoice Status Schedule: Every 5 minutes Purpose: Check and update expired payment invoices scheduledTask.updateInvoiceStatus(); 2. Clear Temp Folder Schedule: Dail...
WebSocket and payment integration
WebSocket/Real-time Features Socket.IO Implementation Server Setup (in index.js): const server = http.createServer(app); const io = socketIo(server, { cors: { origin: "*" } }); handleChat(io); Chat System Features: Real-time messaging between buyers and se...
File Upload & Storage
Multer Configuration Local Storage (temporary): // config/multer.js const storage = multer.diskStorage({ destination: (req, file, cb) => { cb(null, req.tempFolder); // Dynamic temp folder }, filename: (req, file, cb) => { cb(null, `${Date.now()}...
Testing and deployment
Testing Current Test Setup The project currently has limited automated tests. Main test file: referral_system_test.js - Tests for referral system calculations Running Tests npm test Manual Testing Use Postman/Insomnia Import OpenAPI spec from docs/opena...
Troubleshooting
Common Issues 1. Database Connection Errors Problem: Cannot connect to PostgreSQL/MongoDB ERROR NOT CONNECTED to the database! Solutions: Verify database is running Check connection credentials in .env Ensure firewall allows database port Check database hos...
Best practices
Code Organization Follow MVC Pattern Models: Data structures and database operations Controllers: Business logic and request handling Routes: Endpoint definitions Use Middleware Chains Authentication → Validation → Business Logic Keep middleware focused...
Additional Resources
Related Documentation GoSend Integration Guide Referral System Guide OpenAPI Specification External Documentation Core Technologies Node.js Documentation Express.js Guide Sequelize ORM Mongoose ODM Databases PostgreSQL Documentation Mongo...
Appendix
Environment Variable Reference Variable Type Required Description ENV string Yes Environment (DEVELOPMENT/PRODUCTION) API_PORT number Yes Server port (default: 3610) BASE_DOMAIN string Yes API base URL DB_HOST string Yes PostgreSQL host DB_PORT ...
Create waybill
Untuk membuat pengiriman, silahkan login kemudian klik tombol Buat Kiriman yang ada di pojok kanan atas atau pilih Waybill kemudian klik Create Waybill Silahkan isi nama, nomor telpon, dan alamat pengirim dan penerima. Alamat pengirim sudah di isi otomatis ...