A production-grade expense tracking backend API built with Go, following Clean Architecture principles. This service powers the Expense Tracker frontend application.
- Go - Core backend language
- MySQL - Primary database
- Redis - Caching layer
- RabbitMQ - Message queue
- Docker - Containerization
- Amazon ECS - Container orchestration
- Amazon Lambda - Cron job
- Amazon S3 - File storage
- API Gateway - API management
- GitHub Actions - CI/CD pipeline
- RESTful API endpoints for:
- User authentication and authorization
- Transaction management (create, read, update, delete)
- Category management
- Upload custom icons for categories
- Financial reporting and analytics
- Comprehensive test coverage
- Clean Architecture implementation
- Scalable infrastructure design
- Secure API endpoints
- Performance optimized with caching
This project follows Clean Architecture principles, ensuring:
-
Independence of layers: Changes in one layer don't affect others, ensuring modular development.
-
Testability: Business logic can be tested in isolation without external dependencies.
-
Maintainability through separation of concerns: Each component has a single responsibility, simplifying maintenance.
-
Database independence: Business logic is decoupled from storage implementation, allowing flexible database choices.
-
Easier feature implementation: Clear boundaries enable safe addition of new features without side effects.
-
Long-term scalability: Architecture supports growing complexity while maintaining code quality.
There are two ways to run this project locally:
You need to install docker to run this project locally.
If you only want to run the backend API without cloning the frontend repository:
-
Clone this repository:
git clone git@github.com:eyo-chen/expense-tracker-go.git cd expense-tracker-go
-
Copy the environment file:
cp .env.example .env
-
Run the application:
make run
The API will be available at http://localhost:8000
and the frontend will be available at http://localhost:3000
To run both frontend and backend together, you'll need to set up the following directory structure:
expense-tracker-app/
├── expense-tracker-go/ # Backend
└── expense-tracker/ # Frontend
Follow these steps:
-
Create and enter the main project directory:
mkdir expense-tracker-app cd expense-tracker-app
-
Clone both repositories:
# Clone backend git clone git@github.com:eyo-chen/expense-tracker-go.git # Clone frontend git clone git@github.com:eyo-chen/expense-tracker.git
-
Enter the backend directory and set up environment:
cd expense-tracker-go cp .env.example .env
-
Update the
.env
file with your configurations -
Run both services:
# inside expense-tracker-go directory make run-with-frontend
The API will be available at http://localhost:8000
and the frontend will be available at http://localhost:3000