Skip to content

NinePiece2/HomePage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Portfolio & Personal HomePage

Next.js .NET Docker Kubernetes TypeScript

A modern, full-stack personal portfolio website showcasing projects, skills, and professional experience. Built with Next.js, .NET Core, and deployed on Kubernetes for production scalability.

🌟 Overview

This is a comprehensive portfolio application featuring a responsive frontend built with Next.js and TypeScript, backed by a robust .NET Core API. The application showcases personal projects with dynamic content rendering, includes a functional contact system with email integration, and demonstrates modern web development practices with containerization and orchestration.

Live Demo: romitsagu.com

Table of Contents

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Frontend      β”‚    β”‚   Backend       β”‚    β”‚   Database      β”‚
β”‚   (Next.js)     │◄──►│   (.NET Core)   │◄──►│   (SQL Server)  β”‚
β”‚   Port: 3000    β”‚    β”‚   Port: 8080    β”‚    β”‚   Port: 1433    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚                       β”‚                       β”‚
         β”‚              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”              β”‚
         β”‚              β”‚   Email Service β”‚              β”‚
         β”‚              β”‚   (SMTP)        β”‚              β”‚
         β”‚              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜              β”‚
         β”‚                                               β”‚
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚                 Kubernetes Cluster                      β”‚
    β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”‚
    β”‚  β”‚   Ingress   β”‚  β”‚   Service   β”‚  β”‚   ConfigMap β”‚      β”‚
    β”‚  β”‚   (Nginx)   β”‚  β”‚   (LB)      β”‚  β”‚   (Config)  β”‚      β”‚
    β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

The application follows a modern microservices architecture with:

  • Frontend: Next.js application with TypeScript, Tailwind CSS, and Framer Motion
  • Backend: .NET Core Web API with Entity Framework Core
  • Database: SQL Server with Entity Framework migrations
  • Containerization: Docker containers for both frontend and backend
  • Orchestration: Kubernetes deployment with services, ingress, and ConfigMaps
  • Email: SMTP integration for contact form functionality

✨ Features

🎨 Frontend Features

  • Responsive Design: Mobile-first approach with Tailwind CSS
  • Interactive Animations: Smooth transitions with Framer Motion
  • Particle Effects: Dynamic background particles using TSParticles
  • Map Integration: Interactive location display with Leaflet
  • Dark Theme: Modern dark UI with emerald accents
  • SEO Optimized: Meta tags, structured data, and performance optimization

πŸ”§ Backend Features

  • RESTful API: Clean API design with Swagger documentation
  • Entity Framework: Code-first database approach with migrations
  • Email Service: SMTP integration for contact form submissions
  • Data Protection: Secure key management with Entity Framework
  • CORS Support: Cross-origin resource sharing configuration
  • Environment Configuration: Separate development and production settings

πŸ“± Content Sections

  • About: Personal introduction and background
  • Skills: Categorized technical skills with icons
  • Experience: Professional work history and achievements
  • Projects: Detailed project showcase with GitHub integration
  • Certificates: Professional certifications and credentials
  • Testimonials: Colleague recommendations and feedback
  • Contact: Functional contact form with email delivery
  • Location: Interactive map showing current location

πŸ› οΈ Technology Stack

Frontend (HomePage-UI)

  • Framework: Next.js 15 with App Router
  • Language: TypeScript 5.0+
  • Styling: Tailwind CSS 3.4+
  • Animations: Framer Motion 12.23+
  • UI Components: Custom components with Lucide React icons
  • Data Grid: Syncfusion EJ2 React Grids
  • Maps: React Leaflet for interactive maps
  • Particles: TSParticles for background effects
  • Build Tool: Turbopack for fast development

Backend (HomePage-API)

  • Framework: .NET 10.0 Web API
  • Language: C# with nullable reference types
  • ORM: Entity Framework Core 10.0
  • Database: SQL Server with Entity Framework migrations
  • Documentation: Swagger/OpenAPI 3.0
  • Email: SMTP service for contact forms
  • Security: ASP.NET Core Data Protection
  • Markdown: Markdig for README rendering

DevOps & Infrastructure

  • Containerization: Docker with multi-stage builds
  • Orchestration: Kubernetes with YAML manifests
  • Web Server: Nginx for reverse proxy and SSL termination
  • CI/CD: GitHub Actions for automated deployment
  • SSL: TLS certificates for secure communication
  • Environment: Development and production configurations

