2026-02-09 19:33:55 +01:00
2026-02-09 19:33:55 +01:00
2026-02-09 19:06:56 +01:00
2026-02-09 19:33:55 +01:00
2026-02-07 17:51:17 +01:00
2026-02-08 18:31:27 +01:00
2026-02-07 22:14:45 +01:00
2026-02-07 20:14:12 +01:00
2026-02-07 21:56:36 +01:00
2026-02-07 20:14:12 +01:00
2026-02-07 17:51:17 +01:00
2026-02-07 18:00:01 +01:00
2026-02-07 22:14:45 +01:00
2026-02-08 16:44:04 +01:00

LDPv2 Monorepo - Story 0: Foundation

Complete implementation of Story 0 (Walking Skeleton) with Spring Boot backend and Angular 18 frontend.

📁 Project Structure

ldpv2-monorepo/
├── backend/              # Spring Boot 3.2 backend
│   ├── src/
│   │   ├── main/java/com/ldpv2/
│   │   │   ├── config/           # Security, OpenAPI config
│   │   │   ├── controller/       # REST controllers
│   │   │   ├── domain/entity/    # JPA entities
│   │   │   ├── dto/              # Request/Response DTOs
│   │   │   ├── exception/        # Exception handlers
│   │   │   ├── repository/       # Spring Data repositories
│   │   │   ├── security/         # JWT security
│   │   │   └── service/          # Business logic
│   │   └── resources/
│   │       ├── application.yml   # Configuration
│   │       └── db/changelog/     # Liquibase migrations
│   ├── pom.xml
│   └── Dockerfile
├── frontend/             # Angular 18 frontend
│   ├── src/app/
│   │   ├── core/                 # Auth, guards, interceptors
│   │   ├── shared/               # Models, components
│   │   └── features/             # Feature modules
│   ├── package.json
│   ├── angular.json
│   └── Dockerfile
├── docker-compose.yml    # Complete Docker setup
└── README.md            # This file

🚀 Quick Start

Prerequisites

  • Docker & Docker Compose
  • JDK 17+ (for local backend development)
  • Node.js 18+ (for local frontend development)
# Start all services
docker-compose up --build

# Access the application
Frontend: http://localhost:4200
Backend API: http://localhost:8080/api
Swagger UI: http://localhost:8080/swagger-ui/index.html
PostgreSQL: localhost:5432

Option 2: Local Development

Backend

cd backend

# Using Maven
./mvnw spring-boot:run

# Or with Docker for PostgreSQL only
docker run -d -p 5432:5432 \
  -e POSTGRES_DB=ldpv2 \
  -e POSTGRES_USER=ldpv2_user \
  -e POSTGRES_PASSWORD=ldpv2_password \
  postgres:16-alpine

Frontend

cd frontend

# Install dependencies
npm install

# Start dev server
npm start

# Access at http://localhost:4200

🔑 Default Credentials

  • Username: admin
  • Password: admin123

📚 API Documentation

Swagger UI is available at: http://localhost:8080/swagger-ui/index.html

Authentication Endpoints

  • POST /api/auth/register - Register new user
  • POST /api/auth/login - Login and get JWT token

Environment Endpoints (Requires Authentication)

  • GET /api/environments - List all environments (paginated)
  • GET /api/environments/{id} - Get environment by ID
  • POST /api/environments - Create new environment
  • PUT /api/environments/{id} - Update environment
  • DELETE /api/environments/{id} - Delete environment
  • GET /api/environments/search?query={name} - Search environments

🧪 Testing

Backend Tests

cd backend
./mvnw test

# With coverage
./mvnw clean test jacoco:report

Frontend Tests

cd frontend
npm test

# E2E tests
npm run e2e

📦 Database Migrations

Liquibase automatically runs migrations on startup. Migration files are in: backend/src/main/resources/db/changelog/

🔧 Configuration

Backend Configuration

Edit backend/src/main/resources/application.yml

Key properties:

  • spring.datasource.* - Database configuration
  • jwt.secret - JWT signing secret (CHANGE IN PRODUCTION!)
  • jwt.expiration - Token expiration time

Frontend Configuration

Edit frontend/src/environments/environment.ts

🐳 Docker Commands

# Build all images
docker-compose build

# Start services
docker-compose up

# Start in background
docker-compose up -d

# View logs
docker-compose logs -f

# Stop all services
docker-compose down

# Stop and remove volumes
docker-compose down -v

📝 Story 0 Implementation Checklist

Backend

  • Spring Boot 3.2 setup with Maven
  • PostgreSQL 16 integration
  • Liquibase database migrations
  • JWT authentication & authorization
  • User entity and authentication
  • Environment entity (CRUD example)
  • Global exception handling
  • OpenAPI/Swagger documentation
  • Docker support

Frontend

  • Angular 18 setup
  • Authentication service
  • JWT interceptor
  • Auth guard for route protection
  • Login component
  • Environment list component
  • Environment form component
  • Environment detail component
  • Responsive Material Design

DevOps

  • Docker Compose setup
  • Multi-stage Dockerfiles
  • PostgreSQL in Docker
  • Health checks
  • Environment variables

🎯 Next Steps

After Story 0 is complete, proceed with:

  1. Story 1: Business Unit Management
  2. Story 2: Application Management
  3. Story 3: Contact Management
  4. Story 4: Enhanced Environment Management
  5. Story 5: Version Management
  6. Story 6: Deployment Tracking
  7. Story 7: Current State Dashboard & History

🐛 Troubleshooting

Backend won't start

  • Check PostgreSQL is running: docker ps
  • Check logs: docker-compose logs backend
  • Verify database credentials in application.yml

Frontend can't connect to backend

  • Verify backend is running on port 8080
  • Check CORS configuration in SecurityConfig.java
  • Verify proxy configuration in proxy.conf.json

Database migrations fail

  • Stop all containers: docker-compose down -v
  • Remove volumes and restart: docker-compose up --build

📄 License

Proprietary - LDPv2 Team

👥 Team

LDPv2 Development Team


Version: 1.0.0 - Story 0 Foundation
Last Updated: February 2026
Status: Complete and Ready for Development

S
Description
No description provided
Readme 412 KiB
Languages
Java 39.6%
TypeScript 27.1%
HTML 14.7%
SCSS 13.1%
Dockerfile 1.8%
Other 3.7%