Backend application for MoneyMap iOS Application. This uses JWT Authentication. It has basic CRUD APIs for User to track all the Money transactions.
Prefix for APIs - http://localhost:8082
- Create User.
- Login User ( Receives the JWT token as response).
For Below APIs, pass JWT token as bearer token in the Request header.
- Get User.
- Create Transaction.
- Get All Transactions By User.
- Update a particular Transaction.
- Delete a particular Transaction.
- Update Profile picture(Images are stored in Base-64 String in DB).
- Signout.
- You need to install MYSQL from the official site on your machine and run this command in SQL Shell.
CREATE DATABASE moneymap
- Download this repo and open it in IntelliJ IDE(You can download the free community version from the official site). Edit Application.properties to update your MYSQL port no. , username and password for DB User.
- Hit the build and run buttons on IBE and Your APIs are ready !!!
Method | URL | Description | Return |
---|---|---|---|
POST | http://localhost:8082/createUser | Create User | Success Message |
POST | http://localhost:8082/loginUser | Login | JSON Web Token |
Method | URL | Description | Return |
---|---|---|---|
GET | http://localhost:8082/getUser | get User profile | Single JSON object with email and Image as Base-64 String |
PUT | http://localhost:8082/updateProfile | updates user profile picture | Success Message |
GET | http://localhost:8082/signout | Expires the JWT token | SignOut Message |
Method | URL | Description | Return |
---|---|---|---|
POST | http://localhost:8082/createTransaction | Create new transaction | Success Message |
GET | http://localhost:8082/getTransactions | Get all transaction mage by User | JSON Array of Transactions |
PUT | http://localhost:8082/updateTransaction | Updates a Transaction with particular ID | Success Message |
DELETE | http://localhost:8082/deleteTransaction?transaction_id=<id_number> | Deletes a Transaction with particular ID | SignOut Message |
NOTE:
The endpoints of "Get user profile ,update profile picture and Signout" and "CRUD Operations on Transaction" are restricted. To access those endpoints, use the token which is generated after logging-in as the value of the Bearer in the Authorization header as follows:
"Authorization: Bearer Token_id" . Token expires in 150 minutes.
{
"email": "[email protected]",
"password": "venuvenu",
"profile":"iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAbTSUR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H10QCZwEsXrw4Dq5HVsgznBjOLh7A7wHMnj07Dq5HltsejuWfWqzeA9i4cSPTpoWdEmOq7u5uWxx34M+Bd589exYH167093CVZmCtGzMZYzxABv0bhvFWj6TWcAYxB37bNfV/6cmuKeDJringya7/ArAfRalwNR9/AAAAAElFTkSuQmCC"
}
{
"email": "[email protected]",
"password": "venuvenu"
}
{
"user_name": "[email protected]",
"profile": "iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAN1wAADdcBQiibeAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAbTSURBVGiB7ZptTFTZGcd/hxmcUq3Z2A+8th+WLBqroOwK1mpDqkkTDU0kRKmSWrWJRk3XqNjYNyx+QI2tC36q1BiJGjcao8sm1sSKaZw1g5ESa9vE+LYgsYHoElyoCtx/P8CZDBSGO8wMuJR/MsmZOc95nud3z73n7Y6RxP+TEiY6gfHWFPBk1xTwZNcUcLxljPnAGPOD8Y5rFTNgY0yJMabFGNNgjJk3gs12oAH4izHmYKxiRyRJMfkAXwAa+LwA3h9S//OQegFfAr5YxXedZwyBuwCtWrXKAj0Apg/UFVnQqqoq5eTkWJvFX2XgVkB+vz8U6M/AQeBzQEeOHJEkFRYW2vo/APOBxK8i8DFAe/bs0d27d+Xz+UJvX2VnZ6uvr0+StGPHjkF1wGugCfgT8P14AntjOBw8AWhra2P+/Pk0NDRw5coVJOHz+diwYQMJCf1jZHl5OcnJyR1NTU3vNDU18ejRo2mScoAcYLMx5p/AH4FaSR0xzDE2PQwY+kdfnT17Vi713BY6Ozt18+ZNVVRUKCMjI7Tnu4AKwPtW3dLATwGlpKTo5cuXboGHVW9vry5evKgVK1bIGGPB/cC33wpg4IOBntCZM2eigh2q+vp6paWlhU51RRMKDCQNPLvaunWrJKmyslLZ2dl6/PixG6a+0Qza29u1cuXK0Nt820QC/wZQfn6+enp6tH379mBily5dcgPc68b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AS2FhIXV1daY4vHTpEq2trQDuudqmIrOB+4CJ4eFhh8/no6KiIi1nT548YWBgwPjanW5wQEaSViP6nnR1dbU0NDTIwMBAyokqEonIvXv35NChQ2K3242k9XdM2pDPRKXlAH6pW+L+1eVysXbtWoqKihJHq9VKT08PPT09hEIhenp6khMVOuznaO9/DJsSn9nACcdKFQEfou1DfQfITfHUceAp2khpEJF/mhpXusBKqXy0HUsH4Ew6OgEPsEq39cD3gNUAFosFi8VCNBo1XA0BD9CeNPYl2X+ACd3G9eOwiCQm97w0z/lZBvwa+AJoIel5b6q2fPlyOXjwoDx9+lRCoZAcO3ZMiouL5+VDtxfAE+AeWrGzxrQ5rJRaAfwWbYi+osLCQtxuN3a7HafTicPhwOl0kpuby8qVK/F4PAkrKSlh27ZtWCxTl+nW1lYeP35Mf38//f39hMNh+vv7iUQijI+PMzExkTiOjIwQDk/Z7ZkAPhGRWdfDOYH1YuJPwLfz8vKoqamhoqKCjRs34vP5pt2Dnk2hUIjm5maam5sZHx9n+/bt7Ny5k82bN8/Lz8uXL+ns7KSjo4P6+nrq6+uNUfgH4Gcyw+1kKsC3gB8VFxfT1NREJBKhvb2dYDBIV1cXwWCQoaEhrFZrwmw2bXmPxWLEYjGi0SixWIxgMEhvb++013G73WzZsgWbzTann9zcXLxeL16vl/Xr17Nhwwa6uro4evQoQ0NDAF+JyI7XBf4C2KeUQilFPB6ftX0KCgOPgK/QktB23dal69hisRjxPUYrRafApQLsAD5Be6Kv0JaMfwFB3brR6mdrkhkVXEy3qH7sFZHgDNfxAD793On8GD5iaG8DedH+JC/afXMpkIP21sAvZlq3U16WlFJOICYi0TkbvwEpbQ9piYiMztouU4XHQtXX7o34d8CLXe+AF7v+C7CmoXz095PxAAAAAElFTkSuQmCC"}
[
"signout"
]
{
"type":"earned",
"description":"January Salary",
"amount":89000
}
[
{
"id": 3,
"type": "earned",
"description": "January Opentext Salary",
"amount": 88430,
"date": "2024-01-07",
"userId": 1
},
{
"id": 4,
"type": "spent",
"description": "Credit card bill",
"amount": 2500,
"date": "2024-01-07",
"userId": 1
}
]
{
"id":"3",
"type":"spent",
"description":"January Opentext Salary",
"amount":89000
}
[
"deleted"
]
You can import my postman collection file from this repo - MoneyMap.postman_collection.json and see the examples to know how to hit these APIs.
Run the project locally and open url - http://localhost:8082/swagger-ui/index.html#/