Full Stack Application2024 On Hold

Seblak Bombom - Full-Stack E-Commerce Platform for Food Delivery

A comprehensive food ordering and delivery management system built with Go + Fiber (Backend) and Nuxt.js 3 + Tailwind CSS (Frontend), featuring Xendit payment integration, real-time notifications, and complete business management tools.

Go 1.22Fiber v2Nuxt.js 3Tailwind CSSMySQL 5.7GORMXendit Payment GatewayPiniaHeadless UIDockerViperLogrusPusher (Real-time)
Seblak Bombom - Full-Stack E-Commerce Platform for Food Delivery

๐Ÿœ Seblak Bombom - Full-Stack E-Commerce Platform

A production-ready, feature-rich food ordering and delivery management system designed to digitalize traditional food business operations. This project was born from real-world observation of a friend's "seblak" (Indonesian spicy dish) business, transforming manual processes into a modern, automated platform.

๐ŸŽฏ Project Overview

Seblak Bombom is a complete business management solution that bridges the gap between traditional food service and modern e-commerce expectations. It handles everything from customer ordering to payment processing, delivery tracking, and business analytics.

๐ŸŒŸ The Story Behind

Starting from observing my friend's traditional food business, I identified key pain points: manual order management, payment tracking challenges, delivery coordination issues, and lack of customer engagement tools. This inspired me to create an end-to-end solution that automates these processes while maintaining the personal touch of a local business.

Project Status Note: This project was developed as a commissioned work but is currently on hold due to lack of client support and follow-through. Despite this, the platform is partial functional and serves as a comprehensive showcase of full-stack development capabilities with modern technologies.

โœจ Key Features

๐Ÿ›’ Complete E-Commerce System

Customer Experience:

  • ๐Ÿ“ฑ Modern Shopping Interface: Intuitive product browsing with categories and filters
  • ๐Ÿ›๏ธ Shopping Cart Management: Add, update, and remove items seamlessly
  • ๐Ÿ’ณ Multiple Payment Options:
    • Online payments via Xendit (QR Code, E-wallet)
    • Cash on Delivery (COD)
    • Wallet system for repeat customers
  • ๐Ÿ“ฆ Order Tracking: Real-time order status updates
  • โญ Product Reviews: Rate and review products after delivery
  • ๐Ÿ”” Real-time Notifications: Instant updates via Pusher
  • ๐Ÿ“ Address Management: Save multiple delivery addresses

Product Management:

  • ๐Ÿท๏ธ Category Organization: Structured product catalog
  • ๐Ÿ“ธ Multi-Image Support: Multiple product photos
  • ๐Ÿ’ฐ Flexible Pricing: Product variants and options
  • ๐Ÿ“Š Stock Management: Real-time inventory tracking
  • ๐ŸŽซ Discount Coupons: Create and manage promotional codes

๐Ÿ’ณ Advanced Payment Integration

Xendit Payment Gateway:

  • โœ… QR Code Payments: QRIS, DANA, LinkAja support
  • โœ… Automatic Payment Verification: Webhook callbacks for status updates
  • โœ… Payment Expiration Handling: Auto-cancel expired transactions
  • โœ… Payment History: Complete transaction records
  • โœ… Refund Support: Handle customer refunds seamlessly

Wallet System:

  • ๐Ÿ’ฐ Customer Wallets: Store balance for future orders
  • ๐Ÿ’ธ Withdrawal Requests: Customers can request payout
  • ๐Ÿฆ Admin Payouts: Process withdrawals via Xendit
  • ๐Ÿ“Š Transaction History: Complete audit trail

๐Ÿšš Delivery Management

Smart Delivery System:

  • ๐Ÿ“ Distance-Based Pricing: Automatic delivery cost calculation (per km)
  • ๐Ÿ—บ๏ธ Address Verification: Complete address with coordinates
  • ๐Ÿ“ฆ Delivery Status Tracking:
    • Order Pending
    • Processing
    • On Delivery
    • Delivered
    • Cancelled
  • ๐Ÿšด Delivery Fee Configuration: Admin-configurable rates
  • ๐Ÿ“ฑ Delivery Notifications: Real-time updates to customers

๐Ÿ‘ฅ User Management & Authentication

Secure Access Control:

  • ๐Ÿ” JWT Authentication: Token-based secure authentication
  • ๐Ÿ‘ค Role-Based Access: Customer, Admin roles
  • ๐Ÿ“ง Email Notifications: Order confirmations, status updates
  • ๐Ÿ”‘ Password Security: bcrypt hashing
  • ๐Ÿ“ User Profiles: Manage personal information
  • ๐Ÿ›ก๏ธ Admin Protection: API key for admin creation

