Skip to content

khushal87/expense-tracker-backend-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The project is a simple expense tracker that allows users to add, delete, and view their expenses. The project is based on the following stack:

  • Go
  • PostGres
  • Redis

Getting Started

First, clone the repository:

git clone https://github.com/khushal87/expense-tracker-backend-go

Next, navigate to the project directory:

cd expense-tracker-backend-go

Create a .env file in the root of the project and add the following environment variables:

DB_USER=your_db_user
DB_PASSWORD=your_db_password
DB_NAME=your_db_name
DB_PORT=your_db_port
DB_HOST=your_db_host
REDIS_ADDRESS=your_redis_address
REDIS_PASSWORD=your_redis_password

Next, run the following command to start the project:

  • Install the dependencies:
go mod tidy
  • Run the project:
go run main.go

The project will be running on http://localhost:8080.

API Endpoints

The project has the following API endpoints:

  • GET /sources: Get all expenses
  • POST /sources/create: Add a new expense
  • DELETE /sources/delete/{id}: Delete an expense
  • GET /transactions: Get all transactions
  • POST /transactions/create: Add a new transaction
  • DELETE /transactions/delete/{id}: Delete a transaction

Future Improvements

  • Add authentication
  • Add tests

About

The expense tracker backend on Go.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages