Skip to content

Repository files navigation

Backend Inventory RSD Balung

Sistem Manajemen Inventaris Rumah Sakit Balung
Dikembangkan oleh Tim Capstone Fasilkom UNEJ


πŸ“‹ Daftar Isi


πŸ“± Overview Proyek

Backend Inventory RSD Balung adalah sistem backend API yang dirancang untuk mengelola inventaris di Rumah Sakit Umum Daerah (RSUD) Balung. Aplikasi ini menggunakan framework Laravel 11 dan menyediakan RESTful API untuk manajemen inventaris, pemesanan barang, penerimaan barang, dan monitoring stok secara real-time.

Tujuan Proyek

  • Mengoptimalkan pengelolaan inventaris rumah sakit
  • Meningkatkan efisiensi tracking stok barang
  • Menyediakan sistem pemesanan barang yang terstruktur
  • Memberikan laporan dan analisis stok secara akurat

✨ Fitur Utama

  1. Manajemen Stok

    • Monitoring stok barang real-time
    • Tracking pergerakan barang
    • Kategori dan satuan barang
  2. Pemesanan Barang

    • Sistem pemesanan barang terstruktur
    • Tracking status pemesanan
    • Detail pemesanan per item
  3. Penerimaan Barang

    • Pencatatan penerimaan barang
    • Verifikasi barang masuk
    • Penerimaan per pegawai
    • Berita Acara Serah Terima (BAST)
  4. Pengelolaan Pengguna

    • Manajemen user dengan role-based access control
    • Manajemen jabatan pegawai
    • Notifikasi sistem
  5. Pelaporan

    • Export data pengeluaran ke Excel
    • Laporan inventory
    • Dashboard monitoring
  6. Integrasi SSO

    • Integrasi dengan sistem Single Sign-On eksternal
    • Keamanan dengan Laravel Sanctum

πŸ›  Teknologi yang Digunakan

Komponen Teknologi
Framework Backend Laravel 11.31
Bahasa Pemrograman PHP 8.2+
Database MySQL/PostgreSQL
Authentication Laravel Sanctum
Package Manager Composer
Build Tool Vite
ORM Eloquent
API Documentation Dedoc Scramble
Export Excel Maatwebsite Excel
PDF Generation DomPDF
Permission Spatie Laravel Permission
Testing PHPUnit

πŸ“¦ Requirements

Sebelum melakukan instalasi, pastikan sistem Anda memiliki:

  • PHP 8.2 atau lebih tinggi
  • Composer (untuk manajemen package PHP)
  • Node.js 18+ dan npm atau yarn (untuk asset frontend)
  • MySQL 8.0+ atau PostgreSQL 12+
  • Git

Verifikasi Instalasi

php --version      # Cek versi PHP
composer --version # Cek versi Composer
node --version     # Cek versi Node.js
npm --version      # Cek versi npm

πŸš€ Instalasi

1. Clone Repository

git clone https://github.com/fauzul91/inventory-rsud.git
cd inventory-rsud

2. Install PHP Dependencies

composer install

3. Install JavaScript Dependencies

npm install
# atau
yarn install

4. Setup Environment File

# Copy file .env.example menjadi .env
cp .env.example .env

# atau untuk Windows
copy .env.example .env

5. Generate Application Key

php artisan key:generate

6. Buat Database

Buat database baru di MySQL/PostgreSQL:

CREATE DATABASE inventory_rsud;

7. Konfigurasi Database

Edit file .env dan sesuaikan konfigurasi database:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=inventory_rsud
DB_USERNAME=root
DB_PASSWORD=

8. Jalankan Database Migrations

php artisan migrate

9. Jalankan Database Seeding (Opsional)

php artisan db:seed

βš™οΈ Konfigurasi

Konfigurasi Environment

File .env yang penting untuk diperhatikan:

# App Configuration
APP_NAME="Inventory RSUD"
APP_ENV=local
APP_DEBUG=true
APP_TIMEZONE=Asia/Jakarta
APP_URL=http://localhost:8001
FRONTEND_URL=http://localhost:5173

# Database Configuration
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=inventory_rsud
DB_USERNAME=root
DB_PASSWORD=

# Auth Configuration (SSO)
PASSPORT_HOST=http://localhost:8000
PASSPORT_CLIENT_ID=your_client_id
PASSPORT_CLIENT_SECRET=your_client_secret
PASSPORT_REDIRECT_URI=http://localhost:8001/api/sso/callback
SSO_LOGOUT_URL=http://localhost:8000/logout

# Mail Configuration (Opsional)
MAIL_MAILER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=587
MAIL_USERNAME=your_username
MAIL_PASSWORD=your_password
MAIL_FROM_ADDRESS=noreply@inventoryrsud.com

Konfigurasi Permission

File config/permission.php mengatur role dan permission dalam sistem.


▢️ Menjalankan Aplikasi

Development Mode

1. Jalankan Server Laravel

php artisan serve
# Server akan berjalan di http://localhost:8000