๐Ÿ“Š Business Analytics & Reporting

Admin Dashboard Features:

  • ๐Ÿ“ˆ Sales Reports: Revenue tracking and analytics
  • ๐Ÿ“Š Order Statistics: Daily, weekly, monthly reports
  • ๐Ÿ‘ฅ Customer Insights: User behavior analysis
  • ๐Ÿ’ต Financial Overview: Income, expenses, withdrawals
  • ๐Ÿ“ฆ Inventory Reports: Stock levels and alerts
  • ๐ŸŽซ Coupon Performance: Discount code usage statistics

๐Ÿ”” Real-Time Features

Live Updates with Pusher:

  • โšก Order Notifications: Instant alerts for new orders
  • ๐Ÿ“ฑ Status Updates: Real-time delivery progress
  • ๐Ÿ’ฌ Admin Alerts: Payment confirmations, cancellations
  • ๐Ÿ”„ Auto-Refresh: Dynamic data updates without page reload

๐Ÿ—๏ธ Technical Architecture

Backend Architecture (Go + Fiber)

Backend ArchitectureBackend Architecture

Clean Architecture Layers

1. Entity Layer (Domain Models)

// Core business entities
- User, Order, Product, Payment
- Cart, Address, Delivery, Review
- Xendit Transaction, Wallet

2. Repository Layer (Data Access)

// Database operations abstraction
- GORM implementations
- Transaction management
- Query optimization

3. Use Case Layer (Business Logic)

// Core business operations
- Order processing workflow
- Payment verification logic
- Delivery cost calculation
- Wallet balance management

4. Delivery Layer (HTTP Controllers)

// API endpoints
- RESTful route handlers
- Request/Response mapping
- Middleware integration

Frontend Architecture (Nuxt.js 3)

Frontend ArchitectureFrontend Architecture

๐Ÿ—„๏ธ Database Schema

Core Tables

-- Users & Authentication
users
โ”œโ”€โ”€ id (PRIMARY KEY)
โ”œโ”€โ”€ name, email, password
โ”œโ”€โ”€ phone, role (customer/admin)
โ”œโ”€โ”€ email_verified
โ”œโ”€โ”€ created_at, updated_at

-- Products & Categories
categories
โ”œโ”€โ”€ id, name, description
โ”œโ”€โ”€ image_url
โ””โ”€โ”€ is_active

products
โ”œโ”€โ”€ id, category_id (FK)
โ”œโ”€โ”€ name, description, price
โ”œโ”€โ”€ stock, is_available
โ”œโ”€โ”€ created_at, updated_at

images
โ”œโ”€โ”€ id, product_id (FK)
โ”œโ”€โ”€ image_url, display_order

-- Shopping & Orders
carts
โ”œโ”€โ”€ id, user_id (FK)
โ”œโ”€โ”€ product_id (FK)
โ”œโ”€โ”€ quantity, subtotal

orders
โ”œโ”€โ”€ id, user_id (FK)
โ”œโ”€โ”€ invoice_number
โ”œโ”€โ”€ payment_method, payment_status
โ”œโ”€โ”€ order_status, delivery_status
โ”œโ”€โ”€ total_price, delivery_cost
โ”œโ”€โ”€ address_id (FK)
โ””โ”€โ”€ created_at, updated_at

order_products
โ”œโ”€โ”€ id, order_id (FK)
โ”œโ”€โ”€ product_id (FK)
โ”œโ”€โ”€ quantity, price, subtotal

-- Payments
xendit_transactions
โ”œโ”€โ”€ id, order_id (FK)
โ”œโ”€โ”€ payment_method_id
โ”œโ”€โ”€ amount, currency, status
โ”œโ”€โ”€ qr_string (for QR payments)
โ”œโ”€โ”€ expires_at, created_at

wallets
โ”œโ”€โ”€ id, user_id (FK)
โ”œโ”€โ”€ balance
โ”œโ”€โ”€ last_transaction_at

xendit_payouts
โ”œโ”€โ”€ id, user_id (FK)
โ”œโ”€โ”€ reference_id, amount
โ”œโ”€โ”€ account_number, account_holder_name
โ”œโ”€โ”€ status, channel_code
โ””โ”€โ”€ estimated_arrival

-- Delivery & Addresses
addresses
โ”œโ”€โ”€ id, user_id (FK)
โ”œโ”€โ”€ label (Home/Office)
โ”œโ”€โ”€ complete_address
โ”œโ”€โ”€ latitude, longitude
โ”œโ”€โ”€ is_default

deliveries
โ”œโ”€โ”€ id, name
โ”œโ”€โ”€ price_per_km
โ”œโ”€โ”€ is_active

-- Reviews & Ratings
product_reviews
โ”œโ”€โ”€ id, product_id (FK)
โ”œโ”€โ”€ user_id (FK)
โ”œโ”€โ”€ rating (1-5)
โ”œโ”€โ”€ review_text, created_at

-- Discount & Promotions
discount_coupons
โ”œโ”€โ”€ id, code (unique)
โ”œโ”€โ”€ discount_type (percentage/fixed)
โ”œโ”€โ”€ discount_value, max_discount
โ”œโ”€โ”€ min_purchase, max_usage
โ”œโ”€โ”€ start_date, end_date

-- Notifications
notifications
โ”œโ”€โ”€ id, user_id (FK)
โ”œโ”€โ”€ title, message
โ”œโ”€โ”€ type, is_read
โ””โ”€โ”€ created_at

-- Admin Settings
applications
โ”œโ”€โ”€ id, key, value
โ””โ”€โ”€ description

๐Ÿš€ Key Technical Implementations

1. Xendit Payment Flow

// Order Creation with Payment
1. Customer creates order
2. System calculates total (products + delivery - discount)
3. If payment_method = XENDIT:
   - Create Xendit Payment Request
   - Generate QR Code
   - Set expiration time
   - Return QR to customer
4. Customer scans QR and pays
5. Xendit sends webhook callback
6. System verifies callback token
7. Update order payment status
8. Send notification to admin
9. Email receipt to customer

Implementation Highlights:

// Xendit QR Code Generation
func (uc *XenditTransactionQRCodeUseCase) Add(
    ctx *fiber.Ctx, 
    request *model.CreateXenditTransaction,
) (*model.XenditTransactionResponse, error) {
    // Create payment request with basket items
    paymentRequest := payment_request.CreatePaymentRequest{
        Amount:      amount,
        Currency:    "IDR",
        ReferenceId: fmt.Sprintf("ORDER-%d", orderId),
        PaymentMethod: payment_request.PaymentMethodParameters{
            Type: "QR_CODE",
            QrCode: &payment_request.QRCodeParameters{
                ChannelCode: request.ChannelCode, // DANA, LINKAJA
            },
        },
        Metadata: orderMetadata,
    }
    
    // Execute Xendit API call
    resp, err := xenditClient.PaymentRequestApi.
        CreatePaymentRequest(ctx.Context()).
        CreatePaymentRequest(paymentRequest).
        Execute()
    
    // Store transaction in database
    // Return QR string to frontend
}

2. Real-Time Notifications with Pusher

// Send order notification to admin
func (uc *OrderUseCase) NotifyNewOrder(order *entity.Order) {
    pusherClient.Trigger("orders-channel", "new-order", fiber.Map{
        "order_id":      order.ID,
        "customer_name": order.User.Name,
        "total_price":   order.TotalFinalPrice,
        "timestamp":     time.Now(),
    })
}

Frontend Integration (Nuxt.js 3):

// Nuxt composable: Subscribe to Pusher channel
export const usePusher = () => {
    const config = useRuntimeConfig()
    const pusher = new Pusher(config.public.pusherKey, {
        cluster: config.public.pusherCluster
    })

    const subscribeToOrders = (callback) => {
        const channel = pusher.subscribe('orders-channel')
        channel.bind('new-order', (data) => {
            // Show notification using Nuxt toast
            useToast().success(`New order from ${data.customer_name}!`)
            // Execute callback (e.g., refresh orders)
            callback(data)
        })
    }

    return { subscribeToOrders }
}

// Usage in component:
const { subscribeToOrders } = usePusher()
const orderStore = useOrderStore()

subscribeToOrders((data) => {
    orderStore.fetchOrders()
});

3. Distance-Based Delivery Calculation

// Calculate delivery cost based on distance
func (uc *OrderUseCase) CalculateDeliveryCost(
    userAddress *entity.Address,
    storeLocation *Location,
) (float32, error) {
    // Haversine formula for distance calculation
    distance := calculateDistance(
        userAddress.Latitude, 
        userAddress.Longitude,
        storeLocation.Lat, 
        storeLocation.Lng,
    )
    
    // Get delivery rate per km
    deliveryRate := getActiveDeliveryRate()
    
    // Calculate final cost
    deliveryCost := distance * deliveryRate.PricePerKm
    
    return deliveryCost, nil
}

4. Shopping Cart Management

