A production-minded backend for managing, rendering, validating, and executing reusable AI prompts.
๐ง Prompt Management โข ๐ก๏ธ Guardrails โข ๐ค AI Execution โข ๐ Evaluation โข ๐ฆ Docker โข ๐ CI
Smart Prompt Studio is a FastAPI-based backend built around one simple idea:
Treat prompts like backend-managed application assets, not random strings buried inside code.
Instead of scattering prompts throughout an application, this service provides a central layer for:
- ๐ Creating prompts
- ๐ข Managing prompt versions
- ๐งฉ Rendering variables
- ๐ก๏ธ Validating prompts before execution
- ๐ค Sending prompts to an AI provider
- ๐ Tracking execution behavior
- ๐งช Testing failure paths
- ๐ Evaluating prompt behavior
- ๐ชต Logging requests and services
- ๐ณ Running inside Docker
- ๐ Validating changes through GitHub Actions
The project is intentionally small.
The engineering lessons are not.
๐ Prompt Management
Create reusable prompts through the API.
POST /prompts
Prompts contain structured messages instead of one giant string.
This keeps prompt construction explicit and maintainable.
The goal is to build a clean foundation for AI-powered backend systems.
Smart Prompt Studio focuses on the engineering layer surrounding an LLM:
Client
โ
โผ
FastAPI API
โ
โผ
Prompt Service
โ
โโโ Versioning
โโโ Variable Rendering
โโโ Validation
โ
โผ
Guardrail Service
โ
โผ
AI Service
โ
โผ
AI Provider
โ
โผ
Response
The project follows a service-oriented FastAPI structure.
Smart-Prompt-Studio/
โ
โโโ app/
โ โโโ config.py
โ โโโ logging_config.py
โ โโโ main.py
โ โโโ schemas.py
โ โ
โ โโโ exceptions/
โ โ โโโ custom_exceptions.py
โ โ โโโ handlers.py
โ โ
โ โโโ middleware/
โ โ โโโ __init__.py
โ โ โโโ request_logging.py
โ โ
โ โโโ services/
โ โโโ ai_service.py
โ โโโ guardrail_service.py
โ โโโ prompt_service.py
โ
โโโ tests/
โ โโโ test_ai_service_errors.py
โ โโโ test_ai_service_logging.py
โ โโโ test_prompt_evalutation.py
โ
โโโ .github/
โ โโโ workflows/
โ โโโ ci.yml
โ
โโโ .dockerignore
โโโ .env.example
โโโ .gitignore
โโโ Dockerfile
โโโ requirements.txt
Technology Purpose
-๐ Python Application language
-โก FastAPI API framework
-๐ฆ Pydantic Data validation
-๐ค OpenAI-compatible SDK AI communication
-๐งช Pytest Automated testing
-๐ณ Docker Containerization
-๐ GitHub Actions CI
-๐ชต Python Logging Observability
-๐ฟ Git Version control
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Smart Prompt Studio โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Prompt Management โ
โ
โ Versioning โ
โ
โ Variable Rendering โ
โ
โ Guardrails โ
โ
โ AI Integration โ
โ
โ Error Handling โ
โ
โ Logging โ
โ
โ Automated Tests โ
โ
โ Docker โ
โ
โ GitHub Actions CI โ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Local test suite:
10 passed
CI:
โ
Passed
Docker:
โ
Verified
Smart Prompt Studio is a compact AI backend focused on one principle:
Build the engineering around the model, not just the model call.
It combines:
โก FastAPI
๐ง Prompt Management
๐ก๏ธ Guardrails
๐ค AI Execution
๐ชต Logging
๐งช Testing
๐ณ Docker
๐ CI
๐ฟ Git
Small enough to understand.
Structured enough to extend.
Practical enough to build upon.
Made as part of a hands-on journey toward production-grade AI Backend Engineering.
Code โ Test โ Containerize โ Automate โ Ship
Smart Prompt Studio
The prompt is only the beginning.