Skip to content

A modern, responsive personal portfolio website to showcase my skills in full stack development, backend engineering (Django/Python), and UI/UX design. The entire site is fully customizable through an admin panel, including dynamic content updates and theme switching.

Notifications You must be signed in to change notification settings

saranrajsnkr/DevfolioX

Repository files navigation

DevfolioX - Complete Project Analysis & Manual

Overview

DevfolioX is a sophisticated personal portfolio web application built with Django framework. It serves as a comprehensive platform for developers, freelancers, and professionals to showcase their work, skills, and experiences in an interactive, customizable format. The application features modern design patterns, cloud integration, AI-powered responses, and extensive customization capabilities.

Technology Stack & Dependencies

Backend Framework

  • Django 5.1.7: Primary web framework
  • Python 3.11: Programming language
  • Gunicorn 21.2.0: WSGI HTTP server with gevent worker class
  • psycopg2-binary: PostgreSQL database adapter

Frontend Technologies

  • HTML5/CSS3: Markup and styling
  • JavaScript (jQuery): Client-side interactivity
  • Bootstrap & Tailwind CSS: UI frameworks
  • Font Awesome & Devicon: Icon libraries
  • AdminLTE: Admin interface styling

Cloud Services & Storage

  • Cloudinary: Media file storage and management
  • PostgreSQL: Production database
  • SQLite: Development database
  • WhiteNoise: Static file serving

AI & External Integrations

  • Google Generative AI: AI-powered contact responses
  • GitHub API: Repository integration
  • ZeroBounce API: Email validation
  • Django Social Auth: OAuth integration

Development & Deployment

  • Docker: Containerization platform
  • Render.com: Deployment platform
  • Django Admin (Jazzmin): Enhanced admin interface

Architecture

Monolithic Architecture Pattern

graph TB
    A[Client Browser] --> B[Gunicorn WSGI Server]
    B --> C[Django Application]
    C --> D[URL Router]
    D --> E[View Layer]
    E --> F[Model Layer]
    F --> G[PostgreSQL Database]
    E --> H[Template Engine]
    H --> I[Static Files]
    J[Cloudinary CDN] --> H
    K[External APIs] --> E
    
    subgraph "Django Apps"
        L[Branding]
        M[Contact]
        N[Projects]
        O[Skills]
        P[Education]
        Q[Work Experience]
        R[Services]
        S[GitHub Integration]
        T[Analytics Tracking]
    end
Loading

Component Architecture

The application follows Django's modular app structure with the following core components:

Core Django Apps

  1. branding: Personal branding and theme customization
  2. contact: Contact information and messaging system
  3. projects: Project showcase and management
  4. skills: Technical and soft skills representation
  5. education: Educational background
  6. work_experience: Professional experience
  7. services: Service offerings
  8. github: GitHub repository integration
  9. tracking: Analytics and visitor tracking

Data Flow Architecture

sequenceDiagram
    participant U as User
    participant V as Views
    participant M as Models
    participant DB as Database
    participant C as Cloudinary
    participant AI as Google AI
    
    U->>V: HTTP Request
    V->>M: Query Data
    M->>DB: Database Query
    DB-->>M: Return Data
    M-->>V: Model Objects
    V->>C: Request Media Files
    C-->>V: Media URLs
    V->>AI: Generate AI Response
    AI-->>V: AI Content
    V-->>U: Rendered Template
Loading

Data Models & ORM Mapping

Personal Branding Model

class PersonalBranding(models.Model):
    # Basic Information
    name = models.CharField(max_length=100)
    tagline = models.CharField(max_length=150)
    about = models.TextField()
    bio = models.TextField()
    
    # Media Assets
    profile_picture = models.ImageField(storage=MediaCloudinaryStorage())
    Dark_mode_profile_picture = models.ImageField(storage=MediaCloudinaryStorage())
    resume = models.FileField(storage=RawMediaCloudinaryStorage())
    
    # Color Scheme (Light/Dark Mode)
    Primary_color = ColorField()
    text_color = ColorField()
    button_color = ColorField()
    hover_color = ColorField()
    
    # SEO & Meta
    og_image = models.ImageField()
    site_title = models.CharField(max_length=100)
    site_description = models.TextField()

