Skip to content

Mfaj-cod/Portfolio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

39 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– Agentic CMS Portfolio

A self-updating, production-grade AI-powered Portfolio & Content Management System built using LangChain, Google Gemini, and a fully automated CI/CD pipeline.

Python Flask LangChain Gemini Docker CI/CD Render


🌐 Live Demo

πŸš€ Production URL: https://agenticportfolio.onrender.com

Every push to main automatically builds a Docker image, pushes it to Docker Hub, and deploys to Render.


πŸ“– Overview

This is not a static portfolio. This is a Business-Ready Agentic Content Management System.

Instead of manually editing code, this platform uses a LangChain-powered AI Agent to:

  • ✍️ Write blogs
  • 🧱 Add or update projects
  • 🧠 Modify bio & services
  • πŸ“© Handle client messages
  • 🎀 Accept voice commands

All through natural language inside a secure Admin Dashboard.


✨ Key Features

πŸ€– AI & Automation

  • 🧠 Intelligent Orchestrator: Uses LangChain + Pydantic to analyze intent (Blog / Project / Bio / Services).
  • πŸ“„ Smart Parsing: Paste raw README text β†’ Agent converts it into structured Project Cards.
  • 🎀 Voice Command: Integrated Web Speech API allows hands-free content generation.
  • πŸͺ„ Agentic Routing: Automatically decides whether to:
    • Generate content
    • Update DB
    • Rewrite sections
    • Store history

πŸ’Ό Business Tools

  • πŸ“¬ Client Inbox: Public β€œContact Me” form sends messages directly to Admin Dashboard.
  • 🧾 Project Manager: AI adds, formats, and structures portfolio projects.
  • πŸ“° Blog Engine: AI writes structured blog posts with headings and sections.
  • 🧠 Services Section: Editable via AI prompts.

🎨 UI & UX

  • πŸ–€ Premium Dark Theme: Monochrome, grid-based cyber aesthetic.
  • 🧠 Brain Watermark Animation
  • πŸ“± Fully Responsive: Mobile, tablet, desktop optimized.
  • ⚑ Dynamic Content: Everything updates live from the database.

πŸ” Security & Data

  • πŸ”’ Session-Based Admin Auth
  • πŸ—οΈ Environment-Based Secrets
  • 🧾 History Logging: All AI output logged to history.txt
  • 🧱 Isolated Admin Routes

πŸ› οΈ Technology Stack

Backend

  • Flask (Python)
  • Gunicorn (Production Server)

AI Engine

  • LangChain
  • Google Gemini 2.5 Flash
  • Pydantic Structured Outputs

Frontend

  • HTML5, Jinja2
  • Bootstrap 5
  • Custom CSS
  • Web Speech API

Database

  • SQLite (Projects, Blogs, Messages, About, Services)

DevOps

  • Docker
  • GitHub Actions (CI/CD)
  • Docker Hub (Registry)
  • Render (Deployment)

βš™οΈ CI/CD Pipeline (Fully Automated)

On every push to main:

  1. βœ… GitHub Actions builds Docker image
  2. βœ… Pushes image to Docker Hub
  3. βœ… Triggers Render Deploy Hook
  4. βœ… Render pulls latest image
  5. βœ… Zero-touch production update πŸš€

πŸš€ Installation & Local Setup

1️⃣ Clone the Repository

git clone https://github.com/yourusername/agentic-portfolio.git
cd agentic-portfolio

2️⃣ Create Virtual Environment

python -m venv venv

# Windows
venv\Scripts\activate

# Mac/Linux
source venv/bin/activate

3️⃣ Install Dependencies

pip install -r requirements.txt

4️⃣ Configure Environment Variables

GEMINI_API_KEY=your_google_api_key_here
FLASK_SECRET_KEY=your_secret_key_here
ADMIN_PASSWORD=your_admin_password
COMPANY_EMAIL=your_email
EMAIL_PASSWORD=your_app_password

5️⃣ Run the App

python app.py

Visit:
πŸ‘‰ http://127.0.0.1:5000

πŸ•ΉοΈ How to Use the Agent

Go to -> /admin
Login using your admin password.

βž• Add a Project

Prompt: Copy and paste your projects Readme.md or describe it in your style.
Result:
AI creates a structured project card
Extracts tech stack
Formats description
Saves to DB (On click 'Publish')

✍️ Write a Blog

Prompt: Write a blog about Vector Databases in RAG systems.
Result:
AI generates a full article
With headings and structure

On click 'Publish':
Saves to blog section
Saves to 

🧠 Update Bio

Prompt: Update my about section. I am now focusing on Agentic Workflows and Generative AI.
Result:
AI rewrites About section
Updates skills and focus

πŸ“‚ Project Structure

Portfolio/
β”œβ”€β”€ data/               # SQLite DB + history logs
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ agent.py        # LangChain agent + routing logic
β”‚   β”œβ”€β”€ db.py           # Database operations
β”‚   β”œβ”€β”€ logg.py         # Logging & history writer
β”‚   β”œβ”€β”€ prompt.py       # System prompts
β”œβ”€β”€ static/
β”‚   └── style.css       # Custom UI theme
β”œβ”€β”€ templates/
β”‚   β”œβ”€β”€ base.html
β”‚   β”œβ”€β”€ index.html
β”‚   β”œβ”€β”€ admin.html
β”‚   └── login.html
β”œβ”€β”€ app.py              # Flask app entry
β”œβ”€β”€ Dockerfile
β”œβ”€β”€ requirements.txt
└── README.md

🧠 Architecture

User β†’ Admin Panel β†’ LangChain Router β†’ Gemini
                         ↓
                  Pydantic Validator
                         ↓
                   Database Writer
                         ↓
                  Live Website Update

🀝 Contributing

Fork this repo and customize: src/agent.py
You can:
Change the system personality
Change writing style
Add new agent tools
Add analytics
Add payment systems

This Project Demonstrates

This demonstrates:
βœ… Agentic AI systems
βœ… Real DevOps CI/CD
βœ… Production deployment
βœ… Dockerized backend
βœ… Secure secret management
βœ… AI orchestration
βœ… Business-grade architecture

Built with obsession and engineering discipline.

About

My personal portfolio website for my profile, projects and blogs.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors