0c1f6968493a15bfc2fe72f7d667de03b66b48b7
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)
Option 1: Docker Compose (Recommended)
# 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 userPOST /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 IDPOST /api/environments- Create new environmentPUT /api/environments/{id}- Update environmentDELETE /api/environments/{id}- Delete environmentGET /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 configurationjwt.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:
- Story 1: Business Unit Management
- Story 2: Application Management
- Story 3: Contact Management
- Story 4: Enhanced Environment Management
- Story 5: Version Management
- Story 6: Deployment Tracking
- 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
Description
Languages
Java
39.6%
TypeScript
27.1%
HTML
14.7%
SCSS
13.1%
Dockerfile
1.8%
Other
3.7%