GithubHelp home page GithubHelp logo

vincentfranstyo / storagers Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 349 KB

A full-stack development made with laravel as a mini e-commerce website

PHP 69.25% JavaScript 0.69% SCSS 0.69% Blade 29.36%

storagers's Introduction

Storagers

A monolith project as a mini e-commerce application made with TALL (Tailwind, Alpine, Laravel, Livewire) stack.

Creator

  • Vincent Franstyo (18221100)

How to run

Requirements

Locally

  1. Clone this repository
  2. Run composer install
  3. Run npm install
  4. Run php artisan key:generate
  5. Create your own database at the database directory, you can manually create it. (e.g. database.mysql)
  6. Run php artisan migrate
  7. Run php artisan db:seed
  8. Set all the DB credentials in .env files (e.g. connection, host, port, name, password);
  9. Run php artisan jwt:secret
  10. Run npm run dev
  11. Run php artisan serve
  12. Enjoy!

Design Patterns

  • Strategy: digunakan karena dapat mengubah behaviour dari sebuah class tanpa mengubah class itu sendiri
  • Singleton: digunakan karena dapat memastikan bahwa sebuah class hanya memiliki satu instance dan menyediakan akses global ke instance tersebut
  • Facade: digunakan untuk memepermudah implementasi sistem kompleks menjadi subsistem

Tech Stack

  • Laravel
  • TailwindCSS
  • AlpineJS
  • Livewire
  • JWTAuth
  • MySQL
  • Docker
  • Laravel Sail
  • PHP 8
  • Blade

Endpoints

Auth

  • POST /api/auth/login: login
  • POST /api/auth/register: register
  • POST /api/auth/logout: logout

Pages

  • GET /login: login page
  • GET /register: register page
  • GET /home: home page
  • GET /detail/name: detail page
  • GET /purchase/name: purchase page
  • GET /history: history page

Functional

  • POST /purchase/name: purchase product

Bonus

  • Responsive Layout
  • SOLID(SRP) : saya sebisa mungkin mengimplementasikan SRP pada project ini, seperti pada app/Http/Controllers/AuthController.php dan app/Http/Controllers/PurchaseController.php dimana saya memisahkan fungsi-fungsi yang berbeda menjadi fungsi yang berbeda-beda sehingga dapat mempermudah untuk mengubah fungsi-fungsi tersebut tanpa mengubah fungsi lainnya
  • SOLID (OCP): OCP pada project ini diimplementasikan seperti pada app/Http/Controllers/Controller.php dimana Controller lainnya extend dari controller ini sehingga open for extension dan close for modification
  • SOLID (LSP): LSP adalah saat dimana superclass dapat digantikan oleh subclass tanpa mengubah fungsionalitas dari superclass tersebut.
  • SOLID (ISP): ISP adalah saat dimana sebuah interface tidak memiliki fungsi yang tidak digunakan oleh implementasi dari interface tersebut. Pada project ini, tidak ada interface yang tidak memiliki fungsi yang tidak digunakan.
  • SOLID (DIP): DIP adalah saat dimana sebuah fungsi tidak bergantung pada implementasi dari fungsi tersebut, tetapi bergantung pada interface dari fungsi tersebut.

WARNING

  • DO NOT use php artisan migrate:fresh because it will delete all the data in the database
  • Sorry the docker is not working. I have tried to fix it but it still doesn't work. I will try to fix it again later.

storagers's People

Contributors

vincentfranstyo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.