๐ 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 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 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
Repository Links
๐ฆ 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
