Skip to content

Commit 7986635

Browse files
Changed code to MVC Pattern & OOPs Principles
1 parent 4c095ca commit 7986635

25 files changed

+1683
-883
lines changed

.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ EMBEDDING_MODEL="text-embedding-3-small"
55
EMBEDDING_API_VERSION="2023-05-15"
66
ENDPOINT="https://ai4se-openai.openai.azure.com/"
77
AZURE_OPENAI_API_KEY="VDfaCeEbTyAyPRC3C02mZyyANPxZGBxODmWOpWechSlv7GQ8zmmuJQQJ99AKACI8hq2XJ3w3AAABACOGPYeE"
8+
MONGODB_URI="mongodb://localhost:27017/"

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,7 @@ Thumbs.db
1616

1717
# Docker-related files
1818
*.log
19-
.env
19+
.env
20+
21+
notes.txt
22+
temp.json

README.md

Lines changed: 44 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,63 @@
1-
```markdown
21
# Domain Modelling Copilot
32

4-
Domain Modelling Copilot is an interactive web-based tool that allows users to describe scenarios in natural language and automatically generate domain models and UML diagrams using AI. It helps streamline the domain modeling process by bridging the gap between narrative and visual design.
3+
**Domain Modelling Copilot** is a web-based assistant that transforms natural language scenarios into domain models and generates UML diagrams automatically. Powered by OpenAI, it streamlines the process of moving from user stories to structured models.
54

6-
🛠️ Getting Started
5+
---
76

8-
1. Clone the repository
7+
## Features
98

10-
git clone https://github.com/VasiliySeibert/domain-modelling-copilot.git
11-
cd domain-modelling-copilot
12-
```
9+
- Accepts user scenarios in natural language.
10+
- Classifies input as "General" or "Scenario" intelligently.
11+
- Generates detailed scenarios and concise summaries using GPT models.
12+
- Converts extracted domain structures into **PlantUML** diagrams.
13+
- Includes a full test suite for backend routes with **pytest**.
1314

14-
2. Set up a virtual environment (optional)
15+
---
1516

16-
```bash
17-
python -m venv venv
18-
source venv/bin/activate # On Windows: venv\Scripts\activate
19-
```
17+
## Tech Stack
2018

21-
3. Install dependencies
19+
- **Python 3.9+**
20+
- **Flask** (Web Framework)
21+
- **OpenAI API** (Azure variant support)
22+
- **PlantUML** (Diagram generation)
23+
- **pytest** (Testing)
24+
- **dotenv** (Environment management)
2225

23-
```bash
24-
python -m pip install -r requirements.txt
25-
```
26+
---
2627

27-
4. Set your OpenAI API key
28+
## Getting Started
2829

29-
You must have an OpenAI API key to use the application. Set it as an environment variable:
30+
### 1. Clone the repository
3031

3132
```bash
32-
export OPENAI_API_KEY=your_api_key_here # On Windows: set OPENAI_API_KEY=your_api_key_here
33+
git clone https://github.com/YOUR_USERNAME/domain-modelling-copilot.git
34+
cd domain-modelling-copilot
3335
```
3436

35-
5. Run the application
36-
37+
### 2. Create and activate a virtual environment
3738
```bash
38-
python app.py
39+
python -m venv venv
40+
source venv/bin/activate # On Windows: venv\Scripts\activate
41+
```
42+
### 3. Install the dependencies
43+
```bash
44+
pip install -r requirements.txt
45+
```
46+
### 4. Configure environment variables
47+
Create a .env file and set your Azure OpenAI credentials:
48+
49+
```env
50+
API_TYPE="azure"
51+
GPT_MODEL="gpt-4o-mini"
52+
GPT_API_VERSION="2024-08-01-preview"
53+
EMBEDDING_MODEL="text-embedding-3-small"
54+
EMBEDDING_API_VERSION="2023-05-15"
55+
ENDPOINT="https://your-azure-endpoint/"
56+
AZURE_OPENAI_API_KEY="your-api-key"
3957
```
4058

41-
Visit `http://localhost:5000` in your browser.
59+
### 5. Run the application
60+
```bash
61+
python app.py
4262
```
63+
Visit: http://localhost:5000

app.py

Lines changed: 0 additions & 243 deletions
This file was deleted.

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ flask==2.2.5
22
python-dotenv==1.0.0
33
openai==1.70.0
44
pytest==7.4.0
5-
werkzeug==2.2.3
5+
werkzeug==2.2.3
6+
pymongo==4.5.0

run.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from src.app import app
2+
3+
if __name__ == "__main__":
4+
app.run(debug=True)

0 commit comments

Comments
 (0)