|
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 |
2 | 18 |
|
3 | 19 | ### What is the main functionality? |
4 | 20 |
|
@@ -98,214 +114,103 @@ This project follows an API-first development approach. All API changes start wi |
98 | 114 |
|
99 | 115 | ``` |
100 | 116 | /api # API specifications (single source of truth) |
101 | | - ├── gateway.yaml # API Gateway specification |
| 117 | + ├── gateway.yaml # API Gateway specification |
102 | 118 | ├── user-service.yaml # User Service specification |
103 | 119 | ├── concept-service.yaml # Concept Service specification |
104 | 120 | ├── genai-service.yaml # GenAI Service specification |
105 | 121 | ├── scripts/ # Code generation scripts |
106 | 122 | └── README.md # API documentation |
107 | 123 | ``` |
108 | 124 |
|
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 |
117 | 126 |
|
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 |
119 | 130 |
|
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 |
123 | 137 |
|
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 |
134 | 143 |
|
135 | 144 | --- |
136 | 145 |
|
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: |
210 | 146 |
|
211 | | -```bash |
212 | | -# First, generate code from OpenAPI specs |
213 | | -./api/scripts/gen-all.sh |
214 | 147 |
|
215 | | -# Then start Docker Compose |
216 | | -docker-compose up |
217 | | -``` |
| 148 | +## 🧪 Testing & CI/CD Automation |
218 | 149 |
|
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) |
227 | 155 |
|
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 |
229 | 160 |
|
230 | | -The default docker-compose setup is optimized for development: |
| 161 | +See [Testing Strategy](./TESTING.md) for detailed coverage and methodology. |
231 | 162 |
|
232 | | -```bash |
233 | | -# Start development environment (default configuration) |
234 | | -./start-dev.sh |
235 | | -# OR manually: |
236 | | -docker-compose up --build |
237 | | -``` |
| 163 | +## ⚙️ Prerequisites |
238 | 164 |
|
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 |
244 | 167 |
|
245 | | -**Services Available:** |
246 | | -- Client (Angular frontend) at [http://localhost:3000](http://localhost:3000) |
247 | | -- All backend services running and connected |
| 168 | +## 🔧 Development Options |
248 | 169 |
|
249 | | -**Environment Options:** |
| 170 | +### Environment Flexibility |
250 | 171 | ```bash |
251 | 172 | # Development (default) |
252 | | -docker-compose up --build |
| 173 | +./start-dev.sh |
253 | 174 |
|
254 | | -# Staging environment |
| 175 | +# Staging environment |
255 | 176 | CLIENT_BUILD_ENV=staging docker-compose up --build |
256 | 177 |
|
257 | | -# Production environment |
| 178 | +# Production environment |
258 | 179 | CLIENT_BUILD_ENV=production docker-compose up --build |
259 | 180 | ``` |
260 | 181 |
|
| 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` |
261 | 189 |
|
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 | +--- |
305 | 191 |
|
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 |
0 commit comments