2. Compile Assets (di terminal baru)

npm run dev
# atau dengan Vite watcher
npm run dev

3. Optional: Jalankan Telescope (untuk debugging)

# Akses di http://localhost:8000/telescope

Production Mode

# Compile assets untuk production
npm run build

# Jalankan server production
php artisan serve --env=production

πŸ“ Struktur Proyek

inventory-rsud/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ Console/           # Artisan Commands
β”‚   β”œβ”€β”€ Enum/              # Enums (Value Objects)
β”‚   β”œβ”€β”€ Exceptions/        # Custom Exceptions
β”‚   β”œβ”€β”€ Exports/           # Excel Exports
β”‚   β”œβ”€β”€ Helpers/           # Helper Functions
β”‚   β”œβ”€β”€ Http/
β”‚   β”‚   β”œβ”€β”€ Controllers/   # API Controllers
β”‚   β”‚   β”œβ”€β”€ Middleware/    # HTTP Middleware
β”‚   β”‚   └── Requests/      # Form Requests (Validation)
β”‚   β”œβ”€β”€ Imports/           # Excel Imports
β”‚   β”œβ”€β”€ Interfaces/        # Contracts/Interfaces
β”‚   β”œβ”€β”€ Models/            # Database Models
β”‚   β”œβ”€β”€ Repositories/      # Repository Pattern
β”‚   β”œβ”€β”€ Services/          # Business Logic Services
β”‚   └── Providers/         # Service Providers
β”œβ”€β”€ bootstrap/             # Bootstrap files
β”œβ”€β”€ config/                # Configuration files
β”œβ”€β”€ database/
β”‚   β”œβ”€β”€ migrations/        # Database Migrations
β”‚   β”œβ”€β”€ seeders/           # Database Seeders
β”‚   └── factories/         # Model Factories
β”œβ”€β”€ public/                # Public assets
β”œβ”€β”€ resources/
β”‚   β”œβ”€β”€ css/               # Stylesheets
β”‚   β”œβ”€β”€ js/                # JavaScript files
β”‚   └── views/             # Blade templates
β”œβ”€β”€ routes/                # Route definitions
β”‚   β”œβ”€β”€ api/               # API routes
β”‚   β”œβ”€β”€ web.php            # Web routes
β”‚   └── console.php        # Console routes
β”œβ”€β”€ storage/               # File storage
β”œβ”€β”€ tests/                 # Unit & Feature tests
β”œβ”€β”€ vendor/                # Composer dependencies
β”œβ”€β”€ .env.example           # Example environment file
β”œβ”€β”€ artisan                # Artisan CLI
β”œβ”€β”€ composer.json          # PHP dependencies
β”œβ”€β”€ package.json           # Node dependencies
β”œβ”€β”€ phpunit.xml            # PHPUnit configuration
β”œβ”€β”€ tailwind.config.js     # Tailwind CSS configuration
β”œβ”€β”€ vite.config.js         # Vite configuration
└── README.md              # Documentation

πŸ”‘ Key Models

  • User: Pengguna sistem
  • Pegawai: Data pegawai rumah sakit
  • Stok: Inventaris barang
  • Pemesanan: Data pemesanan barang
  • Penerimaan: Data penerimaan barang
  • Category: Kategori barang
  • Satuan: Satuan pengukuran barang
  • Jabatan: Posisi/jabatan pegawai
  • Notifikasi: Sistem notifikasi

πŸ§ͺ Testing

Jalankan unit tests:

php artisan test

Jalankan test dengan coverage:

php artisan test --coverage

πŸ“š API Documentation

Dokumentasi API dapat diakses melalui Scramble di:

http://localhost:8001/api/documentation

πŸ“ Kontribusi

Untuk berkontribusi pada proyek ini:

  1. Fork repository
  2. Buat branch fitur (git checkout -b feature/AmazingFeature)
  3. Commit perubahan (git commit -m 'Add some AmazingFeature')
  4. Push ke branch (git push origin feature/AmazingFeature)
  5. Buka Pull Request

πŸ‘₯ Tim Pengembang

Proyek ini dikembangkan oleh Tim Capstone Fasilkom UNEJ (Fakultas Ilmu Komputer - Universitas Negeri Jember)


πŸ“„ Lisensi

Proyek ini dilisensikan di bawah lisensi MIT. Lihat file LICENSE untuk detail lebih lanjut.


πŸ“ž Kontak & Support

Untuk pertanyaan atau masalah, silakan buka issue di repository ini atau hubungi tim pengembang.


Last Updated: Februari 2026

Contributing

Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the Laravel documentation.

Code of Conduct

In order to ensure that the Laravel community is welcoming to all, please review and abide by the Code of Conduct.

Security Vulnerabilities

If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via taylor@laravel.com. All security vulnerabilities will be promptly addressed.

License

The Laravel framework is open-sourced software licensed under the MIT license.

About

SIMBA is a web-based system that enables the comprehensive integration of asset management and inventory control processes, including general warehouse management.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages