Skip to content

Salestock Backend Technical Assessment: Order Transaction

Notifications You must be signed in to change notification settings

clasense4/lumen-order-tracking

Repository files navigation

Lumen Order Tracking

This is a sample project to simulate order tracking in general online store. This scenario we would like to focus on basic transaction that happens in general online store in Indonesia.

Installation

Make sure to read official lumen installation page. In this project, postgresql is the main database. Make sure you have access to the database.

Here is some references for Postgresql :

1. Code

cd /var/www
git clone git@github.com:clasense4/lumen-order-tracking.git
cd lumen-order-tracking
composer install
cp .env.example .env

2. Environment

Change .env as necessary, here is some variable that need to take look closer

  1. DB_HOST, usually localhost or 127.0.0.1 or another IP.
  2. DB_PORT, usually 5432.
  3. DB_DATABASE, make sure it is correct.
  4. DB_USERNAME, make sure it is correct user.
  5. DB_PASSWORD, make sure it is correct password.

3. Migration and Seed

cd /var/www/lumen-order-tracking
php artisan migrate:refresh --seed

4. Start local php server

cd /var/www/lumen-order-tracking
php -t public/ -S 0.0.0.0:8080
# do not close for now

5. Test

# open new tab
cd /var/www/lumen-order-tracking
vendor/bin/phpunit

Insomnia file

I have included Insomnia Rest file to get start with this projects. Import salestock.rest. Read more.

Troubleshooting

Error in composer install

Well, it must be cache problem, try to install it with composer install -vvv --profile --prefer-source.

About

Salestock Backend Technical Assessment: Order Transaction

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published