πŸ“ Project Structure

HomePage/
β”œβ”€β”€ .github/                     # GitHub workflows and automation
β”‚   β”œβ”€β”€ dependabot.yml           # Dependency update automation
β”‚   └── workflows/               # CI/CD pipeline definitions
β”‚       β”œβ”€β”€ build-api.yml        # Docker build & push for backend API
β”‚       β”œβ”€β”€ build-ui.yml         # Docker build & push for frontend UI
β”‚       β”œβ”€β”€ deploy.yml           # Kubernetes deployment to production
β”‚       β”œβ”€β”€ pr-check-api.yml     # PR validation & testing for API
β”‚       β”œβ”€β”€ pr-check-ui.yml      # PR validation & testing for UI
β”‚       └── update-readme.yml    # Automated README badge updates
β”œβ”€β”€ HomePage-UI/                 # Next.js Frontend Application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ app/                # App Router pages and layouts
β”‚   β”‚   β”‚   β”œβ”€β”€ (home)/         # Home page grouped routes
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ Contact/    # Contact form page
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ Logo/       # Logo generator page
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ Resume/     # Resume viewer page
β”‚   β”‚   β”‚   β”‚   └── page.tsx    # Main homepage
β”‚   β”‚   β”‚   β”œβ”€β”€ Projects/       # Projects section with dynamic routes
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ [...path]/  # Dynamic project detail pages
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ layout.tsx  # Projects layout with navigation
β”‚   β”‚   β”‚   β”‚   └── page.tsx    # Projects overview with data grid
β”‚   β”‚   β”‚   └── api/            # API route handlers
β”‚   β”‚   β”‚       └── proxy/      # API proxy for backend communication
β”‚   β”‚   β”œβ”€β”€ components/         # Reusable React components
β”‚   β”‚   β”‚   β”œβ”€β”€ Home/           # Homepage-specific components
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ AboutSection.tsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ CertificatesSection.tsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ContactSection.tsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ExperienceSection.tsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ HeroSection.tsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ LocationSection.tsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ MobileNav.tsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ Navbar.tsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ ProjectsSection.tsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ SignatureProjectSection.tsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ SkillsSection.tsx
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ TestimonialsSection.tsx
β”‚   β”‚   β”‚   β”‚   └── TimelineItem.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ HeroParticles.tsx    # TSParticles background animation
β”‚   β”‚   β”‚   β”œβ”€β”€ MapComponent.tsx     # Leaflet map integration
β”‚   β”‚   β”‚   └── icons.tsx           # Custom SVG icon components
β”‚   β”‚   β”œβ”€β”€ lib/                # Utility functions and configurations
β”‚   β”‚   β”‚   β”œβ”€β”€ data.tsx        # Static content data (skills, projects, etc.)
β”‚   β”‚   β”‚   └── proxy.ts        # API proxy utility functions
β”‚   β”‚   └── types/              # TypeScript type definitions
β”‚   β”‚       └── types.ts        # Shared interface definitions
β”‚   β”œβ”€β”€ public/                 # Static assets and images
β”‚   β”œβ”€β”€ Dockerfile             # Frontend container configuration
β”‚   β”œβ”€β”€ package.json           # Dependencies and scripts
β”‚   β”œβ”€β”€ tailwind.config.js     # Tailwind CSS configuration
β”‚   β”œβ”€β”€ next.config.ts         # Next.js configuration
β”‚   └── tsconfig.json          # TypeScript configuration
β”‚
β”œβ”€β”€ HomePage-API/               # .NET Core Backend API
β”‚   β”œβ”€β”€ Controllers/           # API endpoint controllers
β”‚   β”‚   β”œβ”€β”€ ContactController.cs    # Contact form handling
β”‚   β”‚   └── ProjectsController.cs   # Project data endpoints
β”‚   β”œβ”€β”€ Data/                  # Entity Framework context and configuration
β”‚   β”‚   └── HomePageContext.cs     # Database context
β”‚   β”œβ”€β”€ Models/                # Data models and DTOs
β”‚   β”‚   β”œβ”€β”€ Application.cs         # Project/application model
β”‚   β”‚   β”œβ”€β”€ Models.cs             # Request/response models
β”‚   β”‚   └── PowerSettings.cs      # System configuration model
β”‚   β”œβ”€β”€ Services/              # Business logic and external services
β”‚   β”‚   └── EmailService.cs       # SMTP email functionality
β”‚   β”œβ”€β”€ Properties/            
β”‚   β”‚   └── launchSettings.json 
β”‚   β”œβ”€β”€ appsettings.json       # Production configuration
β”‚   β”œβ”€β”€ appsettings.Development.json  # Development configuration
β”‚   β”œβ”€β”€ Dockerfile             # Backend container configuration
β”‚   β”œβ”€β”€ Program.cs             # Application entry point and configuration
β”‚   └── HomePage-API.csproj    # Project file and dependencies
β”‚
β”œβ”€β”€ Kubernetes/                # Kubernetes deployment manifests
β”‚   β”œβ”€β”€ HomePageV2Deployment.yaml  # Application deployment configuration
β”‚   └── Nginx-config.yaml         # Nginx ingress configuration
β”‚
β”œβ”€β”€ .dockerignore            # Docker build exclusions
β”œβ”€β”€ .gitignore               # Git version control exclusions
β”œβ”€β”€ HomePage.sln             # Visual Studio solution file
└── README.md                # Project documentation (this file)

