+
+## โ๏ธ Table of Contents
+
+1. [โ ๏ธ Table of Contents](#-table-of-contents)
+2. [๐ Overview](#-overview)
+3. [๐ฅ Features](#-features)
+4. [๐
Project Structure](#-project-structure)
+ 4.1. [๐ Project Index](#-project-index)
+5. [๐ Getting Started](#-getting-started)
+ 5.1. [๐ Prerequisites](#-prerequisites)
+ 5.2. [โก Installation](#-installation)
+ 5.3. [๐ Usage](#-usage)
+ 5.4. [๐ Testing](#-testing)
+6. [๐ป Roadmap](#-roadmap)
+7. [๐ค Contributing](#-contributing)
+8. [๐ License](#-license)
+9. [โจ Acknowledgments](#-acknowledgments)
---
-## Table of Contents
+## ๐ Overview
+
-- [Table of Contents](#table-of-contents)
-- [Overview](#overview)
-- [Features](#features)
-- [Project Structure](#project-structure)
- - [Project Index](#project-index)
-- [Getting Started](#getting-started)
- - [Prerequisites](#prerequisites)
- - [Installation](#installation)
- - [Usage](#usage)
- - [Testing](#testing)
-- [Roadmap](#roadmap)
-- [Contributing](#contributing)
-- [License](#license)
-- [Acknowledgments](#acknowledgments)
---
-## Overview
+## ๐ฅ Features
-Pygentic-AI simplifies project setup and backend operations for developers.
-
-**Why Pygentic-AI?**
-
-This project automates Python environment setup and dependency management, ensuring a smooth development workflow. The custom logger enhances backend logging efficiency, while the RESTful API server streamlines backend operations.
-
-- **๐ Automated Python Setup:** Simplify environment configuration and dependency management.
-- **๐ก Custom Logger:** Efficient logging with customizable features for backend operations.
-- **๐ RESTful API Server:** Facilitate seamless backend operations with a robust API server.
+
---
-## Features
-
-| | Component | Details |
-| :--- | :-------------- | :----------------------------------- |
-| โ๏ธ | **Architecture** |
|
-
----
-
-## Project Structure
+## ๐
Project Structure
```sh
โโโ Pygentic-AI/
+ โโโ .github
+ โ โโโ workflows
โโโ bin
โ โโโ build.sh
โ โโโ linux_build.sh
@@ -90,18 +84,19 @@ This project automates Python environment setup and dependency management, ensur
โโโ dev_requirements.txt
โโโ docker
โ โโโ celery
- โ โโโ pygentic_ai_ms
+ โ โโโ pygentic_ai
โโโ Dockerfile
โโโ pyproject.toml
โโโ README.md
โโโ src
โ โโโ app.py
โ โโโ backend
- โ โโโ cworker.py
+ โ โโโ cworker.py
+ โ โโโ frontend
โโโ uv.lock
```
-### Project Index
+### ๐ Project Index
PYGENTIC-AI/
@@ -120,31 +115,31 @@ This project automates Python environment setup and dependency management, ensur
compose.yaml |
- - Define services and configurations for web and celery_service containers, including image, resources, ports, environment variables, volumes, labels, health checks, and network settings - Services are deployed with specific memory limits and exposed ports, with web service catering to production and celery_service to staging environments - Traefik is utilized for routing and SSL termination. |
+ Code>โฏ REPLACE-ME |
core_requirements.in |
- Define project dependencies and requirements using the core_requirements.in file to ensure seamless integration and functionality across the codebase architecture. |
+ Code>โฏ REPLACE-ME |
core_requirements.txt |
- Generates a compiled list of core requirements for the project, ensuring all necessary dependencies are included for seamless functionality across various modules and components. |
+ Code>โฏ REPLACE-ME |
dev_requirements.in |
- - Enhance development environment by managing dependencies efficiently with dev_requirements.in - This file specifies essential tools like Alembic, Black, and Pre-commit to streamline the development process - Optimize code formatting and debugging with JupyterLab extensions, ensuring a robust and efficient workflow. |
+ Code>โฏ REPLACE-ME |
dev_requirements.txt |
- - Generate a list of development requirements for the project, outlining dependencies and their versions - The file was auto-generated using uv to compile the dev_requirements.in file - It includes various packages required for development, such as alembic, fastapi, and jupyter-server - Each dependency is specified with its version number for accurate package management. |
+ Code>โฏ REPLACE-ME |
Dockerfile |
- - Create a Docker image for Pygentic-AI project, setting up necessary environment variables, cloning the project repository, and configuring the workspace - Install dependencies, create user celery, set up directories, and make scripts executable - Finally, build and start the Python application within the designated workspace. |
+ Code>โฏ REPLACE-ME |
pyproject.toml |
- - Define linting rules and file exclusions for the project structure in the pyproject.toml file - Ensure code quality by enforcing specific linting standards, excluding unnecessary directories, and setting line length limits - This configuration enhances code readability and maintainability across the codebase. |
+ Code>โฏ REPLACE-ME |
@@ -164,19 +159,19 @@ This project automates Python environment setup and dependency management, ensur
build.sh |
- Update and install project dependencies using the provided build script. |
+ Code>โฏ REPLACE-ME |
linux_build.sh |
- - Set up a Linux environment for the project by installing essential dependencies and tools - Ensure a smooth development experience by preparing the system with required packages like build tools, Python 3.13, PostgreSQL, and more - This script streamlines the initial setup process, enabling developers to focus on building the project without worrying about environment configuration. |
+ Code>โฏ REPLACE-ME |
python_build.sh |
- - Automates Python environment setup and dependency management for the project - Creates a virtual environment, installs necessary packages, and syncs core and development requirements using pip-tools - Facilitates streamlined development workflow by ensuring consistent package versions across environments. |
+ Code>โฏ REPLACE-ME |
start.sh |
- - Launches the application using Gunicorn with specified configurations, such as the number of workers, timeout, and port - The script activates the virtual environment and starts the server to handle incoming requests. |
+ Code>โฏ REPLACE-ME |
@@ -196,11 +191,11 @@ This project automates Python environment setup and dependency management, ensur
app.py |
- - Define exception handlers and mount static files for the FastAPI app using the provided code - Handle validation errors and custom exceptions, logging details and returning appropriate responses - Serve static files from the specified directory for the frontend. |
+ Code>โฏ REPLACE-ME |
cworker.py |
- - Improve concurrency by managing worker threads efficiently - This code file in src\cworker.py orchestrates thread creation and execution within the projects architecture. |
+ Code>โฏ REPLACE-ME |
@@ -218,11 +213,11 @@ This project automates Python environment setup and dependency management, ensur
logger.py |
- - Implement a custom logger using Loguru for efficient logging in the backend - The logger supports various log levels and customization options, enhancing the logging experience - It includes features like log rotation, retention, and different log formats - The code ensures robust logging functionality for the project. |
+ Code>โฏ REPLACE-ME |
utils.py |
- - Define utility functions to retrieve database URLs based on environment and fetch values from environment variables or configuration files - The get_db_url function constructs a database URL for different environments, while get_val retrieves values with fallback options - These functions enhance flexibility and maintainability in managing configurations and environment variables. |
+ Code>โฏ REPLACE-ME |
@@ -240,23 +235,23 @@ This project automates Python environment setup and dependency management, ensur
consts.py |
- - Define the AI_MODEL and default_system_prompt for the GPT-4o AI assistant in the consts.py file - The AI_MODEL specifies the model used, while the default_system_prompt outlines the AIs function of generating SWOT analyses. |
+ Code>โฏ REPLACE-ME |
core.py |
- - Define a SQLModel and Agent Dependencies for SWOT Analysis, creating a SwotAgent with specified parameters for AI model, system prompt, and retries - This code file in the core module plays a crucial role in structuring and managing SWOT analysis responses within the projects architecture. |
+ Code>โฏ REPLACE-ME |
main.py |
- Implement core functionality for backend services in the main.py file. |
+ Code>โฏ REPLACE-ME |
tools.py |
- - Describe how the tools.py file in src\backend\core facilitates fetching website content, analyzing competition using the Gemini model, and obtaining insights from Reddit - The functions within this file leverage various libraries and APIs to perform these tasks efficiently. |
+ Code>โฏ REPLACE-ME |
utils.py |
- - Define a function to report tool usage and results within the projects core architecture - The function checks and updates tool usage history, notifying an update function if available - This contributes to tracking tool usage and ensuring status updates are communicated effectively. |
+ Code>โฏ REPLACE-ME |
@@ -276,27 +271,27 @@ This project automates Python environment setup and dependency management, ensur
base.py |
- - Generate base SQLModel class for project, addressing Pydantic V2.5 issue with __pydantic_extra__ attribute - Inherits from SQLModel and sets necessary attributes - Integrated with project metadata and configured for eager defaults. |
+ Code>โฏ REPLACE-ME |
consts.py |
- Define database constants for backend operations in the project structure. |
+ Code>โฏ REPLACE-ME |
core.py |
- Manage core database operations for the backend system, ensuring efficient data handling and storage. |
+ Code>โฏ REPLACE-ME |
db.py |
- - Create and manage async SQLA sessions, handle database operations, and ensure database schema creation - Includes functions for checking database existence, creating databases, and setting the current schema - Provides utilities for creating database engines and managing database connections - Mainly focuses on database setup and interaction for the project. |
+ Code>โฏ REPLACE-ME |
main.py |
- Implement database connection and query functions to manage data persistence for the backend services. |
+ Code>โฏ REPLACE-ME |
utils.py |
- - Enhances database operations by providing utility functions - Facilitates seamless interaction with the database layer. |
+ Code>โฏ REPLACE-ME |
@@ -316,23 +311,23 @@ This project automates Python environment setup and dependency management, ensur
consts.py |
- Define and store constant values used throughout the backend server architecture. |
+ Code>โฏ REPLACE-ME |
core.py |
- Implement core server functionality to handle incoming requests and manage data operations within the backend architecture. |
+ Code>โฏ REPLACE-ME |
main.py |
- - Implement a RESTful API server in Python to handle backend operations for the project - The main.py file serves as the entry point for the server, orchestrating requests and responses - It plays a crucial role in managing the communication between the frontend and backend components of the application. |
+ Code>โฏ REPLACE-ME |
router.py |
- Define API routes and request handling logic for the backend server. |
+ Code>โฏ REPLACE-ME |
utils.py |
- - Enhances server functionality by providing utility functions - Improves codebase architecture by centralizing common operations - Facilitates streamlined development and maintenance processes - Promotes code reusability and efficiency within the backend server module. |
+ Code>โฏ REPLACE-ME |
@@ -352,35 +347,35 @@ This project automates Python environment setup and dependency management, ensur
backend_options.py |
- - Generate SQL database connection URLs based on provided configurations for different environments using accepted dialects, including PostgreSQL and SQLite - Import these configurations into the appropriate settings file to integrate with the Django Database settings. |
+ Code>โฏ REPLACE-ME |
base.py |
- Define project settings including backend and frontend directories, database URL, and debug mode in the base settings file. |
+ Code>โฏ REPLACE-ME |
consts.py |
- Define database dialects and set secret key for project configuration. |
+ Code>โฏ REPLACE-ME |
core.py |
- - Enhances core settings functionality by providing centralized configuration management - Facilitates seamless access and modification of key system parameters - Improves maintainability and scalability of the project by consolidating settings logic. |
+ Code>โฏ REPLACE-ME |
dev.py |
- Define development settings for backend with local database configuration and debugging enabled. |
+ Code>โฏ REPLACE-ME |
main.py |
- - Enhances backend settings functionality by managing configurations efficiently - Facilitates seamless customization and optimization of settings across the codebase architecture. |
+ Code>โฏ REPLACE-ME |
prod.py |
- - Define production settings for the backend, including database configuration and debugging options - Extends base settings to inherit common configurations - Centralizes cloud database settings for easy management and maintenance. |
+ Code>โฏ REPLACE-ME |
utils.py |
- - Enhance backend settings functionality by providing utility functions for the codebase architecture - The utils.py file in the src\backend\settings directory plays a crucial role in enabling streamlined operations and improved performance within the project structure. |
+ Code>โฏ REPLACE-ME |
@@ -400,29 +395,241 @@ This project automates Python environment setup and dependency management, ensur
consts.py |
- - Define constants and data structures for tracking analysis progress and results in the backend of the site architecture - Includes messages for analysis status, sets for running tasks, and dictionaries for storing status and results. |
+ Code>โฏ REPLACE-ME |
core.py |
- Implement core functionality for the site backend, facilitating key operations within the project architecture. |
+ Code>โฏ REPLACE-ME |
main.py |
- Improve site performance by caching API responses in the main.py file. |
+ Code>โฏ REPLACE-ME |
router.py |
- - Implement a backend API router for a SWOT analysis tool - The router handles URL analysis requests, updates status messages, and provides analysis results - It manages session IDs, progress tracking, and result storage - The code integrates with FastAPI, Starlette, and Jinja2 for web functionality. |
+ Code>โฏ REPLACE-ME |
utils.py |
- - Enhances backend functionality by providing utility functions for the site - This code file in the backend architecture aids in streamlining operations and improving overall performance. |
+ Code>โฏ REPLACE-ME |