Lab 15: Capstone — Microservice
Step 1: Project Structure
microservice/
├── composer.json
├── public/
│ └── index.php # Slim app entry point
├── src/
│ ├── Domain/
│ │ ├── User.php # readonly class
│ │ └── UserCreatedEvent.php
│ ├── Repository/
│ │ └── UserRepository.php
│ ├── Service/
│ │ ├── AuthService.php
│ │ └── UserService.php
│ ├── Middleware/
│ │ ├── JwtMiddleware.php
│ │ └── JsonResponseMiddleware.php
│ └── Handler/
│ ├── RegisterHandler.php
│ ├── LoginHandler.php
│ └── UserListHandler.php
└── tests/
├── Unit/
│ └── UserServiceTest.php
└── Integration/
└── ApiTest.phpStep 2: composer.json & Dependencies
Step 3: Domain Layer
Step 4: Repository
Step 5: Auth Service with JWT
Step 6: PSR-14 Event System Integration
Step 7: Slim 4 Application
Step 8: Tests & Full Verification
Running the Full Microservice
Capstone Architecture Summary
Complete Feature Checklist
Feature
Implementation
Status
Summary
Lab
Concept Used
Last updated
