Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
849454f
Merge pull request #3 from nerve-sparks/feature/new-cms
Dev7-web Apr 29, 2026
3d776b3
Merge pull request #4 from nerve-sparks/feature/new-cms
dev11-web May 11, 2026
450f136
fix: add .venv to .gitignore and ensure proper newline at end of file
Dev010-web Jun 2, 2026
4e49176
fix: add .venv to .gitignore and ensure proper newline at end of file
Dev010-web Jun 2, 2026
4bc1f18
Merge branch 'feat/langfuse' of https://github.com/nerve-sparks/CMSBl…
Dev010-web Jun 2, 2026
ebfc566
feat: Add Langfuse observability support with session management
Dev010-web Jun 2, 2026
e48b520
feat: Update Langfuse integration with trace identity management and …
Dev010-web Jun 2, 2026
dbe8755
feat: add Google Gemini and OpenAI service providers with structured …
Dev010-web Jun 2, 2026
eba7801
feat: implement Langfuse session grouping middleware and automated ba…
Dev010-web Jun 3, 2026
c8c1410
feat: add deployment workflow for staging environment
dev11-web Jun 5, 2026
f442c2e
feat: add gunicorn to requirements for improved deployment
dev11-web Jun 5, 2026
4806280
fix: update branch name from 'test' to 'stage' in deployment workflow
dev11-web Jun 5, 2026
c15206d
Merge branch 'stage' into feat/langfuse
dev11-web Jun 8, 2026
da7c99c
Merge pull request #11 from nerve-sparks/feat/langfuse
dev11-web Jun 8, 2026
5a58736
edited mount path in main.py
dev11-web Jun 8, 2026
9fd079a
fix: adjust middleware placement for LangfuseSession to ensure Contex…
nervesparksdev08 Jun 8, 2026
dec85a0
fix: enhance trace context handling by pinning observations to the sa…
nervesparksdev08 Jun 8, 2026
6f6b8fb
fix: improve trace context handling for Langfuse by ensuring proper n…
nervesparksdev08 Jun 9, 2026
fa609eb
feat: implement Redis support for session management and add Redis UR…
nervesparksdev08 Jun 9, 2026
6604b78
feat: add endpoint to retrieve public blog details with API key valid…
Jun 15, 2026
39c8710
feat: implement model selection for AI services and update OpenAI ima…
Jun 25, 2026
3e1a110
feat: change API mount point from /cms-backend to root for proper mid…
Jun 25, 2026
e26dc52
feat: integrate Supadata API for YouTube transcript extraction and up…
Jun 25, 2026
81810b7
feat: change API mount point to root for proper middleware propagation
Jun 25, 2026
7cb668b
feat: increase YouTube transcript length limit to 100,000 characters
Jun 25, 2026
371b7f1
feat: add reference service for fetching and processing content from …
Jun 25, 2026
c149401
feat: change API mount point to root for proper middleware propagation
Jun 25, 2026
f1602ab
feat: implement category management with CRUD operations and integrat…
Jun 26, 2026
7d0c35f
feat: implement LiteLLM proxy support for text and image generation, …
dev11-web Jul 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Deploy CMS Blog Maker to Staging

