Overview • Architecture • Tech Stack • Getting Started • Development • Documentation
Finance App is a modern financial management application built using a microservices architecture. It provides a robust platform for personal and family finance management, featuring real-time data processing, AI-powered insights, and comprehensive financial tracking.
finance-app/
├── apps/
│ ├── api-gateway/ # GraphQL API Gateway
│ ├── user-service/ # User Management Service
│ ├── logging-service/ # Centralized Logging Service
│ ├── family-service/ # Family Management Service (TODO)
│ ├── financial-service/ # Financial Operations Service (TODO)
│ ├── balance-service/ # Balance Management Service (TODO)
│ ├── bank-service/ # Bank Integration Service (TODO)
│ └── ai-chat-service/ # AI Assistant Service (TODO)
├── libs/
│ └── common/ # Shared Code
│ ├── src/
│ │ ├── proto/ # Protocol Buffers
│ │ ├── interfaces/ # TypeScript Interfaces
│ │ └── logging/ # Logging Infrastructure
└── docker/
├── docker-compose.yml
└── elk/ # ELK Stack Configuration
Service | Port | Protocol |
---|---|---|
API Gateway | 3000 | GraphQL |
User Service | 50051 | gRPC |
Family Service | 50052 | gRPC |
Financial Service | 50053 | gRPC |
Balance Service | 50054 | gRPC |
Bank Service | 50055 | gRPC |
AI Chat Service | 50056 | gRPC |
- Backend: NestJS with TypeScript
- API Gateway: GraphQL
- Microservices Communication: gRPC
- Database: MongoDB
- Logging: ELK Stack (Elasticsearch, Logstash, Kibana)
- Containerization: Docker & Docker Compose
- Elasticsearch for log storage
- Logstash for log processing
- Kibana for visualization
- Custom logging service with Winston
- Node.js (v18 or higher)
- Docker and Docker Compose
- MongoDB
- pnpm (recommended) or npm
- Clone the repository
git clone https://github.com/yourusername/finance-app.git
cd finance-app
- Install dependencies
pnpm install
- Set up environment variables
cp .env.example .env
- Start the ELK Stack
docker-compose -f docker/elk/docker-compose.yml up -d
- Start the development servers
pnpm start:dev
Create .env
files for each service:
# User Service (.env)
MONGODB_URI=mongodb://root:root123@localhost:27017/user_db?authSource=admin
GRPC_PORT=50051
# API Gateway (.env)
USER_SERVICE_URL=localhost:50051
PORT=3000
{
"scripts": {
"start:dev:user": "nest start user-service --watch",
"start:dev:gateway": "nest start api-gateway --watch",
"start:dev": "concurrently \"npm run start:dev:user\" \"npm run start:dev:gateway\"",
"build": "nest build user-service && nest build api-gateway"
}
}
Access GraphQL Playground: http://localhost:3000/graphql
Example mutation:
mutation {
createUser(input: {
email: "[email protected]"
password: "123456"
name: "Test User"
}) {
id
email
name
}
}
Using grpcurl for testing:
grpcurl -plaintext -d '{
"email": "[email protected]",
"password": "123456",
"name": "Test User"
}' localhost:50051 user.UserService/Create
Access Kibana dashboard:
- URL: http://localhost:5601
- Default index pattern:
finance-app-logs-*
Example of using the logging decorator:
import { Log } from '@app/common/logging';
@Injectable()
export class UserService {
@Log({ serviceName: 'user-service' })
async createUser(data: CreateUserDto) {
// Implementation
}
}
- Fork the repository
- Create your feature branch
git checkout -b feature/amazing-feature
- Commit your changes
git commit -m 'Add amazing feature'
- Push to the branch
git push origin feature/amazing-feature
- Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Project setup
- User service implementation
- API Gateway
- Logging service
- Family service
- Financial service
- Authentication & Authorization
- Basic financial operations
- Balance tracking
- Bank integration
- AI-powered insights
- Advanced analytics
- Comprehensive testing
- CI/CD pipeline
- Documentation
- Performance optimization
For support, email [email protected]
- NestJS Documentation
- gRPC Documentation
- GraphQL Documentation
- MongoDB Documentation
- Elastic Stack Documentation