Skills Architecture

classDiagram
    class ProgrammingLanguage {
        +name: CharField
        +custom_entry: CharField
        +custom_icon: CharField
        +level: IntegerField(35-100)
        +icon: property
    }
    
    class Framework {
        +select_framework: CharField
        +custom_entry: CharField
        +custom_icon: CharField
        +level: IntegerField(35-100)
        +icon: property
    }
    
    class Tools {
        +select_tools: CharField
        +custom_entry: CharField
        +custom_icon: CharField
        +level: IntegerField(35-100)
        +icon: property
    }
    
    class Database {
        +select_database: CharField
        +custom_entry: CharField
        +custom_icon: CharField
        +level: IntegerField(35-100)
        +icon: property
    }
    
    class SoftSkills {
        +select_soft_skills: CharField
        +custom_entry: CharField
        +custom_icon: CharField
        +level: IntegerField(35-100)
        +icon: property
    }
Loading

Project Management System

class Project(models.Model):
    # Project Information
    name = models.CharField(max_length=100)
    one_line_about_the_project = models.CharField(max_length=200)
    brief_about_the_project = models.TextField(max_length=1000)
    
    # Technology Stack
    technologies_used_1 = models.CharField(max_length=200)
    level_in_1 = models.IntegerField(validators=[MinValueValidator(35), MaxValueValidator(100)])
    technologies_used_2 = models.CharField(max_length=200)
    level_in_2 = models.IntegerField(validators=[MinValueValidator(35), MaxValueValidator(100)])
    technologies_used_3 = models.CharField(max_length=200)
    level_in_3 = models.IntegerField(validators=[MinValueValidator(35), MaxValueValidator(100)])
    
    # Media Gallery
    Card_image = models.ImageField(storage=MediaCloudinaryStorage())
    Project_image_1 = models.ImageField(storage=MediaCloudinaryStorage())
    Project_image_2 = models.ImageField(storage=MediaCloudinaryStorage())
    Project_image_3 = models.ImageField(storage=MediaCloudinaryStorage())
    Project_image_4 = models.ImageField(storage=MediaCloudinaryStorage())
    Project_image_5 = models.ImageField(storage=MediaCloudinaryStorage())
    
    # External Links
    live_demo_url = models.URLField()
    github_repo_url = models.URLField()
    
    # Project Details
    challenges_faced_with_the_project = models.TextField(max_length=1000)

Contact & Messaging System

