Project created to study backend and frontend in integration with this front-end repo.
On this project I used laravel and mysql to practice concepts like routes, api, deployment and database.
- php (tested in the version 8.2)
- composer (tested in version 2.2.9)
- mysql
- use the .env to configure your database
- run: composer install && npm install
- run: php artisan migrate (it will connect to your database config and create the necessary tables )
- run: php artisan serve
The base url in Laravel usually is localhost:8000
- GET {{ _.base_url }}/api/expenses: get all expenses
- GET {{ _.base_url }}/api/expenses/{id}: get the expense info to the {id}
- DELETE {{ _.base_url }}/api/expenses/{id}: delete the expense {id}
- POST {{ _.base_url }}/api/expenses: create a new expense.
- format:
{ "title":"coffee", "description":"bought in iLoveCoffee", "amount":"1", "currency":"EUR" }
- PUT {{ _.base_url }}/api/expenses/{id}: edit the expense {id}, same format to create but you can send just what you want to edit
- example:
{ "title":"coke" }
- POST {{ _.base_url }}/api/register: create a new user. You can send another parameter "profile_picture" as a file but need to send as form data.
- format:
{ "name":"Matheus Felizardo", "email":"matheus.felizardo@gmail.com", "password":"123456", }
- format:
- POST {{ _.base_url }}/api/update: Update the user data. Need to send the id in the request, parameter 'id'
- DELETE {{ _.base_url }}/api/user/delete/{id}: Delete the user {id}
- POST {{ _.base_url }}/api/login: Login the user to save the token.
- format:
{ "email":"matheus.felizardo@gmail.com", "password":"123456" }
- POST {{ _.base_url }}/api/logout: Disconnect the logged user. Necessary to send the bearer token.
- POST {{ _.base_url }}/api/user: Get information of the logged user. Necessary to send the bearer token.
feature: login (It's already configurated but I will need to make some database updates)Done 21/06/23feature: connection between expense and user in the databaseDone 22/06/23feature: profile picture for the usersDone 23/06/23feature: create route to update user infosDone 25/06/23feature: create route to delete the user and associated expensesDone 26/06/23- feature: category for expenses
- feature: filters (by category, low to high and high to low)
feature: return data to create the chart comparing the expenses in the last 3 monthsDone 18/07/2023feature: selected currency to the userDone 09/07/2023- bug: route update user is not working after change method to put or path
bug: laravel converting empty strings to nullDone 30/06/2023feature: currency model to simulate a currency apiDone 09/07/2023
- php artisan migrate:refresh && php artisan db:seed UsersTableSeeder && php artisan db:seed ExpensesTableSeeder: reset the database and seed the tables User and Expenses
Check the Front-end repo