Skip to content

Backend Technical Stack

Ahmed Marzook edited this page Dec 2, 2024 · 3 revisions

Backend Technical Stack

Core Technologies

Spring Boot Framework

  • Version: Latest Spring Boot 3.x
  • Features utilized:
    • Spring WebFlux for reactive programming
    • Spring Cache with Redis
    • Spring Security

Java

  • Version: 21
  • Development Requirements:
    • JDK 21 or higher
    • Gradle 8.5+
    • Compatible IDE with Java 21 support

Redis

  • Version: latest
  • Features utilized:
    • First-level caching: Spring Cache with Redis
    • Cache eviction policies based on time and capacity

Backend Archtecture

---
title: Backend Flow Diagram
---
flowchart LR
    BE[Backend Server] <--> RC[(Redis Cache)]
    BE <--> API[External API Server]
    
    classDef server fill:#90CAF9,stroke:#1976D2,color:#000000
    classDef cache fill:#FFAB91,stroke:#E64A19,color:#000000
    classDef api fill:#A5D6A7,stroke:#388E3C,color:#000000
    
    class BE server
    class RC cache
    class API api
Loading

Docker Configuration

Build and Publish Process

  1. Prerequisites:

    • Docker installed (20.10.x or higher)
    • Docker Hub account with write access
    • Logged in to Docker Hub (docker login)
  2. Building the Image:

# Build with specific version and latest tag
docker build . \
    --file Dockerfile \
    --tag kaizenflow/weather-bridge-server:<VERSION-NUMBER> \
    --tag kaizenflow/weather-bridge-server:latest
  1. Publishing to Docker Hub:
# Push specific version
docker push kaizenflow/weather-bridge:<VERSION-NUMBER>

# Push latest tag
docker push kaizenflow/weather-bridge-server:latest

Deployment Configuration

  1. Basic Run Configuration:
docker run -d \
    --name weather-bridge-server \
    -e VISUAL_CROSSING_API_KEY=****** \
    -e SERVER_PORT=8080 \
    -p 80:8080 \
    --restart unless-stopped \
    kaizenflow/weather-bridge-server:latest
  1. Production Run Configuration:
docker run -d \
    --name weather-bridge-server \
    -e VISUAL_CROSSING_API_KEY=****** \
    -p 8080:8080 \
    --restart unless-stopped \
    --health-cmd="curl -f http://localhost:8080/actuator/health || exit 1" \
    --health-interval=30s \
    --health-timeout=10s \
    --health-retries=3 \
    kaizenflow/weather-bridge-server:latest

Environment Variables

  • VISUAL_CROSSING_API_KEY: API key for external weather service

Clone this wiki locally