Skip to content

Commit 7c4dadd

Browse files
improve: documentation
1 parent 35aacf3 commit 7c4dadd

File tree

10 files changed

+678
-425
lines changed

10 files changed

+678
-425
lines changed

README.md

Lines changed: 85 additions & 180 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
1-
# AI Event Concepter
1+
# AI Event Concepter
2+
3+
## 🚀 Quick Start (≤3 Commands)
4+
5+
```bash
6+
git clone https://github.com/AET-DevOps25/team-git-push-force.git && cd team-git-push-force
7+
./start-dev.sh
8+
```
9+
10+
**Access the application:**
11+
- Client (Angular frontend) at [http://localhost:4200](http://localhost:4200)
12+
- API Gateway at [http://localhost:8080](http://localhost:8080)
13+
- Full stack running with real backend services
14+
15+
---
16+
17+
## Purpose
218

319
### What is the main functionality?
420

@@ -98,214 +114,103 @@ This project follows an API-first development approach. All API changes start wi
98114

99115
```
100116
/api # API specifications (single source of truth)
101-
├── gateway.yaml # API Gateway specification
117+
├── gateway.yaml # API Gateway specification
102118
├── user-service.yaml # User Service specification
103119
├── concept-service.yaml # Concept Service specification
104120
├── genai-service.yaml # GenAI Service specification
105121
├── scripts/ # Code generation scripts
106122
└── README.md # API documentation
107123
```
108124

109-
### Development Workflow
110-
111-
1. **Update API Specifications**: Make changes to the OpenAPI specs in the `/api` directory
112-
2. **Lint OpenAPI Specs**: Run `npm run lint:openapi` to validate the specs
113-
3. **Generate Code**: Run `npm run generate:code` to generate code from the specs
114-
4. **Implement Business Logic**: Implement the business logic using the generated code
115-
5. **Run Tests**: Run tests to verify the implementation
116-
6. **Submit PR**: Submit a PR with the changes
125+
### Interactive API Documentation
117126

118-
### Available Scripts
127+
- **Local Development**: Run `./start-docs.sh` to launch Swagger UI for all services
128+
- **Documentation Hub**: `docs/index.html` provides unified access to all API docs
129+
- **Individual Specs**: Each service OpenAPI spec can be viewed independently
119130

120-
- `npm run lint:openapi`: Lint OpenAPI specifications
121-
- `npm run docs:openapi`: Generate API documentation
122-
- `npm run generate:code`: Generate code from OpenAPI specifications
131+
### API-First Engineering Process
132+
1. **Design**: Update OpenAPI specifications first
133+
2. **Validate**: Automated linting and specification validation
134+
3. **Generate**: Code generation from specifications
135+
4. **Test**: API contract testing and validation
136+
5. **Deploy**: Automated CI/CD pipeline deployment
123137

124-
### Pre-commit Hooks
125-
126-
This project uses pre-commit hooks to ensure code quality. The hooks are configured in `.pre-commit-config.yaml`.
127-
128-
To install pre-commit hooks:
129-
130-
```bash
131-
pip install pre-commit
132-
pre-commit install
133-
```
138+
**Engineering Process Evidence:**
139+
-**Documented Requirements**: Clear API contracts in `/api` directory
140+
-**Architecture Models**: UML diagrams (Analysis Object Model, Use Case, Component)
141+
-**API-First Workflow**: Specifications drive implementation
142+
-**Automated Validation**: Pre-commit hooks and CI pipeline checks
134143

135144
---
136145

137-
## ⚙️ Prerequisites
138-
139-
Make sure the following tools are installed:
140-
141-
- [Node.js](https://nodejs.org/) (v22 or later)
142-
- Java JDK 21+
143-
- [Gradle](https://gradle.org/)
144-
- Docker and Docker Compose
145-
- Git
146-
147-
---
148-
149-
## 🚀 Setup Instructions
150-
151-
### Clone the Repository
152-
153-
```bash
154-
git clone https://github.com/AET-DevOps25/team-git-push-force.git
155-
cd team-git-push-force
156-
```
157-
158-
### Client Setup
159-
160-
1. Navigate to the `client` directory:
161-
```bash
162-
cd client
163-
```
164-
2. Install dependencies:
165-
```bash
166-
npm install
167-
```
168-
169-
### Backend Services Setup
170-
171-
1. Generate code from OpenAPI specifications:
172-
```bash
173-
./api/scripts/gen-all.sh
174-
```
175-
176-
2. Navigate to each service directory and build the project:
177-
```bash
178-
# For Gateway
179-
cd gateway
180-
./gradlew build
181-
182-
# For User Service
183-
cd ../user-svc
184-
./gradlew build
185-
186-
# For Concept Service
187-
cd ../concept-svc
188-
./gradlew build
189-
190-
# For GenAI Service
191-
cd ../genai-svc
192-
pip install -r requirements.txt
193-
```
194-
195-
## Running the Application
196-
197-
### Option 1: Using Docker Compose (Recommended)
198-
199-
Before running the application, you need to generate code from the OpenAPI specifications. You can use the provided start-dev script which handles this automatically:
200-
201-
```bash
202-
./start-dev.sh
203-
```
204-
205-
This script will:
206-
1. Run code generation from OpenAPI specs
207-
2. Start all services using Docker Compose
208-
209-
Alternatively, you can run these steps manually:
210146

211-
```bash
212-
# First, generate code from OpenAPI specs
213-
./api/scripts/gen-all.sh
214147

215-
# Then start Docker Compose
216-
docker-compose up
217-
```
148+
## 🧪 Testing & CI/CD Automation
218149

219-
This will start all services:
220-
- Client (Angular frontend) at [http://localhost:3000](http://localhost:3000)
221-
- API Gateway at [http://localhost:8080](http://localhost:8080)
222-
- User Service at [http://localhost:8081](http://localhost:8081)
223-
- Concept Service at [http://localhost:8082](http://localhost:8082)
224-
- GenAI Service at [http://localhost:8083](http://localhost:8083)
225-
- Weaviate Vector Database at [http://localhost:8087](http://localhost:8087)
226-
- MinIO Object Storage at [http://localhost:9000](http://localhost:9000) (API) and [http://localhost:9001](http://localhost:9001) (Console)
150+
### Test Coverage & Automation
151+
- **Unit Tests**: JUnit (Java), pytest (Python), Jasmine (Angular)
152+
- **Integration Tests**: Database operations, API endpoints, service interactions
153+
- **CI Pipeline**: GitHub Actions runs tests automatically on PR and merge
154+
- **Coverage Tools**: JaCoCo (Java), pytest-cov (Python), ng test (Angular)
227155

228-
### 🚀 Development Environment (Default)
156+
### Automated Testing in CI
157+
- **On Pull Request**: Lint, unit tests, API validation
158+
- **On Merge**: Full test suite, integration tests, deployment
159+
- **API-First Validation**: OpenAPI spec validation and code generation verification
229160

230-
The default docker-compose setup is optimized for development:
161+
See [Testing Strategy](./TESTING.md) for detailed coverage and methodology.
231162

232-
```bash
233-
# Start development environment (default configuration)
234-
./start-dev.sh
235-
# OR manually:
236-
docker-compose up --build
237-
```
163+
## ⚙️ Prerequisites
238164

239-
This setup:
240-
-**Development Mode**: Uses development environment configuration by default
241-
-**Real Backend**: All backend services running for full-stack development
242-
-**Easy Setup**: Single command to start the entire stack
243-
-**Environment Flexibility**: Can easily switch to staging or production builds
165+
- [Node.js](https://nodejs.org/) (v22+), Java JDK 21+, Docker, Git
166+
- **All dependencies auto-installed** by setup scripts
244167

245-
**Services Available:**
246-
- Client (Angular frontend) at [http://localhost:3000](http://localhost:3000)
247-
- All backend services running and connected
168+
## 🔧 Development Options
248169

249-
**Environment Options:**
170+
### Environment Flexibility
250171
```bash
251172
# Development (default)
252-
docker-compose up --build
173+
./start-dev.sh
253174

254-
# Staging environment
175+
# Staging environment
255176
CLIENT_BUILD_ENV=staging docker-compose up --build
256177

257-
# Production environment
178+
# Production environment
258179
CLIENT_BUILD_ENV=production docker-compose up --build
259180
```
260181

182+
### Manual Service Development
183+
For individual service development, see respective service READMEs:
184+
- [Gateway Service](./gateway/README.md) - `./gradlew bootRun --args='--spring.profiles.active=local'`
185+
- [User Service](./user-svc/README.md) - `./gradlew bootRun`
186+
- [Concept Service](./concept-svc/README.md) - `./gradlew bootRun`
187+
- [GenAI Service](./genai-svc/README.md) - `python app.py`
188+
- [Client App](./client/README.md) - `ng serve`
261189

262-
### Manual Development Setup
263-
264-
Before starting the services manually, you need to generate code from the OpenAPI specifications:
265-
266-
```bash
267-
./api/scripts/gen-all.sh
268-
```
269-
270-
This will generate the necessary code for all services based on the OpenAPI specifications in the `/api` directory.
271-
272-
#### Start the Client
273-
274-
```bash
275-
cd client
276-
npm run dev
277-
```
278-
The client will be available at [http://localhost:3000](http://localhost:3000).
279-
280-
#### Start the Gateway
281-
282-
```bash
283-
cd gateway
284-
./gradlew bootRun
285-
```
286-
The API Gateway will be available at [http://localhost:8080](http://localhost:8080).
287-
288-
#### Start the User Service
289-
290-
```bash
291-
cd user-svc
292-
./gradlew bootRun
293-
```
294-
The User Service will be available at [http://localhost:8081](http://localhost:8081).
295-
296-
#### Start the Concept Service
297-
298-
```bash
299-
cd concept-svc
300-
./gradlew bootRun
301-
```
302-
The Concept Service will be available at [http://localhost:8082](http://localhost:8082).
303-
304-
#### Start the GenAI Service
190+
---
305191

306-
```bash
307-
cd genai-svc
308-
pip install -r requirements.txt
309-
python app.py
310-
```
311-
The GenAI Service will be available at [http://localhost:8083](http://localhost:8083).
192+
## 📚 Documentation
193+
194+
### Core Documentation
195+
- **[API Specifications](./api/README.md)** - OpenAPI specs and API-first development
196+
- **[API Documentation Hub](./docs/index.html)** - Interactive Swagger UI for all services
197+
- **[Infrastructure & Deployment](./infrastructure/README.md)** - Terraform, Ansible, CI/CD setup
198+
- **[Monitoring](./helm/monitor/README.md)** - Prometheus, Grafana, alerting
199+
200+
### Service Documentation
201+
- **[Concept Service](./concept-svc/README.md)** - Event concepts, PDF generation
202+
- **[User Service](./user-svc/README.md)** - User management, authentication, JWT tokens
203+
- **[GenAI Service](./genai-svc/README.md)** - LangChain integration, AI-powered features
204+
- **[Gateway Service](./gateway/README.md)** - API routing, JWT authentication
205+
- **[Client App](./client/README.md)** - Angular frontend, environment configuration
206+
207+
### Development & Testing
208+
- **[Testing Strategy](./TESTING.md)** - Test coverage, CI automation, GenAI testing
209+
- **[GenAI Testing](./genai-svc/tests/README.md)** - Conversation history and concept suggestion tests
210+
- **[Helm Deployment](./helm/ai-event-concepter/README.md)** - Kubernetes deployment guide
211+
212+
### Team Responsibilities
213+
Based on [CODEOWNERS](./.github/CODEOWNERS):
214+
- **@lenni108**: API specs (shared), Angular client, concept service, infrastructure, documentation
215+
- **@sfdamm**: Gateway, GenAI service, CI/CD workflows, Helm charts, API specs (shared), documentation
216+
- **@ClaudiaDuenzinger**: User service, monitoring stack, documentation

TESTING.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Testing Strategy & Coverage
2+
3+
## 🧪 Test Coverage Overview
4+
5+
- **Unit Tests**: Comprehensive coverage via JUnit (Java) & pytest (Python)
6+
- **Integration Tests**: API endpoints, database operations, service interactions
7+
- **E2E Tests**: Critical user flows via Cypress (frontend)
8+
- **GenAI Tests**: LLM response parsing, conversation handling, document processing
9+
10+
## 🚀 Running Tests
11+
12+
### Individual Services
13+
```bash
14+
# Backend services (Spring Boot)
15+
cd concept-svc && ./gradlew test
16+
cd user-svc && ./gradlew test
17+
cd gateway && ./gradlew test
18+
19+
# GenAI service (Python)
20+
cd genai-svc && python -m pytest
21+
22+
# Frontend (Angular)
23+
cd client && npm test
24+
```
25+
26+
## 🔄 CI/CD Automation
27+
28+
### GitHub Actions Pipeline
29+
- **On PR**: Unit tests, linting
30+
- **On merge**: Full test suite + deployment
31+
32+
### Test Stages
33+
1. **Lint & Build**: Code quality checks
34+
2. **Unit Tests**: Fast isolated tests
35+
3. **Integration**: Database + API tests
36+
37+
## 🤖 GenAI Testing Strategy
38+
39+
### LLM Response Testing
40+
- **Mock responses** for consistent unit tests
41+
- **Response parsing** validation (JSON extraction)
42+
- **Conversation history** handling
43+
- **Concept suggestion** accuracy
44+
45+
### RAG Pipeline Testing
46+
- **Document ingestion** workflow
47+
- **Vector embedding** verification
48+
- **Similarity search** accuracy
49+
- **Context retrieval** relevance
50+
51+
### Test Files
52+
- `genai-svc/tests/test_conversation_history.py`
53+
- `genai-svc/tests/test_concept_suggestions.py`
54+
- `genai-svc/tests/test_app.py`
55+
- `genai-svc/tests/test_health.py`
56+
57+
## 🛠️ Test Configuration
58+
59+
### Database Testing
60+
- **H2 in-memory** for unit tests
61+
- **PostgreSQL containers** for integration
62+
- **Test data isolation** per test class
63+
64+
### Security Testing
65+
- **JWT validation** edge cases
66+
- **Authentication flows** validation
67+
- **Authorization** boundary testing
68+
69+
## 🐛 Debugging Tests
70+
71+
```bash
72+
# Verbose test output
73+
./gradlew test --info
74+
75+
# Debug specific test
76+
./gradlew test --tests "ConceptServiceTest.createConcept"
77+
78+
# Python debug mode
79+
python -m pytest -v -s tests/
80+
```

0 commit comments

Comments
 (0)