{"id":15138477,"url":"https://github.com/ardac67/expense_tracker","last_synced_at":"2026-01-20T03:04:31.324Z","repository":{"id":184994929,"uuid":"672806451","full_name":"ardac67/Expense_Tracker","owner":"ardac67","description":"Some sort of api i tried to make :)","archived":false,"fork":false,"pushed_at":"2023-08-04T09:25:49.000Z","size":109,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-02-12T14:53:53.943Z","etag":null,"topics":["docker","mongodb","vertx"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ardac67.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-31T07:58:08.000Z","updated_at":"2024-08-13T11:29:18.000Z","dependencies_parsed_at":"2024-09-16T12:33:39.686Z","dependency_job_id":"148d61d4-dc52-40ce-b19f-6baec7545a56","html_url":"https://github.com/ardac67/Expense_Tracker","commit_stats":null,"previous_names":["ardac67/expense_tracker"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ardac67%2FExpense_Tracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ardac67%2FExpense_Tracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ardac67%2FExpense_Tracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ardac67%2FExpense_Tracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ardac67","download_url":"https://codeload.github.com/ardac67/Expense_Tracker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247457815,"owners_count":20941912,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","mongodb","vertx"],"created_at":"2024-09-26T07:24:22.151Z","updated_at":"2026-01-20T03:04:31.318Z","avatar_url":"https://github.com/ardac67.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Expense Tracker\n\n## Table of Contents\n- [Introduction](#introduction)\n- [Installation](#installation)\n- [API Endpoints](#api-endpoints)\n\n## Introduction\n\nExpense Tracker is a simple backend project designed for learning purposes. It allows users to track their expenses within a specified timeline. Please note that this project is not intended for professional use, and certain APIs have been omitted for security reasons.\n\n## Installation\n\nTo get started with Expense Tracker, follow these steps:\n\n1. Clone this repository to your local machine:\n\n2. Navigate to the project directory:\n\n3. Build the project using gradle:\n\n4. Run the application:\n\n\n**Note**: This project utilizes a MongoDB container from Docker. Ensure that you handle it properly or install Docker if you want to use it.\n\n## API Endpoints\n\nExpense Tracker provides API endpoints for various functionalities. Below are the available endpoints:\n\n1. **GET /track/getPosts**\n- Description: Fetches all expense posts according to a given timeline. Requires basic authentication.\n- Request Parameters:\n  - Key: startDate (Required) - Value: 2023-01-01\n  - Key: endDate (Required) - Value: 2023-12-12\n- Response: Provides a list of expenseTypes with their values and the userId of the expenses.\n\n2. **GET /track/getPosts**\n- Description: Fetches all expenses and generates a report for the given timeline. Requires basic authentication.\n- Request Parameters:\n  - Key: startDate (Required) - Value: 2023-01-01\n  - Key: endDate (Required) - Value: 2023-01-01\n  - Key: desiredCurrencies (Required) - Populated with the currencies to fetch data for. Value: \"TRL\"\n  - Key: currencyDate (Required) - Gets the value of the currencies for that date. Value: 2023-01-01\n- Response: Calculates the total expenses for the given timeline and provides a report with total and unit-based values for all requested currencies. Possible response codes are 200 and 400 (bad request, some parameters may be missing or not properly formatted).\n   ```json\n    {\n        \"UserId\": \"64c77ce88b343523d050130f\",\n        \"BaseCurrency\": \"USD\",\n        \"StartDate\": \"2023-01-01\",\n        \"EndDate\": \"2023-12-12\",\n        \"CurrencyDate\": \"2022-07-20\",\n        \"Currency\": {\n            \"GBP/USD\": 1.1976,\n            \"EUR/USD\": 1.01806\n        },\n        \"USD\": {\n            \"health\": 20759.68,\n            \"Transportation\": 17158.63,\n            \"Education\": 4931.2,\n            \"food\": 7850.0,\n            \"Entertainment\": 2650.0,\n            \"Utilities\": 2030.0,\n            \"Total\": 55379.51\n        },\n        \"OtherCurrencies\": {\n            \"GBP\": {\n                \"health\": 17334.4,\n                \"Transportation\": 14327.51,\n                \"Education\": 4117.57,\n                \"food\": 6554.78,\n                \"Entertainment\": 2212.76,\n                \"Utilities\": 1695.06,\n                \"Total\": 46242.08\n            },\n            \"EUR\": {\n                \"health\": 20391.41,\n                \"Transportation\": 16854.24,\n                \"Education\": 4843.72,\n                \"food\": 7710.74,\n                \"Entertainment\": 2602.99,\n                \"Utilities\": 1993.99,\n                \"Total\": 54397.1\n            }\n        }\n    }\n  ```\n\n3. **POST /createUser**\n- Description: Creates a user with the provided data. No authentication is required.\n- Request Body: \n  ```json\n  {\n    \"name\": \"ardaTest1\", // Name of the user\n    \"password\": \"123\",   // Password of the user\n    \"currency\": \"USD\"    // Currency used as the base currency for calculations\n  }\n  ```\n- Response: Returns code 201 if the user is created successfully or code 401 if there is a bad request.\n\n4. **POST /track/createExpense**\n- Description: Posts the body of the request as an expense. Requires authentication.\n- Request Body: A sample body is provided, and additional fields can be added if desired.\n  ```json\n  [\n    {\n      \"expenseType\": {\n        \"health\": 1200.50,\n        \"Transportation\": 1000.25,\n        \"Education\": 300.75,\n        \"food\": 500.00,\n        \"Entertainment\": 200.00,\n        \"Utilities\": 150.00\n      },\n      \"submittedDate\": \"2023-09-25\"\n    }\n  ]\n  ```\n- Response: Returns code 201 if the request is successful (expense is created) or code 400 if the request is bad (invalid schema).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fardac67%2Fexpense_tracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fardac67%2Fexpense_tracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fardac67%2Fexpense_tracker/lists"}