on:
push:
branches:
- stage
paths:
- backend/**
- .github/**
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: SSH and deploy
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.STAGING_VM_HOST }}
username: ${{ secrets.STAGING_VM_USERNAME }}
key: ${{ secrets.STAGING_VM_SSH_KEY }}
port: ${{ secrets.STAGING_VM_PORT || 22 }}
timeout: 600s
command_timeout: 5m
script: |
set -e

APP_DIR="/root/all-agents/CMSBlogMaker-Updated"
BACKEND_DIR="$APP_DIR/backend"
BRANCH="stage"

echo "=== 1. Updating code ==="
cd "$APP_DIR"
if [ ! -d ".git" ]; then
echo "ERROR: $APP_DIR is not a git repo. Clone it first."
exit 1
fi
git fetch origin "$BRANCH"
git checkout -f "$BRANCH"
git reset --hard "origin/$BRANCH"
git clean -fd --exclude=".env" --exclude="*.env"
echo "Deployed commit: $(git rev-parse --short HEAD)"

echo "=== 2. Updating backend (conda env cms-backend) ==="
cd "$BACKEND_DIR"
if [ -f "$HOME/miniconda3/envs/cms-backend/bin/pip" ]; then
$HOME/miniconda3/envs/cms-backend/bin/pip install -r requirements.txt --quiet
else
$HOME/anaconda3/envs/cms-backend/bin/pip install -r requirements.txt --quiet
fi

echo "=== 3. Restarting service ==="
sudo systemctl restart cms-backend.service

echo "=== Done ==="
sudo systemctl status cms-backend.service --no-pager
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.agents/
skills-lock.json
3 changes: 2 additions & 1 deletion backend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ venv/
__pycache__/
uploads/
*/__pycache__
*.json
*.json
.venv
29 changes: 22 additions & 7 deletions backend/app/models/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ class BlogMeta(BaseModel):
focus_or_niche: str = ""
targeted_keyword: str = ""
targeted_audience: str = ""
reference_links: str = ""
youtube_url: str = ""
reference_links: str = ""

youtube_url: str = ""

selected_idea: str = ""
title: str = ""
Expand All @@ -91,6 +91,7 @@ class BlogMeta(BaseModel):

image_prompt: str = ""
cover_image_url: str = ""
category_name: str = ""


class AdminReview(BaseModel):
Expand Down Expand Up @@ -152,6 +153,8 @@ class TopicIdeasIn(BaseModel):
tone: str
creativity: str
count: int = Field(default=AI_OPTIONS_COUNT, ge=1, le=AI_OPTIONS_MAX)
session_id: Optional[str] = None # shared across full blog workflow for grouping in Langfuse
model: Optional[str] = None # LLM model override (e.g. "gpt-4o", "gemini-2.5-flash")


class TitlesIn(BaseModel):
Expand All @@ -163,10 +166,12 @@ class TitlesIn(BaseModel):
targeted_audience: str = ""
reference_links: str = ""
selected_idea: str
session_id: Optional[str] = None
model: Optional[str] = None


class ImagePromptsIn(BaseModel):

tone: str
creativity: str
focus_or_niche: str
Expand All @@ -175,6 +180,8 @@ class ImagePromptsIn(BaseModel):
reference_links: str = ""
selected_idea: str
title: str
session_id: Optional[str] = None
model: Optional[str] = None


class IntrosIn(BaseModel):
Expand All @@ -187,6 +194,8 @@ class IntrosIn(BaseModel):
reference_links: str = ""
selected_idea: str
title: str
session_id: Optional[str] = None
model: Optional[str] = None


class OutlinesIn(BaseModel):
Expand All @@ -200,6 +209,8 @@ class OutlinesIn(BaseModel):
selected_idea: str
title: str
intro_md: str
session_id: Optional[str] = None
model: Optional[str] = None


class ImageGenerateIn(BaseModel):
Expand All @@ -217,6 +228,8 @@ class ImageGenerateIn(BaseModel):
primary_color: str = "#4443E4"
source: Literal["blog", "nano"] = "nano"
save_to_gallery: bool = True
session_id: Optional[str] = None
image_model: Literal["gemini", "openai"] = "gemini" # which image provider to use


class ImageSaveIn(BaseModel):
Expand All @@ -241,9 +254,9 @@ class GenerateBlogIn(BaseModel):
targeted_keyword: str = ""
targeted_audience: str = ""
reference_links: str = ""
youtube_url: str = ""
youtube_transcript: str = ""

youtube_url: str = ""
youtube_transcript: str = ""

selected_idea: str
title: str
Expand All @@ -252,6 +265,8 @@ class GenerateBlogIn(BaseModel):

cover_image_url: str = ""
primary_color: str = "#4443E4"
session_id: Optional[str] = None
model: Optional[str] = None # LLM model override


class OptionsOut(BaseModel):
Expand Down
Loading