πŸš€ Getting Started

Prerequisites

Ensure you have the following installed:

  • Node.js 22+ and npm 10+
  • .NET 10.0 SDK or later
  • SQL Server (LocalDB for development, full instance for production)
  • Git for version control
  • Docker (optional, for containerization)
  • Kubernetes (optional, for orchestration)

Quick Start

  1. Clone and Setup

    git clone https://github.com/NinePiece2/HomePage.git
    cd HomePage
  2. Frontend Setup

    cd HomePage-UI
    npm install
    # Edit .env.local with your configuration
    npm run dev

    Frontend available at: http://localhost:3000

  3. Backend Setup (in a new terminal)

    cd HomePage-API
    dotnet restore
    # Configure appsettings.Development.json
    dotnet ef database update
    dotnet run

    API available at: http://localhost:5298

  4. Verify Setup

Development Workflow

# Start both services simultaneously
cd HomePage-UI
npm run dev-all

# Or start them separately:
# Terminal 1: Frontend
npm run dev

# Terminal 2: Backend
npm run dev-api

Environment Configuration

Frontend Environment Variables

Create HomePage-UI/.env.local:

# API Configuration
API_BASE_URL=http://localhost:5298

# Syncfusion License (required for data grid components)
SYNCFUSION_LICENSE=your_syncfusion_license_key_here

# Optional: Disable Next.js telemetry
NEXT_TELEMETRY_DISABLED=1

Backend Configuration

Create HomePage-API/appsettings.Development.json:

{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft.AspNetCore": "Warning"
    }
  },
  "AllowedHosts": "*",
  "ConnectionStrings": {
    "HomePageEntities": "Server=(localdb)\\mssqllocaldb;Database=HomePage;Trusted_Connection=true;MultipleActiveResultSets=true"
  },
  "Cors": {
    "AllowedOrigins": [
      "http://localhost:3000"
    ]
  }
}

Production Configuration Notes

  • Use Kubernetes secrets for sensitive data
  • Configure SQL Server connection strings for production
  • Set up Email Service API credentials for email functionality
  • Update CORS origins for your production domain

🐳 Development with Docker

Individual Container Commands

Frontend Container

cd HomePage-UI
docker build -t homepage-ui .
docker run -p 3000:3000 homepage-ui

Backend Container

cd HomePage-API
docker build -t homepage-api .
docker run -p 8080:8080 homepage-api

☸️ Kubernetes Deployment

Deploy to Kubernetes Cluster

# Create namespace
kubectl create namespace homepage

# Apply Nginx configuration
kubectl apply -f Kubernetes/Nginx-config.yaml

# Deploy application
kubectl apply -f Kubernetes/HomePageV2Deployment.yaml

# Check deployment status
kubectl get pods -n homepage
kubectl get services -n homepage

Kubernetes Resources

The deployment includes:

  • Deployments: Frontend (3 replicas) and Backend (3 replicas)
  • Services: LoadBalancer and ClusterIP services
  • ConfigMaps: Nginx configuration and application settings
  • Secrets: SSL certificates and sensitive configuration
  • Ingress: Traffic routing and SSL termination

πŸ“š API Documentation

Authentication

