Files
app-test-golang/README.md
2025-11-26 07:24:49 +00:00

87 lines
3.7 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 🚀 API Service - Sistem Manajemen Pasien
## 📑 Daftar Isi
- [✨ Fitur Utama](#-fitur-utama)
- [🏗️ Arsitektur](#-arsitektur)
- [⚡ Quick Start](#-quick-start)
- [🔐 Autentikasi](#-autentikasi)
- [📊 API Endpoints](#-api-endpoints)
- [🛠️ Development](#-development)
- [🚀 Deployment](#-deployment)
- [📚 Dokumentasi](#-dokumentasi)
- [🚨 Troubleshooting](#-troubleshooting)
***
## ✨ Fitur Utama
### Core Features
- **🔒 JWT Authentication** - Sistem autentikasi dengan Keycloak integration
- **👥 Patient Management** - CRUD lengkap untuk data pasien
- **🔍 Dynamic Filtering** - Filter dan pencarian data pasien secara dinamis
- **📊 Advanced Search** - Pencarian dengan multiple fields dan operators
- **🏥 BPJS Integration** - Integrasi dengan layanan kesehatan BPJS
- **🩺 SATUSEHAT Integration** - Integrasi dengan platform kesehatan SATUSEHAT
- **📖 API Documentation** - Swagger/OpenAPI yang interaktif
### Developer Experience
- **🔥 Hot Reload** - Development dengan auto-restart
- **🐳 Docker Ready** - Deployment yang mudah
- **⚡ Code Generator** - Tools untuk generate handler dan model
- **🧪 Testing Suite** - Unit dan integration tests
- **📊 Health Monitoring** - Monitoring kesehatan aplikasi
- **🗄️ Multi Database** - Support PostgreSQL, MySQL, dan MongoDB
***
## 🏗️ Arsitektur
### Clean Architecture Layers
```
┌─────────────────────────────────────┐
│ Presentation Layer │ ← handlers/, routes/
├─────────────────────────────────────┤
│ Application Layer │ ← middleware/, services/
├─────────────────────────────────────┤
│ Domain Layer │ ← models/, validation/
├─────────────────────────────────────┤
│ Infrastructure Layer │ ← database/, external APIs
└─────────────────────────────────────┘
```
### Struktur Project
```
api-service/
├── 📁 cmd/ # Entry points aplikasi
│ └── api/main.go # API server
├── 📁 internal/ # Core business logic
│ ├── config/ # Configuration management
│ ├── database/ # Database connections
│ ├── handlers/ # HTTP controllers
│ ├── middleware/ # Auth & validation middleware
│ ├── models/ # Data structures
│ ├── routes/ # API routing
│ ├── services/ # Business logic services
│ │ └── auth/ # Auth services
│ ├── utils/ # Utility functions
│ │ ├── filters/ # Dynamic filtering
│ │ └── validation/ # Data validation
│ └── server/ # HTTP server setup
├── 📁 docs/ # Documentation
└── 📁 examples/ # Example files
```
### Best Practices
1. **Jangan pernah commit file .env ke repository**
2. **Gunakan environment variables untuk semua data sensitif**
3. **Gunakan secret management tools untuk production**
4. **Rotasi kunci API secara berkala**
5. **Implementasi rate limiting untuk API endpoints**
***