Skip to content

Commit

Permalink
initial-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
sathish-kumar-G committed Oct 8, 2024
1 parent 39ae318 commit d25d50c
Show file tree
Hide file tree
Showing 1,883 changed files with 62,360 additions and 1 deletion.
315 changes: 314 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,314 @@
# dynamo-ai-template
<h1 align="center"> <a href="https://github.com/Breezeware-OS/"><img src="https://github.com/user-attachments/assets/07f2efc7-111f-4dee-b775-98fa8743e2c6" alt="Dynamo" width="400" align="center"></a>
</h1>

<h4 align="center">A powerful platform designed to supercharge business app development and streamline internal tool creation. Manage, organize, and innovate—all in one place</h4>

<div align="center">
<a href="http://www.apache.org/licenses/LICENSE-2.0"><img alt="Apache Licenses 2.0" src="https://img.shields.io/static/v1?label=Apache Licenses&message=2.0&color=18B2C6"/></a>
<a href="https://breezeware.net/"><img alt="Dynamo: 1.0.0" src="https://img.shields.io/static/v1?label=Dynamo&message=1.0.0&color=18B2C6"/></a>
<a href="https://www.java.com/en/"> <img alt="Java: 17.0.2" src="https://img.shields.io/static/v1?label=Java&message=17.0.0&color=18B2C6"/></a>
<a href="https://spring.io/projects/spring-boot" > <img alt="Spring Boot: 3.0.5" src="https://img.shields.io/static/v1?label=Spring%20Boot&message=3.2.5&color=18B2C6"/></a>
<a href="https://react.dev/" > <img alt="ReactJS" src="https://img.shields.io/static/v1?label=ReactJS&message=17&color=18B2C6"/></a>
</div>

<div align="center">
<h3>
<a href="https://breezeware.net/" target="_blank">
Website
</a>
<span> | </span>
<a href="https://youtu.be/Gi6kUB-gNXE" target="_blank">
Live Demo
</a>
<span> | </span>
<a href="https://breezeware-os.github.io/dynamo-docs/" target="_blank">
Documentation
</a>
</h3>
</div>

<p align="center">
<a href="https://www.linkedin.com/company/breezeware/" target="_blank"><img src="https://github.com/user-attachments/assets/eba2ef57-1d5e-4138-8ff2-c70234be0cb6" height="36px" margin-left="20px" alt="" title=""></a>
<a href="https://youtu.be/Gi6kUB-gNXE" target="_blank"><img src="https://github.com/user-attachments/assets/b50facda-da49-4027-87f3-af6fd5fa13b7" height="36px" margin-left="20px" alt="" title=""></a>
</p>

<br/>

* **Accelerate development and reduce effort**. Leverage industry-specific templates, pre-built modules, and out-of-the-box features.
* **Ensure flexibility and scalability**. Build applications with dynamic entities and choose from multiple multi-tenancy models.
* **Utilize familiar technologies**: Java, Spring Boot, JavaScript, HTML, ReactJS, SpringAI, BPMN, Hibernate, PostgreSQL.
* **Expand at will**. Dynamo provides unlimited customization and seamless integration options.

<br/>