Currently, the API does not require authentication for public endpoints.

Projects Controller

Get All Projects

GET /Projects/GetAll
Accept: application/json

Response:

[
  {
    "name": "Home Cloud Server",
    "gitHubLink": "https://github.com/NinePiece2/HomeCloudServer",
    "applicationLink": "https://homecloudserver.romitsagu.com/",
    "homePageLink": "/Projects/HomeServer"
  }
]

Get Specific Project Details

GET /Projects/{ProjectName}
Accept: application/json

Available Project Endpoints:

  • /Projects/HomeServer - Home Cloud Server details
  • /Projects/Facegen - Artiface FaceGen project
  • /Projects/CDN - Content Delivery Network project
  • /Projects/CacheController - Cache Controller project
  • /Projects/VGAController - VGA Controller project
  • /Projects/LanCacheUI - LanCache UI project
  • /Projects/MRIBrainTumorDetection - MRI Brain Tumor Detection
  • /Projects/SmartTrafficControlSystem - Smart Traffic Control System

Response:

{
  "projectName": "Home Cloud Server",
  "projectDescription": "Project description",
  "projectGithubLink": "https://github.com/NinePiece2/HomeCloudServer",
  "projectApplicationLink": "https://homecloudserver.romitsagu.com/",
  "projectReadmeContent": "<html>Rendered markdown content</html>"
}

Contact Controller

Send Contact Form

POST /Contact/SendContactForm
Content-Type: application/json

Request Body:

{
  "name": "John Doe",
  "email": "[email protected]",
  "topic": "General Inquiry",
  "message": "Hello, I'm interested in your projects..."
}

Response:

{
  "success": true,
  "message": "Email sent successfully"
}

Error Responses

All endpoints may return these error responses:

{
  "error": "Error message description",
  "status": 400
}

Common HTTP Status Codes:

  • 200 - Success
  • 400 - Bad Request
  • 404 - Not Found
  • 500 - Internal Server Error

πŸ”§ Scripts and Commands

Frontend (HomePage-UI)

# Development
npm run dev              # Start development server with Turbopack
npm run build           # Build for production
npm run lint            # Run ESLint code analysis

# Cross-service development
npm run dev-api         # Start backend API from UI directory
npm run dev-all         # Start both frontend and backend concurrently

# Docker commands
docker build -t homepage-ui .                    # Build frontend container
docker run -p 3000:3000 homepage-ui             # Run frontend container

Backend (HomePage-API)

# Development
dotnet run                          # Start development server
dotnet watch run                    # Start with hot reload
dotnet build                        # Build the application
dotnet build --configuration Release  # Build for production

# Database management
dotnet ef migrations add <MigrationName>   # Create new migration
dotnet ef database update                  # Apply pending migrations
dotnet ef migrations remove               # Remove last migration
dotnet ef database drop                   # Drop database (development only)

# Docker commands
docker build -t homepage-api .                   # Build backend container
docker run -p 8080:8080 homepage-api            # Run backend container

Full Stack Development

# Kubernetes deployment
kubectl apply -f Kubernetes/    # Deploy to Kubernetes
kubectl get pods -n homepage    # Check deployment status
kubectl logs -f deployment/homepage-ui -n homepage  # View logs

Utility Scripts

# Clean build artifacts
npm run clean && dotnet clean   # Clean all build outputs

πŸ“ˆ Performance Optimizations

  • Next.js Features: App Router, Server Components, Image Optimization
  • Code Splitting: Automatic route-based code splitting
  • Lazy Loading: Dynamic imports for heavy components
  • Caching: API response caching and static asset optimization
  • CDN: Static assets served through CDN
  • Compression: Gzip compression for all text assets
  • Database: Optimized Entity Framework queries with indexing

πŸ”’ Security Features

  • HTTPS: SSL/TLS encryption for all communications
  • CORS: Properly configured cross-origin resource sharing
  • Data Protection: ASP.NET Core Data Protection for sensitive data
  • Input Validation: Server-side validation for all inputs
  • SQL Injection Prevention: Parameterized queries through Entity Framework
  • XSS Protection: Content Security Policy and input sanitization

Built with ❀️ by Romit Sagu

Showcasing modern full-stack development with Next.js, .NET Core, and Kubernetes

About

Portfolio website that I created for myself using Next.js and ASP.NET Core 9.

Topics

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •