Go to file
2024-12-03 21:27:44 +01:00
app Initial commit 2024-12-03 21:27:44 +01:00
bootstrap Initial commit 2024-12-03 21:27:44 +01:00
config Initial commit 2024-12-03 21:27:44 +01:00
database Initial commit 2024-12-03 21:27:44 +01:00
public Initial commit 2024-12-03 21:27:44 +01:00
resources Initial commit 2024-12-03 21:27:44 +01:00
routes Initial commit 2024-12-03 21:27:44 +01:00
storage Initial commit 2024-12-03 21:27:44 +01:00
tests Initial commit 2024-12-03 21:27:44 +01:00
.editorconfig Initial commit 2024-12-03 21:27:44 +01:00
.env.example Initial commit 2024-12-03 21:27:44 +01:00
.env.testing Initial commit 2024-12-03 21:27:44 +01:00
.gitattributes Initial commit 2024-12-03 21:27:44 +01:00
.gitignore Initial commit 2024-12-03 21:27:44 +01:00
artisan Initial commit 2024-12-03 21:27:44 +01:00
composer.json Initial commit 2024-12-03 21:27:44 +01:00
composer.lock Initial commit 2024-12-03 21:27:44 +01:00
mcd.png Initial commit 2024-12-03 21:27:44 +01:00
package-lock.json Initial commit 2024-12-03 21:27:44 +01:00
package.json Initial commit 2024-12-03 21:27:44 +01:00
phpunit.xml Initial commit 2024-12-03 21:27:44 +01:00
pint.json Initial commit 2024-12-03 21:27:44 +01:00
postcss.config.js Initial commit 2024-12-03 21:27:44 +01:00
README.md Initial commit 2024-12-03 21:27:44 +01:00
screenshot.png Initial commit 2024-12-03 21:27:44 +01:00
tailwind.config.js Initial commit 2024-12-03 21:27:44 +01:00
vite.config.js Initial commit 2024-12-03 21:27:44 +01:00

Test Technique - Laravel Wallet

Screenshot

Requirements

  • PHP 8.2+
  • Composer

(i) No need database, just use sqlite.

Installation

composer install

c

composer install

Running tests

vendor/bin/pest

Running formatter

vendor/bin/pint

Default Users

Rich chill guy (1M€ balance):

Another guy (0€ balance):

Database schema

Database schema

Amounts are saved in cents.

Some Laravel tables are included :

  • sessions
  • cache
  • cache_locks
  • jobs
  • job_batches
  • failed_jobs

Tickets

Bugfix - Error on login

On first login after registering, this error is thrown:

Call to a member function transactions() on null

You need to write a test to ensure that this error does not occur again.

Feature - Notification when balance is low

When a user balance is low (< 10€), he should be notified by email.

You must write a test for this feature.

Feature - Recurring transfers

As a user, I want to be able to create recurring transfers.

I want to define :

  • A start date
  • An end date
  • A frequency in days
  • An amount
  • A reason

Of course, I want to be able to delete a recurring transfer.

The transfer must be executed every X days (according to the periodicity defined by the user) at 2:00 a.m. The transfer must also be executed immediately after its creation.

If the user has a balance lower than the amount, the transfer should fail and the user should be notified by email.

This feature must be available in the API and the front-end.

You must write tests for this features.

Don't forget to write seeders & factories.

BONUS - Feature - Sync wallet balance

You need to write an action that reconstitutes the balance of a portfolio from its transaction history.

You must write tests for this action.