Skip to content

wildangunawan/eigen-be-test

Repository files navigation

Eigen BE Test Case

Catatan: Saya lupa kalau Laravel tidak otomatis membuat git repository. Saya membuat repository ini setelah selesai membuat aplikasi. Oleh karena itu, nama commitnya adalah Initial commit saja dan tidak bisa menunjukkan flow development.

Use Case

  • Members can borrow books with conditions
    • Members may not borrow more than 2 books
    • Borrowed books are not borrowed by other members
    • Member is currently not being penalized
  • Member returns the book with conditions
    • The returned book is a book that the member has borrowed
    • If the book is returned after more than 7 days, the member will be subject to a penalty. Member with penalty cannot able to borrow the book for 3 days
  • Check the book
    • Shows all existing books and quantities
    • Books that are being borrowed are not counted
  • Member check
    • Shows all existing members
    • The number of books being borrowed by each member

Requirements

  • it should be use any framework (using Laravel)
  • it should be use Swagger as API Documentation (http://localhost:8000/api/documentation)
  • it should be use Database (SQL/NoSQL)
  • it should be open sourced on your github repo

Extras

  • Implement DDD Pattern
  • Implement Unit Testing
  • Implement Feature Testing

Algoritma

Tes algoritma dapat diakses pada folder algorithm.

  1. Reverse alphabet
  2. Mencari kata terpanjang
  3. Menghitung jumlah kata pada array
  4. Mencari pengurangan dari diagnoal matriks

Installation

Instalasi dilakukan seperti biasa pada proyek Laravel:

git clone ...
composer install
cp .env.example .env
nano .env
php artisan key:generate
php artisan migrate --seed

Usage

Jalankan aplikasi Laravel seperti biasa:

php artisan serve

Anda dapat mengunjungi aplikasi di http://localhost:8000 serta dokumentasi Swaggernya di http://localhost:8000/api/documentation.

Tests

Untuk menjalankan test case, jalankan perintah berikut:

php artisan test

License

Laravel dilisensikan dengan MIT license. Keseluruhan kode di dalam proyek ini akan mengikuti lisensi ini.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages