Skip to content

API REST I made with Martin Ferret for last school project with Symfony

Notifications You must be signed in to change notification settings

TristanBonnal/my-piggy-bank-api

Repository files navigation

My Piggy Bank 🐷 💵

The website 💻

My Piggy Bank is a simple, fast and fun way to save your money. The site is based on the principle of the good old piggy bank, but online, with electronic payment methods. Once you have registered, all you have to do is create your first pot, give it a name and define the goals you want to reach before withdrawing your savings. For more informations, you can see our demo on Youtube here:

Link to presentation 🎥

My Piggy Bank 🐽

  • View as visitor image info
  • Register form image info
  • Create a new pot image info
  • See all our pots image info
  • Make operations on a pot image info

Back Office 📦

  • See all pots image info

  • See one pot in details image info

  • See every operations image info

Stack 🔧

  • Symfony 5.4
  • EasyAdmin
  • Lexik (JWT)
  • Nelmio (CORS)

Install 🔨

💡 Clone the repository & run

composer install

🖋️ Create and set your own .env.local

  • The DATABASE_URL allows doctrine to reach your database

    • "user_name", "password" & "database_name" have to be replaced by your values
    • If you are not using mysql, you must get the right DATABASE_URL on Symfony's website.
  • The JWT_PASSPHRASE is mandatory for lexik-bundle to be working and its value is up to you

  • Specify your work environment

DATABASE_URL="mysql://user_name:password@127.0.0.1:3306/database_name?serverVersion=mariadb-10.3.25"
JWT_PASSPHRASE=e65cbbbe71ea5677b6199c1821c26d0b
APP_ENV=dev

🧞‍♂️ Create your database

php bin/console doctrine:database:create

🕊️ Migrate your database

php bin/console doctrine:migrations:migrate

💥 Load fixtures in order to fill your database

php bin/console doctrine:fixtures:load

🔑 Generate a keypair for lexik (JWT authentication)

php bin/console lexik:jwt:generate-keypair

📋 You need to clear the cache

php bin/console cache:clear

🧰 PHP configuration

In order to run your application, you need to make sure that you have the following modules installed :

  • intl
  • openssl

About

API REST I made with Martin Ferret for last school project with Symfony

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published