Sign inSign up

sofyansolutions/kasapro-backend

By sofyansolutions

•Updated 10 months ago

Backend Service Kasapro

Image
0

136

sofyansolutions/kasapro-backend repository overview

⁠Kasapro Backend API Service

Kasapro Backend is the API service for Kasapro POS system, built with Go (Golang) and Gin framework. Part of the Kasapro POS suite designed for UMKM (small and medium enterprises) in Indonesia.

⁠Quick Start

# Pull the image
docker pull sofyansolutions/kasapro-backend:latest

# Or use specific version
docker pull sofyansolutions/kasapro-backend:v1.0.0

⁠Usage

This image is designed to be used as part of the complete Kasapro stack. For standalone usage, see the configuration section below.

services:
  backend:
    image: sofyansolutions/kasapro-backend:${ERP_VERSION:-latest}
    environment:
      - DATABASE_URL=postgres://user:pass@postgres:5432/pos_db?sslmode=disable
      - REDIS_URL=redis://redis:6379/0
      - JWT_ACCESS_SECRET=your-secret-key
      - JWT_REFRESH_SECRET=your-refresh-secret
    depends_on:
      - postgres
      - redis

See the complete installation guide⁠ for full docker-compose setup.

⁠Configuration

⁠Required Environment Variables
  • DATABASE_URL - PostgreSQL connection string

    • Format: postgres://username:password@host:port/database_name?sslmode=disable
    • Example: postgres://pos_user:pos_pass@postgres:5432/pos_db?sslmode=disable
  • REDIS_URL - Redis connection string

    • Format: redis://host:port/db
    • Example: redis://redis:6379/0
  • JWT_ACCESS_SECRET - Secret key for JWT access tokens (minimum 32 characters)

  • JWT_REFRESH_SECRET - Secret key for JWT refresh tokens (minimum 32 characters)

⁠Optional Environment Variables
  • APP_ENV - Application environment (default: production)
  • PORT - Server port (default: 8100)
  • CORS_ALLOW_ORIGIN - CORS allowed origin (default: https://localhost)
  • JWT_ISSUER - JWT issuer (default: kasapro-backend)
  • JWT_AUDIENCE - JWT audience (default: kasapro-frontend)
  • DEPLOYMENT_MODEL - Deployment model (default: self-hosted)
⁠Generate Secure Secrets
# Generate JWT secrets
openssl rand -base64 32

⁠Features

  • RESTful API - Complete POS API endpoints
  • Database Migrations - Automatic migrations on startup (embedded in binary)
  • JWT Authentication - Secure token-based authentication
  • Health Checks - Built-in health check endpoint at /healthz
  • Production Ready - Optimized for production use

⁠Health Check

The backend includes a health check endpoint:

curl http://localhost:8100/healthz

⁠Database Migrations

Database migrations are automatically executed when the backend starts. Migrations are embedded in the binary for security - no migration files are exposed in the container.

⁠Ports

  • 8100 - HTTP API server (default)

⁠Volumes

No volumes are required. All data is stored in the database and cache.

⁠Dependencies

  • PostgreSQL 14+ (required)
  • Redis 7+ (required)

⁠Tags

  • latest - Latest stable release
  • v1.0.0, v1.1.0, etc. - Versioned releases
  • sha-abc123 - Development builds (commit SHA)

⁠Full Documentation

For complete installation guide, configuration options, and troubleshooting:

  • GitHub Repository: on progress
  • Documentation: on progress
  • Quick Start Guide: See sofyansolutions/kasapro repository
  • sofyansolutions/kasapro-frontend - Frontend web application
  • sofyansolutions/kasapro-nginx - Nginx reverse proxy with SSL

⁠Support

⁠License

See the main Kasapro repository for license information.


Made with ❤️ for UMKM Indonesia

Kasapro - Kasa Professional untuk Toko Anda

Tag summary

Content type

Image

Digest

sha256:4075499dc…

Size

8.5 MB

Last updated

10 months ago

docker pull sofyansolutions/kasapro-backend:v1.0.0