<h3 align="left">Languages and Tools:</h3>
<p align="left">
<a href="https://www.w3schools.com/css/" target="_blank" rel="noreferrer">
<img src="https://raw.githubusercontent.com/devicons/devicon/master/icons/css3/css3-original-wordmark.svg" alt="css3" width="40" height="40"/>
</a>
<a href="https://www.docker.com/" target="_blank" rel="noreferrer">
<img src="https://raw.githubusercontent.com/devicons/devicon/master/icons/docker/docker-original-wordmark.svg" alt="docker" width="40" height="40"/>
</a>
<a href="https://git-scm.com/" target="_blank" rel="noreferrer">
<img src="https://www.vectorlogo.zone/logos/git-scm/git-scm-icon.svg" alt="git" width="40" height="40"/>
</a>
<a href="https://www.w3.org/html/" target="_blank" rel="noreferrer">
<img src="https://raw.githubusercontent.com/devicons/devicon/master/icons/html5/html5-original-wordmark.svg" alt="html5" width="40" height="40"/>
</a>
<a href="https://www.java.com" target="_blank" rel="noreferrer">
<img src="https://raw.githubusercontent.com/devicons/devicon/master/icons/java/java-original.svg" alt="java" width="40" height="40"/>
</a>
<a href="https://spring.io/" target="_blank" rel="noreferrer">
<img src="https://www.vectorlogo.zone/logos/springio/springio-icon.svg" alt="spring" width="40" height="40"/>
</a>
<a href="https://aws.amazon.com/" target="_blank" rel="noreferrer">
<img src="https://raw.githubusercontent.com/devicons/devicon/master/icons/amazonwebservices/amazonwebservices-original-wordmark.svg" alt="aws" width="40" height="40"/>
</a>
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript" target="_blank" rel="noreferrer">
<img src="https://raw.githubusercontent.com/devicons/devicon/master/icons/javascript/javascript-original.svg" alt="javascript" width="40" height="40"/>
</a>
<a href="https://www.linux.org/" target="_blank" rel="noreferrer">
<img src="https://raw.githubusercontent.com/devicons/devicon/master/icons/linux/linux-original.svg" alt="linux" width="40" height="40"/>
</a>
<a href="https://mochajs.org" target="_blank" rel="noreferrer">
<img src="https://www.vectorlogo.zone/logos/mochajs/mochajs-icon.svg" alt="mocha" width="40" height="40"/>
</a>
<a href="https://www.postgresql.org" target="_blank" rel="noreferrer">
<img src="https://raw.githubusercontent.com/devicons/devicon/master/icons/postgresql/postgresql-original-wordmark.svg" alt="postgresql" width="40" height="40"/>
</a>
<a href="https://reactjs.org/" target="_blank" rel="noreferrer">
<img src="https://raw.githubusercontent.com/devicons/devicon/master/icons/react/react-original-wordmark.svg" alt="react" width="40" height="40"/>
</a>
<a href="https://redux.js.org" target="_blank" rel="noreferrer">
<img src="https://raw.githubusercontent.com/devicons/devicon/master/icons/redux/redux-original.svg" alt="redux" width="40" height="40"/>
</a>
<a href="https://www.selenium.dev" target="_blank" rel="noreferrer">
<img src="https://raw.githubusercontent.com/detain/svg-logos/780f25886640cef088af994181646db2f6b1a3f8/svg/selenium-logo.svg" alt="selenium" width="40" height="40"/>
</a>
</p>

<br/>



### 📌Contents

🚀 [How to start](#-getting-started)\
💡 [Application screenshots](#application-screenshots)\
📜 [Release notes](#️-release-notes)\
🤝 [Support](#support)

<br/>

## 🚀 Getting started

### Overview
This document provides a comprehensive overview of the **Dynamo AI** application. Designed to enhance document management and interaction, Dynamo AI leverages **Spring AI**, **OpenAI**, **PostgreSQL**, **pgvector**, and **Keycloak** to create, tune, and embed models for efficient document handling and query responses. This template facilitates seamless collaboration between users, enabling the creation of models, uploading documents for tuning and embedding, and providing intelligent responses to queries about the documents. Utilizing these technologies ensures robust performance, scalability, and secure authentication.

This guide walks through setting up your **Dynamo AI** application using Docker Compose. It also covers how to set up authentication using Keycloak.

| Release Name | Description | Release Date |
|--------------|-------------|--------------|
| MVP - 1.0.0 | The **Dynamo AI** application is a powerful framework designed to streamline document management and interaction through AI-driven models. By clearly defining roles, tasks, and integration points, it ensures that all stakeholders can effectively create models, upload and tune documents, and query information seamlessly. Leveraging Spring AI and OpenAI provides the necessary flexibility and scalability to adapt to evolving user needs. Integration with PostgreSQL and pgvector ensures efficient data storage and vector-based operations, while Keycloak manages secure authentication and authorization. | 08-10-2024 |

---

## Using Docker Compose

### Prerequisites

Before starting, ensure the following are installed and available on your system:

* **Docker** or **Docker Desktop** - (Docker Version - 20.10.x and above)
* Open ports: **8080**, **8081**, **3000**, **5432**, **5433** - Ensure that the following ports are not in use.
* **AWS Services** - Make sure you have access to AWS services, specifically S3 for document storage and CloudFront for content delivery.
* **OpenAI API Access** - Obtain access to the OpenAI API, which is required to utilize AI models for your application.

### 1.1 Setup with Docker Compose

1. Navigate to the project folder in your terminal.
2. Run the following command to start the Docker containers:

```bash
OPENAI_API_KEY=your-api-key \
OPENAI_CHAT_MODEL=chat-model \
AWS_REGION=region \
AWS_ACCESS_KEY_ID=aws-access-key \
AWS_SECRET_ACCESS_KEY=aws-secret-key \
AWS_S3_BUCKET_NAME=aws-bucket-name \
DOCUMENT_CDN_URL=aws-cloud-front-url \
docker-compose up
```

- **OPENAI_API_KEY**: Your OpenAI API key is used to authenticate requests to OpenAI services.
- **OPENAI_CHAT_MODEL**: The specific OpenAI chat model you wish to use (e.g., `gpt-4`, `gpt-3.5-turbo-0125 `).
- **AWS_REGION**: The AWS region where your services are hosted (e.g., `us-east-1`).
- **AWS_ACCESS_KEY_ID**: Your AWS access key ID for authenticating AWS services.
- **AWS_SECRET_ACCESS_KEY**: Your AWS secret access key for authenticating AWS services.
- **AWS_S3_BUCKET_NAME**: The name of your AWS S3 bucket where documents will be stored.
- **DOCUMENT_CDN_URL**: The URL of your AWS CloudFront distribution serving the documents as a CDN.

This command will pull and download the necessary containers, and the client will run on [localhost:3000](http://localhost:3000).
4. Default Credentials for **Dynamo AI** - **Username**: [email protected] **Password**: breeze123 or Signup.

5. Application Port
* **Backend Server -** 8081
* **Backend Resource Server -** 5433
* **Patient Frontend Client -** 3000
* **Careteam Frontend Client -** 3001
* **Provider Frontend Client -** 3002
* **Auth Server -** 8080

### 1.2 If Docker not installed - Docker Installation

#### **For Docker on Linux:**

1. Update your packages:

```bash
sudo apt-get update
```
2. Install Docker using:

```bash
sudo apt install docker.io
```
3. Verify installation:

```bash
docker --version
```

#### **For Docker Desktop on Mac/Windows:**

1. Download and install Docker Desktop from [here](https://www.docker.com/products/docker-desktop).
2. Follow the installation instructions and start Docker Desktop.

### 1.3 Troubleshooting

#### Checking and Managing Active Ports

Ensure that the following ports are not in use:

* **8080**
* **8081**
* **3000**
* **5432**
* **5433**

If any of these ports are active, you need to free them by killing the respective processes. You can check for active ports using:

```bash
lsof -i :<port_number>
```

To kill a process on a specific port:

```bash
kill -9 <process_id>
```

#### If you encounter file permission issues, use the following command:

```bash
sudo chown -R $USER:$USER postgres-datas/
```

#### If this doesn’t resolve the issue, try:

* Resetting changes with Git:

```bash
git checkout .
```
* Deleting the project and re-cloning it.

#### If you encounter Error response from daemon: pull access denied for public.ecr.aws, use the following command:

```bash
docker logout public.ecr.aws
```



---

## Additional Notes

* Always verify that no other processes are using ports **8080**, **8081**, **3000**, **5432**, or **5433** before running the services.
* If you encounter port issues, repeat the process to kill active ports as mentioned above.


---

This completes the setup for the Dynamo AI Template. If you have any more problems, please feel free to refer to the troubleshooting section or restart from the first steps.


## Features

- **Model Creation**: Users can create and manage AI models tailored to their specific document management needs.

- **Document Upload**: Seamlessly upload documents to the system for tuning and embedding, enhancing the model's understanding and response capabilities.

- **Intelligent Querying**: Ask questions about the uploaded documents and receive accurate, context-aware responses powered by AI.

- **Secure Authentication**: Robust security managed through Keycloak ensures that only authorized users can access and interact with the application.

- **Model Tuning with Prompts**: Fine-tune AI models using custom prompts to better align with specific use cases and improve response accuracy.

- **Configuration Options**: Customize model behavior by adjusting parameters such as:
- **Temperature**: Controls the randomness of the AI responses. Lower values make the output more deterministic, while higher values increase creativity.
- **Top-K**: Limits the number of highest probability tokens to consider for generating the next word, helping to manage response diversity.
- **Top-P**: Also known as nucleus sampling, it considers the smallest set of tokens whose cumulative probability exceeds the threshold P, balancing creativity and coherence.

- **Model Testing**: Evaluate the performance of AI models through testing interfaces to ensure they meet desired standards before deployment.

- **Model Utilization**: Deploy and integrate customized AI models within the application to handle various document management and querying tasks effectively.




## Application Screenshots
![Screenshot from 2024-10-08 11-07-47](https://github.com/user-attachments/assets/2ca1278b-ffd2-4459-8ab5-bf6c44d73b6f)

![Screenshot from 2024-10-08 11-08-07](https://github.com/user-attachments/assets/106ca30c-90b0-4614-9728-73ccd2f5103f)

![Screenshot from 2024-10-08 11-09-12](https://github.com/user-attachments/assets/f3a14aed-6295-4d9c-b3cb-8e80ba22bcd7)

![Screenshot from 2024-10-08 11-09-23](https://github.com/user-attachments/assets/6926bac5-1a40-4516-bb02-a40fee28e356)

![Screenshot from 2024-10-08 11-11-56](https://github.com/user-attachments/assets/d0782512-ee9a-4ae1-864c-d223a70c0886)

![Screenshot from 2024-10-08 11-12-09](https://github.com/user-attachments/assets/4df72f33-cc9f-462c-b634-9e37d15cc6c1)

![Screenshot from 2024-10-08 11-12-21](https://github.com/user-attachments/assets/3d50430e-6ffc-4b3f-a636-18a69dbae94e)

![Screenshot from 2024-10-08 11-14-10](https://github.com/user-attachments/assets/7d01e9ed-d80d-4349-8e20-bc7e30975062)

![Screenshot from 2024-10-08 11-18-13](https://github.com/user-attachments/assets/ee0292fa-4a4d-4d91-b7e8-b95ca3a3117c)

![Screenshot from 2024-10-08 11-19-27](https://github.com/user-attachments/assets/13c11abc-e7cb-4d87-b96e-b28902199b5c)

![Screenshot from 2024-10-08 11-19-48](https://github.com/user-attachments/assets/acfea598-fc15-4d0a-a0c2-4d171afc020b)

![Screenshot from 2024-10-08 11-21-02](https://github.com/user-attachments/assets/4fa067da-45f0-4662-8aff-4bb498a1dafd)

![Screenshot from 2024-10-08 11-21-38](https://github.com/user-attachments/assets/b5e6986e-99d2-498c-95af-ec7f219e6e1a)


## 🗃️ Release notes

Dynamo is constantly evolving. Check out the changelog:

### Dynamo 1.0.0. 🚀

* Support for AI templates
* Fix issues and bugs

## Support

For any **business inquiries**, **technical support**, or to report issues, please contact [email protected].


**Love Dynamo? Give our repo a star :star: :arrow_up:.**

21 changes: 21 additions & 0 deletions authentication/keycloak-custom-theme/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Tharindu Premasiri

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit d25d50c

Please sign in to comment.