Skip to content

alexansaa/TradingJavaLayer

Repository files navigation

📗 Table of Contents

📖 Trading Java Layer

[Trading Java Layer] This project represents the Java layer of the Trading-App Stack, serving as the main backend API and security gateway of the system. It provides a unified access layer to the database, manages authentication and authorization, and coordinates communication between the frontend and the Python analytics service.

The Java layer is built with Spring Boot and containerized using Docker, following a DevOps CI/CD pipeline for automated deployment. It ensures stable API exposure, secure token validation, and smooth integration with the rest of the trading stack.

This service plays a central role in maintaining data integrity, scalability, and access control across the entire system architecture.

Other repos on the App Stack for this project:

🛠 Built With

Tech Stack

Core Technologies

Key Features

  • 🔐 Authentication & Authorization Integrates with Azure Entra ID and Google Federation using MSAL to secure API access with OAuth2/JWT.
  • ⚙️ REST API Gateway Provides a secure communication layer between the frontend and backend services.
  • 💾 Database Access Layer Connects to the SQL Server database and exposes structured endpoints for market and user data.
  • 🔁 Python Layer Integration Acts as middleware between the frontend and Python service, routing analytics and forecasting requests.
  • 🐳 Containerized Deployment Runs as a Dockerized service, designed to integrate seamlessly into the multi-container environment (trading-core network).

(back to top)

💻 Getting Started

To get a local copy up and running, follow these steps.

Prerequisites

  • Java 21+ (compatible with Spring Boot 3.x)
  • Docker & Docker Compose (for containerized deployment)
  • Git (to clone the repository and manage source control)
  • SQL Server instance running within the same Docker network (trading-core)
  • Azure DevOps Agent (if deploying via CI/CD pipeline)
  • Azure Entra ID App Registration (for MSAL authentication)

Setup

Clone this repository to your desired folder:

  git clone https://github.com/alexansaa/TradingJavaLayer.git
  cd TradingJavaLayer

Ensure the shared network exists. The Python container must communicate with the SQL container through the shared Docker network:

  docker network create trading-core || true

Run

To run locally (without Docker):

  mvn spring-boot:run

To build and run as a Docker container:

  docker compose up --build -d

Verify API is running:

  curl http://localhost:8080/api/health

Expected response:

  {"status": "ok"}

(back to top)

👥 Authors

👤 Alexander

(back to top)

🔭 Future Features

  • 🔒 [Role-Based Access Control (RBAC)] for user groups and admin permissions.
  • 🌐 [Cross-Layer Request Authorization] between Java and Python services.
  • 📈 [Enhanced API Analytics] and request logging.
  • [Reactive Endpoints] for real-time data relay from the Python layer.
  • ☁️ [Kubernetes Deployment Support] for horizontal scaling and load balancing.

(back to top)

🤝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

(back to top)

⭐️ Show your support

If you like this project, please give it a star on GitHub

(back to top)

🙏 Acknowledgments

I’d like to thank my wife for her patience and unwavering support during my darkest and most isolated days, when completing systems like these demanded every bit of my time, focus, and perseverance

(back to top)

📝 License

This project is licensed under the GNU General Public License.

(back to top)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published