A modern banking API built with TypeScript, Express, TypeORM, and PostgreSQL, following clean architecture principles.
- Node.js
- TypeScript
- Express
- PostgreSQL
- TypeORM
- Docker & Docker Compose
- tsyringe (Dependency Injection)
The project follows clean architecture principles with distinct layers:
src/
├── application/ # Application services
├── core/ # Domain entities and interfaces
├── infrastructure/ # Database, ORM entities, repositories
└── presentation/ # Controllers and routes
-
Clone the repository
-
Create a
.env
file in the root directory with the following variables:PORT=3000 POSTGRES_USER=youruser POSTGRES_PASSWORD=yourpassword POSTGRES_DB=xbank POSTGRES_HOST=localhost
-
Install dependencies:
npm install
# Run database
docker-compose up -d postgres
# Start the application in development mode
npm run dev
# Build the application
npm run build
# Start the application
npm start
# Run docker compose development file
docker compose -f docker-compose.dev.yml up
# Run docker compose production file
docker compose up
# Generate a new migration
npm run migration:gen
# Sync migrations
npm run migration:sync
# Drop migrations
npm run migration:drop
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some 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.