// Add item to cart with validation
func (uc *CartUseCase) AddToCart(
    userId uint64,
    productId uint64,
    quantity int,
) error {
    // Check product availability
    product, err := productRepo.FindById(productId)
    if product.Stock < quantity {
        return errors.New("insufficient stock")
    }
    
    // Check existing cart item
    existingItem := cartRepo.FindByUserAndProduct(userId, productId)
    if existingItem != nil {
        // Update quantity
        existingItem.Quantity += quantity
        cartRepo.Update(existingItem)
    } else {
        // Create new cart item
        cartItem := &entity.Cart{
            UserID:    userId,
            ProductID: productId,
            Quantity:  quantity,
            Subtotal:  product.Price * float32(quantity),
        }
        cartRepo.Create(cartItem)
    }
    
    return nil
}

5. Wallet & Payout System

// Customer withdrawal request
func (uc *WalletUseCase) WithdrawRequest(
    userId uint64,
    amount float32,
    accountNumber string,
) error {
    // Check wallet balance
    wallet := walletRepo.FindByUserId(userId)
    if wallet.Balance < amount {
        return errors.New("insufficient balance")
    }
    
    // Create payout request via Xendit
    xenditPayout := &model.CreateXenditPayout{
        UserId:            userId,
        Amount:            amount,
        Currency:          "IDR",
        ChannelCode:       "BCA", // Bank code
        AccountNumber:     accountNumber,
        AccountHolderName: user.Name,
        Description:       "Wallet Withdrawal",
    }
    
    // Execute payout
    payoutResp, err := xenditPayoutUseCase.AddPayout(xenditPayout)
    
    // Deduct from wallet
    wallet.Balance -= amount
    walletRepo.Update(wallet)
    
    return nil
}

๐Ÿ“Š API Endpoints Overview

Public Endpoints

# Authentication
POST   /api/users/login                    # User login
POST   /api/users/register                 # User registration

# Products (Read-only)
GET    /api/products                       # List products
GET    /api/products/:id                   # Product detail
GET    /api/categories                     # List categories

Customer Protected Endpoints (Requires JWT)

# Profile
GET    /api/users/current                  # Get user profile
PATCH  /api/users/current                  # Update profile

# Shopping Cart
POST   /api/carts                          # Add to cart
GET    /api/carts                          # Get cart items
PATCH  /api/carts/cart-items/:id           # Update quantity
DELETE /api/carts/cart-items/:id           # Remove item

# Orders
POST   /api/orders                         # Create order
GET    /api/orders                         # Order history
GET    /api/orders/:id                     # Order detail
PATCH  /api/orders/:id/status              # Update status
GET    /api/orders/:invoiceId/invoice      # Download invoice

# Payments (Xendit)
POST   /api/xendit/orders/qr-code/transaction    # Create QR payment
GET    /api/xendit/orders/:orderId/qr-code/transaction  # Get payment status

# Wallet
POST   /api/wallets/withdraw-cust          # Request withdrawal
GET    /api/wallets/balance                # Get balance

# Addresses
POST   /api/addresses                      # Add address
GET    /api/addresses                      # List addresses
PATCH  /api/addresses/:id                  # Update address
DELETE /api/addresses/:id                  # Delete address

# Reviews
POST   /api/reviews                        # Submit review
GET    /api/products/:id/reviews           # Product reviews

Admin Protected Endpoints (Requires JWT + Admin Role)

# User Management
GET    /api/admin/users                    # List users
GET    /api/admin/users/:id                # User detail
PATCH  /api/admin/users/:id                # Update user

# Product Management
POST   /api/admin/products                 # Create product
PATCH  /api/admin/products/:id             # Update product
DELETE /api/admin/products/:id             # Delete product
POST   /api/admin/products/:id/images      # Upload images

# Category Management
POST   /api/admin/categories               # Create category
PATCH  /api/admin/categories/:id           # Update category
DELETE /api/admin/categories/:id           # Delete category

# Order Management
GET    /api/admin/orders                   # All orders
PATCH  /api/admin/orders/:id/status        # Update order status
POST   /api/admin/orders/:id/cancel        # Cancel order

# Discount Coupons
POST   /api/admin/discount-coupons         # Create coupon
GET    /api/admin/discount-coupons         # List coupons
PATCH  /api/admin/discount-coupons/:id     # Update coupon
DELETE /api/admin/discount-coupons/:id     # Delete coupon

# Delivery Management
POST   /api/admin/deliveries               # Create delivery rate
PATCH  /api/admin/deliveries/:id           # Update rate
DELETE /api/admin/deliveries/:id           # Delete rate

# Payout Management
GET    /api/admin/payouts                  # List payout requests
POST   /api/admin/payouts/:id/approve      # Approve payout
POST   /api/admin/payouts/:id/reject       # Reject payout

