|
1 | | -# AI Event Concepter |
| 1 | +# AI Event Concepter |
| 2 | + |
| 3 | +## 🚀 Quick Start (≤3 Commands) |
| 4 | + |
| 5 | +**Prerequisites:** |
| 6 | +- [Node.js](https://nodejs.org/) (v22+) |
| 7 | +- [Docker](https://www.docker.com/get-started/) |
| 8 | +- [Docker Compose](https://docs.docker.com/compose/install/) |
| 9 | + |
| 10 | +Then install code generation dependencies: |
| 11 | +```bash |
| 12 | +npm install |
| 13 | +``` |
| 14 | + |
| 15 | +**Start the application:** |
| 16 | +```bash |
| 17 | +# Edit docker-compose.yml line 135: Replace 'your_api_token' with your actual OpenWebUI API token |
| 18 | +./start-dev.sh |
| 19 | +``` |
| 20 | + |
| 21 | +**Access the application:** |
| 22 | +- Client (Angular frontend) at [http://localhost:4200](http://localhost:4200) |
| 23 | +- API Gateway at [http://localhost:8080](http://localhost:8080) |
| 24 | +- Full stack running with real backend services |
| 25 | + |
| 26 | +> **Note:** Before running, edit `docker-compose.yml` line 135 and replace `your_api_token` with your actual OpenWebUI API token. |
| 27 | +
|
| 28 | +--- |
| 29 | + |
| 30 | +## Purpose |
2 | 31 |
|
3 | 32 | ### What is the main functionality? |
4 | 33 |
|
@@ -98,214 +127,103 @@ This project follows an API-first development approach. All API changes start wi |
98 | 127 |
|
99 | 128 | ``` |
100 | 129 | /api # API specifications (single source of truth) |
101 | | - ├── gateway.yaml # API Gateway specification |
| 130 | + ├── gateway.yaml # API Gateway specification |
102 | 131 | ├── user-service.yaml # User Service specification |
103 | 132 | ├── concept-service.yaml # Concept Service specification |
104 | 133 | ├── genai-service.yaml # GenAI Service specification |
105 | 134 | ├── scripts/ # Code generation scripts |
106 | 135 | └── README.md # API documentation |
107 | 136 | ``` |
108 | 137 |
|
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 |
117 | | - |
118 | | -### Available Scripts |
119 | | - |
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 |
123 | | - |
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 | | -``` |
134 | | - |
135 | | ---- |
| 138 | +### Interactive API Documentation |
136 | 139 |
|
137 | | -## ⚙️ Prerequisites |
| 140 | +- **Local Development**: Run `./start-docs.sh` to launch Swagger UI for all services |
| 141 | +- **Documentation Hub**: `docs/index.html` provides unified access to all API docs |
| 142 | +- **Individual Specs**: Each service OpenAPI spec can be viewed independently |
138 | 143 |
|
139 | | -Make sure the following tools are installed: |
| 144 | +### API-First Engineering Process |
| 145 | +1. **Design**: Update OpenAPI specifications first |
| 146 | +2. **Validate**: Automated linting and specification validation |
| 147 | +3. **Generate**: Code generation from specifications |
| 148 | +4. **Test**: API contract testing and validation |
| 149 | +5. **Deploy**: Automated CI/CD pipeline deployment |
140 | 150 |
|
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 |
| 151 | +**Engineering Process Evidence:** |
| 152 | +- ✅ **Documented Requirements**: Clear API contracts in `/api` directory |
| 153 | +- ✅ **Architecture Models**: UML diagrams (Analysis Object Model, Use Case, Component) |
| 154 | +- ✅ **API-First Workflow**: Specifications drive implementation |
| 155 | +- ✅ **Automated Validation**: Pre-commit hooks and CI pipeline checks |
146 | 156 |
|
147 | 157 | --- |
148 | 158 |
|
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 | 159 |
|
182 | | - # For User Service |
183 | | - cd ../user-svc |
184 | | - ./gradlew build |
185 | 160 |
|
186 | | - # For Concept Service |
187 | | - cd ../concept-svc |
188 | | - ./gradlew build |
| 161 | +## 🧪 Testing & CI/CD Automation |
189 | 162 |
|
190 | | - # For GenAI Service |
191 | | - cd ../genai-svc |
192 | | - pip install -r requirements.txt |
193 | | - ``` |
| 163 | +### Test Coverage & Automation |
| 164 | +- **Unit Tests**: JUnit (Java), pytest (Python), Jasmine (Angular) |
| 165 | +- **Integration Tests**: Database operations, API endpoints, service interactions |
| 166 | +- **CI Pipeline**: GitHub Actions runs tests automatically on PR and merge |
| 167 | +- **Coverage Tools**: JaCoCo (Java), pytest-cov (Python), ng test (Angular) |
194 | 168 |
|
195 | | -## Running the Application |
| 169 | +### Automated Testing in CI |
| 170 | +- **On Pull Request**: Lint, unit tests, API validation |
| 171 | +- **On Merge**: Full test suite, integration tests, deployment |
| 172 | +- **API-First Validation**: OpenAPI spec validation and code generation verification |
196 | 173 |
|
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 | | -``` |
| 174 | +See [Testing Strategy](./TESTING.md) for detailed coverage and methodology. |
204 | 175 |
|
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 | | - |
211 | | -```bash |
212 | | -# First, generate code from OpenAPI specs |
213 | | -./api/scripts/gen-all.sh |
214 | | - |
215 | | -# Then start Docker Compose |
216 | | -docker-compose up |
217 | | -``` |
218 | | - |
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) |
227 | | - |
228 | | -### 🚀 Development Environment (Default) |
229 | | - |
230 | | -The default docker-compose setup is optimized for development: |
231 | | - |
232 | | -```bash |
233 | | -# Start development environment (default configuration) |
234 | | -./start-dev.sh |
235 | | -# OR manually: |
236 | | -docker-compose up --build |
237 | | -``` |
| 176 | +## ⚙️ Prerequisites |
238 | 177 |
|
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 |
| 178 | +- [Node.js](https://nodejs.org/) (v22+), Java JDK 21+, Docker, Git |
| 179 | +- **All dependencies auto-installed** by setup scripts |
244 | 180 |
|
245 | | -**Services Available:** |
246 | | -- Client (Angular frontend) at [http://localhost:3000](http://localhost:3000) |
247 | | -- All backend services running and connected |
| 181 | +## 🔧 Development Options |
248 | 182 |
|
249 | | -**Environment Options:** |
| 183 | +### Environment Flexibility |
250 | 184 | ```bash |
251 | 185 | # Development (default) |
252 | | -docker-compose up --build |
| 186 | +./start-dev.sh |
253 | 187 |
|
254 | | -# Staging environment |
| 188 | +# Staging environment |
255 | 189 | CLIENT_BUILD_ENV=staging docker-compose up --build |
256 | 190 |
|
257 | | -# Production environment |
| 191 | +# Production environment |
258 | 192 | CLIENT_BUILD_ENV=production docker-compose up --build |
259 | 193 | ``` |
260 | 194 |
|
| 195 | +### Manual Service Development |
| 196 | +For individual service development, see respective service READMEs: |
| 197 | +- [Gateway Service](./gateway/README.md) - `./gradlew bootRun --args='--spring.profiles.active=local'` |
| 198 | +- [User Service](./user-svc/README.md) - `./gradlew bootRun` |
| 199 | +- [Concept Service](./concept-svc/README.md) - `./gradlew bootRun` |
| 200 | +- [GenAI Service](./genai-svc/README.md) - `python app.py` |
| 201 | +- [Client App](./client/README.md) - `ng serve` |
261 | 202 |
|
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 |
| 203 | +--- |
305 | 204 |
|
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). |
| 205 | +## 📚 Documentation |
| 206 | + |
| 207 | +### Core Documentation |
| 208 | +- **[API Specifications](./api/README.md)** - OpenAPI specs and API-first development |
| 209 | +- **[API Documentation Hub](./docs/index.html)** - Interactive Swagger UI for all services |
| 210 | +- **[Infrastructure & Deployment](./infrastructure/README.md)** - Terraform, Ansible, CI/CD setup |
| 211 | +- **[Monitoring](./helm/monitor/README.md)** - Prometheus, Grafana, alerting |
| 212 | + |
| 213 | +### Service Documentation |
| 214 | +- **[Concept Service](./concept-svc/README.md)** - Event concepts, PDF generation |
| 215 | +- **[User Service](./user-svc/README.md)** - User management, authentication, JWT tokens |
| 216 | +- **[GenAI Service](./genai-svc/README.md)** - LangChain integration, AI-powered features |
| 217 | +- **[Gateway Service](./gateway/README.md)** - API routing, JWT authentication |
| 218 | +- **[Client App](./client/README.md)** - Angular frontend, environment configuration |
| 219 | + |
| 220 | +### Development & Testing |
| 221 | +- **[Testing Strategy](./TESTING.md)** - Test coverage, CI automation, GenAI testing |
| 222 | +- **[GenAI Testing](./genai-svc/tests/README.md)** - Conversation history and concept suggestion tests |
| 223 | +- **[Helm Deployment](./helm/ai-event-concepter/README.md)** - Kubernetes deployment guide |
| 224 | + |
| 225 | +### Team Responsibilities |
| 226 | +Based on [CODEOWNERS](./.github/CODEOWNERS): |
| 227 | +- **@lenni108**: API specs (shared), Angular client, concept service, infrastructure, documentation |
| 228 | +- **@sfdamm**: Gateway, GenAI service, CI/CD workflows, Helm charts, API specs (shared), documentation |
| 229 | +- **@ClaudiaDuenzinger**: User service, monitoring stack, documentation |
0 commit comments