erDiagram
    ContactInfo {
        string email
        string phone_number
        text ai_details
        url facebook
        boolean facebook_active
        url instagram
        boolean instagram_active
        url twitter
        boolean twitter_active
        url linkedin
        boolean linkedin_active
        url github
        boolean github_active
    }
    
    Client_Message {
        string name
        string email
        text message
        text Ai_Response
        text Reply
        datetime Recived_at
    }
    
    ProjectMessage {
        foreignkey project
        string name
        string email
        text message
        text Ai_response
        text Reply
        datetime Recived_at
    }
    
    ContactInfo ||--o{ Client_Message : receives
    Project ||--o{ ProjectMessage : has
Loading

API Endpoints Reference

Frontend Routes

Endpoint View Function Template Description
/ index index.html Homepage with all sections
/about/ about about.html About section
/contact/ contact contact.html Contact page
/projects/ projects projects.html Projects showcase
/projects/<int:pk>/ project_detail project_detail.html Individual project details
/services/ services services.html Services offered
/education/ education education.html Educational background
/work_experience/ work_experience work_experience.html Professional experience
/apps/skills/ Skills views Skills templates Skills management
/apps/github/ github_repos_page github_repos.html GitHub integration

Admin Interface Routes

Endpoint Description
/admin/ Django admin interface
/device-charts/ Analytics dashboard
/health/ Health check endpoint

Contact Form Processing

# Contact form submission flow
def contact_page(request):
    if request.method == 'POST':
        form = ContactForm(request.POST)
        if form.is_valid():
            # Save message to database
            contact = form.save()
            
            # Generate AI response using Google Generative AI
            ai_response = generate_ai_response(contact.message)
            contact.Ai_Response = ai_response
            contact.save()
            
            # Send email notification
            send_email_notification(contact)
            
            return redirect('contact_success')
    else:
        form = ContactForm()
    
    return render(request, 'contact.html', {'form': form})

Business Logic Layer

Branding & Theme System

The application features a comprehensive theming system that allows users to:

Color Management

  • Light/Dark Mode Support: Dual color schemes with automatic switching
  • Custom Color Palettes: 16 customizable color variables
  • Automatic Color Generation: AI-powered color extraction from profile pictures
  • CSS Variable System: Dynamic CSS custom properties injection

Media Processing

def remove_background_high_quality(self):
    """Remove background from profile picture using rembg"""
    img = Image.open(self.profile_picture)
    img = img.convert("RGBA")
    
    # Remove background using rembg
    no_bg_img = remove(img)
    
    # Resize to maintain quality
    no_bg_img = no_bg_img.resize(img.size, Image.LANCZOS)
    
    # Save the processed image
    buffer = BytesIO()
    no_bg_img.save(buffer, format="PNG", quality=100)
    self.profile_picture.save(self.profile_picture.name, ContentFile(buffer.getvalue()))

Skills Management System

The skills system provides:

Categorized Skill Types

  1. Programming Languages: 60+ predefined options with custom entry support
  2. Frameworks: 50+ popular frameworks with version tracking
  3. Tools: Development tools, CI/CD, monitoring solutions
  4. Databases: SQL, NoSQL, and specialized database systems
  5. Soft Skills: Professional and interpersonal abilities

Icon Mapping System

@property
def icon(self):
    mapping = {
        'Python': 'fab fa-python',
        'JavaScript': 'fab fa-js',
        'React': 'devicon-react-original',
        'Django': 'devicon-django-plain',
        # ... extensive icon mapping
    }
    return mapping.get(self.name, 'fas fa-code')

AI Integration Layer

flowchart TD
    A[User Message] --> B[Form Validation]
    B --> C[Save to Database]
    C --> D[Extract Contact Info]
    D --> E[Generate AI Prompt]
    E --> F[Google Generative AI API]
    F --> G[Process AI Response]
    G --> H[Save AI Response]
    H --> I[Send Email Notification]
    I --> J[Display Success Message]
    
    K[Multiple API Keys] --> F
    L[Rate Limiting] --> F
    M[Error Handling] --> F
Loading

GitHub Integration

def fetch_github_repos(username):
    """Fetch user repositories from GitHub API"""
    url = f"https://api.github.com/users/{username}/repos"
    
    try:
        response = requests.get(url)
        if response.status_code == 200:
            repos = response.json()
            return sorted(repos, key=lambda x: x['updated_at'], reverse=True)
    except requests.RequestException:
        return []
    
    return []

Middleware & Interceptors

Security Middleware Stack

MIDDLEWARE = [
    'django.middleware.security.SecurityMiddleware',
    'whitenoise.middleware.WhiteNoiseMiddleware',  # Static file serving
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
]

Analytics Tracking Middleware

The tracking system captures:

  • Device Information: Browser, OS, screen resolution
  • Geographic Data: IP-based location tracking
  • User Behavior: Page views, session duration
  • Performance Metrics: Load times, bounce rates

Error Handling

# Custom error handlers
handler404 = custom_404_view
handler500 = custom_500_view
handler403 = custom_403_view
handler400 = custom_400_view

Configuration & Environment Setup

Environment Variables

# Database Configuration
USE_POSTGRES=True
DATABASE_URL=postgresql://user:password@host:port/database

# Django Settings
SECRET_KEY=your-secret-key
DEBUG=False
ALLOWED_HOSTS=yourdomain.com,www.yourdomain.com

# Cloud Storage
CLOUDINARY_CLOUD_NAME=your-cloud-name
CLOUDINARY_API_KEY=your-api-key
CLOUDINARY_API_SECRET=your-api-secret

# Email Configuration
EMAIL_HOST_USER=your-email@gmail.com
EMAIL_HOST_PASSWORD=your-app-password

# AI Services
GEMINI_API_KEYS=key1,key2,key3
ZEROBOUNCE_API_KEYS=key1,key2

# Superuser Creation
DJANGO_SUPERUSER_USERNAME=admin
DJANGO_SUPERUSER_PASSWORD=secure-password

Docker Configuration

FROM python:3.11-slim

ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1

WORKDIR /code

COPY requirements.txt /code/
RUN pip install --upgrade pip && pip install -r requirements.txt

COPY . /code/

RUN python manage.py collectstatic --noinput

CMD sh -c "python manage.py migrate && \
           python manage.py createsuperuser --noinput || true && \
           python -c 'import os; import django; django.setup(); from django.contrib.auth import get_user_model; User = get_user_model(); user = User.objects.get(username=os.environ[\"DJANGO_SUPERUSER_USERNAME\"]); user.set_password(os.environ[\"DJANGO_SUPERUSER_PASSWORD\"]); user.save()' && \
           gunicorn portfolio.wsgi:application --bind 0.0.0.0:$PORT --worker-class gthread --workers 2 --threads 4 --timeout 60"

Installation & Setup Guide

Prerequisites

  • Python 3.11+
  • pip package manager
  • Docker (optional)
  • PostgreSQL (for production)
  • Cloudinary account
  • Google AI API key

Local Development Setup

1. Clone Repository

git clone https://github.com/Saran24875/SARAN-PORTFOLIO
cd SARAN-PORTFOLIO

2. Virtual Environment Setup

python -m venv portfolio_env
source portfolio_env/bin/activate  # On Windows: portfolio_env\Scripts\activate

3. Install Dependencies

pip install -r requirements.txt

4. Environment Configuration

Create .env file in the project root:

# Copy environment variables from the configuration section above
cp .env.example .env
# Edit .env with your specific values

5. Database Migration

python manage.py migrate

6. Create Superuser

python manage.py createsuperuser

7. Collect Static Files

python manage.py collectstatic

8. Run Development Server

python manage.py runserver

Production Deployment

Docker Deployment

# Build Docker image
docker build -t saran-portfolio .

# Run with environment file
docker run --env-file .env -p 8000:8000 saran-portfolio

Docker Compose Deployment

# Configure environment in docker-compose.yml
docker-compose up --build

Render.com Deployment

  1. Fork the repository
  2. Connect to Render.com
  3. Configure environment variables
  4. Deploy using render.yaml configuration

Usage Manual

Admin Interface Access

  1. Navigate to /admin/
  2. Login with superuser credentials
  3. Access all management panels

Content Management Workflow

1. Personal Branding Setup

flowchart TD
    A[Access Admin Panel] --> B[Navigate to Branding]
    B --> C[Add Personal Information]
    C --> D[Upload Profile Pictures]
    D --> E[Configure Color Scheme]
    E --> F[Set SEO Meta Tags]
    F --> G[Upload Resume & Assets]
    G --> H[Save Configuration]
Loading

2. Skills Management

  • Navigate to Skills section in admin
  • Add Programming Languages with proficiency levels (35-100)
  • Configure Frameworks used in projects
  • List development Tools and their expertise
  • Add Database experience
  • Include Soft Skills for professional profile

3. Project Portfolio Setup

  • Add project details and descriptions
  • Upload project images (Card image + 5 gallery images)
  • Configure technology stack with proficiency levels
  • Add live demo and GitHub repository URLs
  • Document challenges and achievements

4. Contact Configuration

  • Set up contact information and social media links
  • Configure AI assistant behavior and responses
  • Enable/disable social media platform visibility
  • Customize contact form appearance

Frontend User Experience

Navigation Structure

  • Homepage: Single-page application with all sections
  • About: Personal story and background
  • Skills: Interactive skill charts and progress bars
  • Projects: Portfolio showcase with filtering
  • Services: Professional offerings
  • Education: Academic background
  • Experience: Work history and achievements
  • Contact: Multiple contact methods and form

Responsive Design Features

  • Mobile-first responsive layout
  • Touch-friendly navigation
  • Optimized images for different screen sizes
  • Progressive loading for better performance

AI-Powered Features

Automated Responses

The system generates intelligent responses to contact inquiries using Google's Generative AI:

  1. Contact Form SubmissionAI AnalysisContextual ResponseEmail Notification
  2. Project InquiriesProject-Specific ResponseTechnical DiscussionFollow-up Actions

Email Management

  • Automatic email notifications for new messages
  • AI-generated preliminary responses
  • Manual reply system with email delivery
  • Contact validation using ZeroBounce API

Analytics & Tracking

Visitor Analytics

  • Real-time visitor tracking
  • Device and browser analytics
  • Geographic visitor distribution
  • Page view statistics
  • User engagement metrics

Admin Dashboard

pie title Visitor Analytics Dashboard
    "Desktop Users" : 60
    "Mobile Users" : 30
    "Tablet Users" : 10
Loading

Access analytics at /device-charts/ in the admin panel.

Customization Options

Theme Customization

  • Light/Dark Mode: Automatic theme switching
  • Color Schemes: 16 customizable color variables
  • Typography: Font selection and sizing
  • Layout: Section ordering and visibility

Content Customization

  • Dynamic Content: All content manageable via admin panel
  • Media Assets: Cloudinary-powered image optimization
  • SEO Optimization: Meta tags, Open Graph, Twitter Cards
  • Social Integration: Multiple social media platform support

Performance Optimization

Caching Strategy

  • Static file compression with WhiteNoise
  • Cloudinary CDN for media files
  • Browser caching for optimal performance
  • Gunicorn with gevent for async processing

Database Optimization

  • Efficient query patterns
  • Database indexing for frequently accessed data
  • Connection pooling for production environments

Security Features

Data Protection

  • CSRF protection on all forms
  • XSS prevention in templates
  • Secure headers configuration
  • Environment variable protection for sensitive data

Authentication & Authorization

  • Django admin authentication
  • Session security configuration
  • Password validation requirements
  • OAuth integration support

Maintenance & Updates

Regular Maintenance Tasks

# Update dependencies
pip install -r requirements.txt --upgrade

# Database maintenance
python manage.py migrate

# Clear cache and rebuild static files
python manage.py collectstatic --clear

# Database backup (PostgreSQL)
pg_dump $DATABASE_URL > backup.sql

Monitoring & Health Checks

  • Health check endpoint at /health/
  • Error logging and monitoring
  • Performance tracking
  • Automated backup systems

Troubleshooting Guide

Common Issues & Solutions

Database Connection Issues

# Check database connectivity
python manage.py dbshell

# Reset migrations if needed
python manage.py migrate --fake-initial

Static File Problems

# Rebuild static files
python manage.py collectstatic --clear --noinput

# Check WhiteNoise configuration
DEBUG=True python manage.py runserver

Cloudinary Upload Issues

# Verify API credentials
python -c "import cloudinary; print(cloudinary.config())"

# Test upload functionality
python manage.py shell

AI Response Failures

  • Verify Google AI API key validity
  • Check API rate limits and quotas
  • Review AI prompt configuration in admin panel

Best Practices

Content Management

  1. Regular Updates: Keep project portfolio current
  2. Image Optimization: Use appropriate image sizes and formats
  3. SEO Maintenance: Update meta descriptions and keywords
  4. Performance Monitoring: Regular speed and uptime checks

Development Workflow

  1. Version Control: Use Git for all changes
  2. Testing: Test changes in development environment
  3. Deployment: Use CI/CD for production deployments
  4. Monitoring: Set up alerts for system health

This comprehensive manual provides complete guidance for understanding, installing, configuring, and maintaining the DevfolioX application. The system offers powerful customization capabilities while maintaining ease of use for content management and deployment.

About

A modern, responsive personal portfolio website to showcase my skills in full stack development, backend engineering (Django/Python), and UI/UX design. The entire site is fully customizable through an admin panel, including dynamic content updates and theme switching.

Topics

Resources

Stars

Watchers

Forks