# Reports & Analytics
GET    /api/admin/reports/sales            # Sales report
GET    /api/admin/reports/products         # Product statistics
GET    /api/admin/reports/customers        # Customer insights

# Xendit Admin
GET    /api/admin/xendit/balance           # Check Xendit balance
GET    /api/admin/xendit/payout-request/:id # Payout detail
POST   /api/admin/xendit/payout-request/:id/cancel # Cancel payout

Webhook Endpoints (Xendit Callbacks)

POST   /api/xendits/payment-request/notifications/callback  # Payment callback
POST   /api/xendits/payout-request/notifications/callback   # Payout callback

๐Ÿ› ๏ธ Tech Stack Deep Dive

Backend Technologies

Go 1.22

  • High-performance compiled language
  • Excellent concurrency with goroutines
  • Strong standard library
  • Fast compilation and execution

Fiber v2

  • Express-inspired web framework
  • Fastest Go web framework
  • Low memory footprint
  • Built on Fasthttp

GORM v2

  • Feature-rich ORM
  • Auto migrations support
  • Associations and relations
  • Hooks and callbacks
  • Transaction management

MySQL 5.7

  • Reliable RDBMS
  • ACID compliance
  • Full-text search
  • JSON column support

Xendit Go SDK

  • Payment gateway integration
  • QR Code payments
  • Bank transfer support
  • Payout/withdrawal handling
  • Webhook verification

Frontend Technologies

Nuxt.js 3

  • Vue 3-based framework
  • Server-Side Rendering (SSR)
  • Auto-import components
  • File-based routing
  • SEO optimization
  • Built-in performance optimizations

Tailwind CSS

  • Utility-first CSS framework
  • Responsive design system
  • Custom design tokens
  • JIT (Just-In-Time) compiler
  • Dark mode support
  • Purge CSS for production

Headless UI

  • Unstyled accessible components
  • Full keyboard navigation
  • ARIA attributes built-in
  • Transitions & animations
  • Modal, Dropdown, Menu components
  • Tailwind CSS integration

Pinia

  • Vue 3 state management
  • TypeScript support
  • Devtools integration
  • Modular store design
  • Simple API (no mutations)
  • Server-side rendering compatible

Nuxt Modules & Libraries

  • @nuxtjs/tailwindcss - Tailwind integration
  • @pinia/nuxt - State management
  • @vueuse/nuxt - Vue composition utilities
  • nuxt-icon - Icon system

DevOps & Tools

Docker

  • Containerization
  • Multi-stage builds
  • Docker Compose for orchestration
  • Volume mounting for development

Viper

  • Configuration management
  • Multiple config sources
  • Environment variables
  • Hot reload support

Logrus

  • Structured logging
  • Multiple log levels
  • JSON output
  • Hook system

Pusher

  • Real-time WebSocket communication
  • Channel-based messaging
  • Presence detection
  • Client libraries

Ngrok (Development)

  • Tunnel local server to internet
  • Required for Xendit webhooks testing
  • HTTPS support

๐Ÿš€ Getting Started

Prerequisites

# Backend
- Go 1.22+
- MySQL 5.7+
- Docker (optional)

# Frontend
- Node.js 18+
- npm or yarn or pnpm

Backend Installation

1. Clone Repository

git clone https://github.com/fauzan05/seblak-bombom-restful-api.git
cd seblak-bombom-restful-api

2. Install Dependencies

go mod download
go mod tidy

3. Configure Application

# Copy example config
cp .env.example .env

# Edit configuration
nano .env

Important Environment Variables:

# Database
DB_HOST=localhost
DB_PORT=3306
DB_USER=root
DB_PASSWORD=your_password
DB_NAME=seblak_bombom

# JWT
JWT_SECRET=your-secret-key
JWT_EXPIRE=24h

# Xendit
XENDIT_SECRET_KEY=xnd_development_...
XENDIT_PUBLIC_KEY=xnd_public_development_...
XENDIT_CALLBACK_TOKEN=your_callback_token
XENDIT_BUSINESS_ID=your_business_id

# Pusher
PUSHER_APP_ID=your_app_id
PUSHER_KEY=your_key
PUSHER_SECRET=your_secret
PUSHER_CLUSTER=ap1

# Email (Optional)
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USERNAME=your-email@gmail.com
SMTP_PASSWORD=your-app-password

# Frontend URL (for CORS)
FRONTEND_URL=http://localhost:3000

# Admin Creation Key
ADMIN_CREATION_KEY=your-secret-admin-key

4. Setup Database

# Create database
mysql -u root -p -e "CREATE DATABASE seblak_bombom"

# Run migrations
migrate -database "mysql://root:password@tcp(localhost:3306)/seblak_bombom" \
        -path database/migrations up

# Or import SQL file
mysql -u root -p seblak_bombom < init.sql

5. Run Application

# Development mode (hot reload)
go run app/main.go

# Or build and run
go build -o bin/seblak-bombom app/main.go
./bin/seblak-bombom

# Using Docker
docker compose up --build

Frontend Installation

1. Clone Frontend Repository

git clone https://github.com/fauzan05/seblak-bombom-api-consumer.git
cd seblak-bombom-api-consumer

2. Install Dependencies

npm install
# or
yarn install

3. Configure Environment

# Create .env file
cat > .env << EOF
NUXT_PUBLIC_API_URL=http://localhost:3000/api
NUXT_PUBLIC_PUSHER_KEY=your_pusher_key
NUXT_PUBLIC_PUSHER_CLUSTER=ap1
EOF

4. Run Development Server

npm run dev
# or
yarn dev
# or
pnpm dev

# Development server will run on http://localhost:3000

5. Build for Production

# Build for production
npm run build
# or
yarn build
# or
pnpm build

# Preview production build
npm run preview

# Generate static site (optional)
npm run generate

Using Docker Compose (Full Stack)

# Create shared network
docker network create seblak-bombom-network

# Start backend
cd seblak-bombom-restful-api
docker compose up -d

# Start frontend
cd ../seblak-bombom-api-consumer
docker compose up -d

๐Ÿงช Testing & Debugging

Testing Xendit Webhooks with Ngrok

# Install ngrok
brew install ngrok  # macOS
# or download from https://ngrok.com/download

# Start your backend server
go run app/main.go

# In another terminal, expose to internet
ngrok http 3000

# Copy the HTTPS URL (e.g., https://abc123.ngrok-free.app)
# Configure Xendit webhook URLs:
# Payment: https://abc123.ngrok-free.app/api/xendits/payment-request/notifications/callback
# Payout: https://abc123.ngrok-free.app/api/xendits/payout-request/notifications/callback

Testing Payment Flow

# 1. Create order with Xendit payment
POST http://localhost:3000/api/orders
Authorization: Bearer <your_jwt_token>
Content-Type: application/json

{
  "user_id": 1,
  "address_id": 1,
  "payment_method": "XENDIT",
  "payment_gateway": "XENDIT",
  "channel_code": "QRIS",
  "is_delivery": true,
  "items": [
    {
      "product_id": 1,
      "quantity": 2
    }
  ]
}

# 2. Get QR Code
GET http://localhost:3000/api/xendit/orders/1/qr-code/transaction
Authorization: Bearer <your_jwt_token>

# 3. Scan QR with QRIS-supported app (DANA, LinkAja, etc.)

# 4. Xendit will send webhook callback to update payment status
# Check order status:
GET http://localhost:3000/api/orders/1

Admin Operations

# 1. Create admin account
POST http://localhost:3000/api/users/register
X-Admin-Key: your-secret-admin-key
Content-Type: application/json

{
  "name": "Admin User",
  "email": "admin@example.com",
  "password": "SecurePass123!",
  "phone": "081234567890",
  "role": "admin"
}

# 2. Login as admin
POST http://localhost:3000/api/users/login
Content-Type: application/json

{
  "email": "admin@example.com",
  "password": "SecurePass123!"
}

# 3. Access admin endpoints with token
GET http://localhost:3000/api/admin/orders
Authorization: Bearer <admin_jwt_token>

Demo Credentials

Customer Account:

  • Email: cust1@email.com
  • Password: Cust1Testing#
  • Features: Browse products, add to cart, create orders, track delivery

Admin Account:

  • Email: admin1@email.com
  • Password: Admin1Testing#
  • Features: Manage products, process orders, handle payouts, view analytics

Important Notes

โš ๏ธ Project Status:

  • This project is currently on hold due to lack of client support
  • Originally developed as a commissioned project for a local food business
  • Fully functional and maintained as a portfolio showcase
  • All features are working and available for testing

โš ๏ธ Demo Limitations:

  • Data is reset periodically for demo purposes
  • Payment testing uses Xendit sandbox mode
  • Some features may have rate limiting
  • Uploaded images may be cleared regularly

โœ… What You Can Test:

  • Complete shopping flow (browse โ†’ cart โ†’ checkout)
  • Multiple payment methods (QR Code, COD, Wallet)
  • Order tracking and status updates
  • Product reviews and ratings
  • Admin dashboard features
  • Real-time notifications

๐Ÿ“ฑ Screenshots & Features Demo

Customer Features

Homepage & Product Catalog

  • Modern, responsive design
  • Category filtering
  • Product search
  • Featured products
  • Quick add to cart

Shopping Cart

  • Real-time price calculation
  • Quantity adjustment
  • Remove items
  • Apply discount coupons
  • Proceed to checkout

Checkout Process

  • Address selection
  • Delivery cost calculation
  • Payment method selection
  • Order summary
  • QR code display for payment

Order Tracking

  • Order history
  • Real-time status updates
  • Order details
  • Download invoice
  • Submit reviews

Admin Features

Dashboard

  • Sales overview
  • Today's orders count
  • Revenue statistics
  • Pending orders alert
  • Recent transactions

Product Management

  • Add/edit products
  • Upload multiple images
  • Set categories
  • Stock management
  • Activate/deactivate products

Order Management

  • All orders list
  • Filter by status
  • Update order status
  • View customer details
  • Process cancellations

Payout Management

  • Withdrawal requests list
  • Approve/reject payouts
  • Xendit balance check
  • Transaction history

๐ŸŽฏ Business Value & Impact

For Food Business Owners

โœ… Operational Efficiency

  • 70% reduction in manual order entry time
  • Automated payment verification
  • Real-time order notifications
  • Simplified delivery coordination

โœ… Financial Management

  • Automated payment tracking
  • Wallet system reduces transaction fees
  • Easy payout processing
  • Comprehensive financial reports

โœ… Customer Experience

  • 24/7 online ordering availability
  • Multiple payment options
  • Real-time order tracking
  • Transparent pricing with delivery costs

โœ… Business Growth

  • Customer review system builds trust
  • Discount coupon system for promotions
  • Analytics for data-driven decisions
  • Scalable architecture for expansion

Technical Achievements

๐Ÿš€ Performance

  • < 100ms average API response time
  • Efficient database queries with GORM
  • Optimized frontend with Nuxt.js 3 SSR
  • Automatic code splitting
  • Image optimization with Nuxt Image
  • Tailwind CSS JIT compilation
  • CDN integration for static assets

๐Ÿ”’ Security

  • JWT-based authentication
  • Password hashing with bcrypt
  • API key protection for admin
  • Xendit webhook verification
  • CORS configuration
  • Input validation with go-playground/validator

๐Ÿ“Š Scalability

  • Clean Architecture for maintainability
  • Microservices-ready structure
  • Database migration system
  • Docker containerization
  • Load balancer ready

๐Ÿ’ก Key Learnings & Challenges

Project Management Lessons

Client Communication Challenge

  • Challenge: Project development completed but client did not continue with deployment
  • Learning: Importance of clear milestone agreements and payment schedules
  • Takeaway: Always secure proper client commitment before extensive development
  • Silver Lining: Built a comprehensive portfolio piece that demonstrates full-stack expertise

What I Would Do Differently:

  • Implement milestone-based development with client checkpoints
  • Secure upfront commitment and deployment timeline
  • Create detailed project requirements document with sign-off
  • Set clearer expectations for client involvement throughout development

Despite the project being on hold, it served as an invaluable learning experience in both technical implementation and client relationship management. The platform remains a testament to modern full-stack development capabilities.

Technical Challenges Overcome

1. Xendit Integration

  • Challenge: Understanding webhook flow and callback verification
  • Solution: Implemented token-based verification and idempotency keys
  • Learning: Always handle webhook retries and duplicate events

2. Real-Time Notifications

  • Challenge: Implementing instant updates without polling
  • Solution: Integrated Pusher for WebSocket communication
  • Learning: Channel-based messaging is more efficient than broadcast

3. Distance-Based Pricing

  • Challenge: Accurate distance calculation from coordinates
  • Solution: Implemented Haversine formula
  • Learning: Consider map API integration for better accuracy

4. Payment Flow Complexity

  • Challenge: Handling multiple payment methods and status updates
  • Solution: State machine pattern for order status management
  • Learning: Always design for idempotency in payment systems

5. Wallet System

  • Challenge: Ensuring transaction consistency and preventing race conditions
  • Solution: Database transactions with proper locking
  • Learning: Financial operations require strict ACID compliance

Best Practices Implemented

โœ… Clean Architecture

  • Separation of concerns
  • Dependency injection
  • Interface-based design
  • Testable code structure

โœ… Error Handling

  • Structured error responses
  • Logging with Logrus
  • Error recovery mechanisms
  • User-friendly error messages

โœ… Security

  • Environment-based configuration
  • Secret management
  • Rate limiting (ready to implement)
  • SQL injection prevention with GORM

โœ… Code Quality

  • Consistent naming conventions
  • Comprehensive comments
  • Git commit messages
  • Code organization

๐Ÿ”ฎ Future Enhancements

Planned Features

Phase 1: Core Improvements

  • SMS notifications for order updates
  • Email notification templates
  • Advanced product search with filters
  • Product variants (size, spice level)
  • Favorite/wishlist feature
  • Order scheduling (pre-order)

Phase 2: Business Features

  • Loyalty points system
  • Referral program
  • Subscription/membership plans
  • Multi-vendor support
  • Driver assignment & tracking
  • Live chat support

Phase 3: Advanced Analytics

  • Sales forecasting
  • Inventory predictions
  • Customer segmentation
  • Marketing campaign tools
  • A/B testing framework
  • Business intelligence dashboard

Phase 4: Technical Upgrades

  • GraphQL API option
  • Caching layer (Redis)
  • Message queue (RabbitMQ)
  • Elasticsearch for search
  • Microservices architecture
  • Kubernetes deployment

Phase 5: Mobile & PWA

  • Progressive Web App (PWA) with Nuxt
  • Mobile-first optimization
  • Push notifications
  • Offline mode with service workers
  • Install prompt
  • Biometric authentication
  • Apple Pay / Google Pay
  • Native app wrapper (Capacitor/Ionic)

๐Ÿ“š Documentation & Resources

๐Ÿ“ฆ Backend (REST API)
GitHub: https://github.com/fauzan05/seblak-bombom-restful-api

  • Go + Fiber backend
  • Complete API documentation
  • Database migrations
  • Docker setup
  • Postman collection

๐Ÿ“ฆ Frontend (Nuxt.js 3)
GitHub: https://github.com/fauzan05/seblak-bombom-api-consumer

  • Nuxt.js 3 application
  • Vue 3 components
  • Pinia state management
  • Tailwind CSS styling
  • Headless UI components
  • Server-Side Rendering
  • SEO optimized
  • Responsive design

External Resources

Technology Documentation:

๐Ÿค Contributing & Usage

Project Status: This project is currently on hold due to client circumstances, but the codebase is available for learning and reference purposes.

Potential Use Cases:

  • Learn full-stack development with Go and Nuxt.js
  • Reference for payment gateway integration
  • Starting point for similar food delivery projects
  • Portfolio and learning resource

I welcome contributions, feedback, and questions!

Tools & Utilities:

๐Ÿค Contributing

While this is a personal project, I welcome contributions and feedback!

Ways to Contribute:

  • ๐Ÿ› Report bugs via GitHub Issues
  • ๐Ÿ’ก Suggest features or improvements
  • ๐Ÿ“– Improve documentation
  • ๐Ÿ”ง Submit pull requests
  • โญ Star the repository if you find it useful

Development Workflow:

# Fork the repository
# Create feature branch
git checkout -b feature/amazing-feature

# Make changes and test
go test ./...

# Commit with clear message
git commit -m "feat: add amazing feature"

# Push to branch
git push origin feature/amazing-feature

# Open Pull Request

๐Ÿ“„ License

This project is available under the MIT License. See the LICENSE file for details.

What this means:

  • โœ… Free to use for commercial projects
  • โœ… Modify and distribute freely
  • โœ… No warranty or liability
  • โœ… Attribution appreciated but not required

๐Ÿ™ Acknowledgments

Special Thanks:

  • My friend's seblak business for inspiring this project
  • Xendit for excellent payment gateway documentation
  • The Go community for amazing libraries
  • All open-source contributors

Built With Love Using:

  • โ˜• Lots of coffee
  • ๐ŸŽต Good music
  • ๐Ÿง  Problem-solving mindset
  • ๐Ÿ’ช Determination to learn

๐Ÿ“ž Contact & Connect

Fauzan Nur Hidayat

๐ŸŒ Portfolio: https://fznh-dev.my.id
๐Ÿ’ผ LinkedIn: https://www.linkedin.com/in/fznh-dev/
๐Ÿ™ GitHub: @fauzan05
๐Ÿ“ง Email: fauzannurhidayat8@gmail.com

Questions or Collaboration?

  • Open an issue on GitHub
  • Send me an email
  • Connect on LinkedIn
  • Schedule a call to discuss

โญ Star This Project!

If you find this project useful or learned something from it, please consider giving it a star on GitHub!

Backend Repository โญ
Frontend Repository โญ

Your support motivates me to create more open-source projects!


Built with โค๏ธ in Indonesia

Empowering local businesses with modern technology

Back to Projects