{"id":16749971,"url":"https://github.com/ashishbhoi/expense-tracker-postgres","last_synced_at":"2025-03-16T04:20:01.069Z","repository":{"id":180384599,"uuid":"664745126","full_name":"ashishbhoi/expense-tracker-postgres","owner":"ashishbhoi","description":null,"archived":false,"fork":false,"pushed_at":"2023-07-18T04:40:31.000Z","size":167,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-22T16:48:12.899Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/ashishbhoi.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-10T16:45:23.000Z","updated_at":"2023-07-10T16:45:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"6ca854be-2e13-4b0c-b93a-fa4e8763e4a4","html_url":"https://github.com/ashishbhoi/expense-tracker-postgres","commit_stats":null,"previous_names":["ashishbhoi/expense-tracker-postgres"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashishbhoi%2Fexpense-tracker-postgres","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashishbhoi%2Fexpense-tracker-postgres/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashishbhoi%2Fexpense-tracker-postgres/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashishbhoi%2Fexpense-tracker-postgres/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ashishbhoi","download_url":"https://codeload.github.com/ashishbhoi/expense-tracker-postgres/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243823195,"owners_count":20353628,"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":[],"created_at":"2024-10-13T02:26:37.589Z","updated_at":"2025-03-16T04:20:01.051Z","avatar_url":"https://github.com/ashishbhoi.png","language":"Java","readme":"# This is a REST Api Build with Spring Boot using JPA and Lombok\n\n## Features\n\n- User can register and login `POST /api/users/register` `POST /api/users/login`\n- User can create, update and delete categories `POST, PUT, DELETE /api/categories`\n- User can create, update and delete transactions `POST, PUT, DELETE /api/categories/{category-id}/transactions`\n- User can view all categories with total expense `GET /api/categories`\n- User can view all transactions `GET /api/categories/{category-id}/transactions`\n\n## Security\n- JWT is used for authentication and authorization\n- User can only access his own data\n- User can only access his own categories and transactions\n- You can generate a new token using `POST /api/users/login` and use the token in the `Authorization` header with the\n  value `Bearer \u003ctoken\u003e` to access the protected routes.\n\n## Protected Routes\n- `POST, PUT, DELETE /api/categories/**`\n- So you need to use JWT to access these routes.\n- To get JWT you refer to the [Security](#security) section.\n\n# How to run the application\n\n1. Clone the repository\n    ```bash\n    git clone https://github.com/ashishbhoi/expense-tracker.git\n    ```\n\n2. Set Environment variable\n    ```bash\n    export JDBC_URL=\"jdbc:postgresql://\u003cdatabase-url\u003e:\u003cdatabase-port\u003e/\u003cyour-database-name\u003e\"\n    export API_SECRET_KEY=\"\u003cyour-api-secret-key\u003e\"\n    export JDBC_USER=\"\u003cdatabase-user-name\u003e\"\n    export JDBC_PASS=\"\u003cdatabase-user-name\u003e\"\n    ```\n   \u003e api secret key can be any string of your choice.\n\n   \u003e To user other database you need to modify the `build.gradle` file and add the dependency for the database driver.\n\n   \u003e Then you just need to change the `JDBC_URL` to your database url and `JDBC_USER` and `JDBC_PASS` to your database\n   username and password.\n\n3. Run the application\n    ```bash\n    gradle bootRun\n    ```\n   if you don't have gradle installed, you can use the `gradlew` file in the root directory.\n    ```bash\n    ./gradlew bootRun\n    ```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashishbhoi%2Fexpense-tracker-postgres","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fashishbhoi%2Fexpense-tracker-postgres","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashishbhoi%2Fexpense-tracker-postgres/lists"}