Welcome to the source code of my personal portfolio website, ayfri.com.
This is a modern, fully-featured portfolio website showcasing my skills, projects, experiences, and blog articles. Built with Kotlin and Compose for Web, it combines the power of a modern web framework with type-safe, functional programming.
The website is built using Kobweb, a cutting-edge Kotlin web framework that provides:
- Type-safe DSLs for HTML and CSS
- Compose for Web components (functional UI)
- Static site generation capabilities
- Built-in routing and navigation
- Live reload development server
- Responsive Design: Fully responsive pages that work on all devices
- Blog System: Markdown-based articles with front matter metadata
- Project Showcase: Display of GitHub projects with integration via GitHub API
- Skills Section: Categorized technical skills and expertise
- Experience Timeline: Professional experience and internships
- About & Contact: Personal information and contact details
- Static Export: Generate optimized HTML files for deployment
- SEO Optimized: Structured metadata and schema markup for search engines
- Syntax Highlighting: Code blocks with language-specific highlighting (Prism.js)
- Custom Theme: Dark-themed design with smooth animations
src/jsMain/
βββ kotlin/io/github/ayfri/
β βββ Main.kt # App entry point and initialization
β βββ Style.kt # Global styles and themes
β βββ animations.kt # Animation utilities
β βββ CodeTheme.kt # Code syntax highlighting theme
β βββ components/ # Reusable UI components
β β βββ Header.kt # Navigation header
β β βββ Head.kt # HTML head metadata
β β βββ Tabs.kt # Tab component
β βββ pages/ # Website pages
β β βββ Index.kt # Home page
β β βββ AboutMe.kt # About page
β β βββ Skills.kt # Skills showcase
β β βββ Experiences.kt # Experience timeline
β β βββ Portfolio.kt # Portfolio grid
β β βββ projects/ # Project pages
β βββ layouts/ # Layout components (ArticleLayout, etc.)
β βββ jsonld/ # JSON-LD schema markup
β βββ utils/ # Utility functions and helpers
β
βββ resources/
βββ markdown/articles/ # Blog articles in Markdown
β βββ DatapackGenerators.md
β βββ KoreHelloWorld.md
β βββ KoreIntroduction.md
β βββ ... (more articles)
βββ public/ # Static files
βββ cv.pdf # Resume/CV
βββ logo.png # Site logo
βββ prism.min.js # Code highlighting
βββ images/ # Static images
- JDK 21+ (Java Development Kit)
- Gradle (included via Gradle Wrapper)
- A terminal/shell with access to
./gradlewcommands
To run the development server with live reload:
./gradlew kobwebStart -tThe website will be available at http://localhost:8080 and will automatically reload on file changes.
- Production Mode: Add
-PkobwebEnv=PRODfor optimized production build - Static Mode: Add
-PkobwebRunLayout=STATICfor HTML generation (useful for static exports) - Live Reload:
-tflag enables automatic page reload on code changes
Example with options:
./gradlew kobwebStart -t -PkobwebEnv=PRODTo generate optimized static HTML files:
./gradlew kobwebExportExport options:
- Production Mode:
-PkobwebEnv=PRODfor optimized production build - Static Mode:
-PkobwebRunLayout=STATICfor full HTML generation
The exported website will be available in the .kobweb/client directory.
Articles are stored in src/jsMain/resources/markdown/articles/ as Markdown files with YAML front matter.
- Create a new
.mdfile insrc/jsMain/resources/markdown/articles/ - Add front matter at the top of the file
- Write your article content in Markdown below the front matter
---
nav-title: Article URL Slug
title: Display Title of the Article
description: Short description for SEO and previews (50-160 characters recommended)
keywords: comma,separated,keywords,for,seo
date-created: YYYY-MM-DD
date-modified: YYYY-MM-DD
root: .layouts.ArticleLayout
routeOverride: /articles/article-url-slug/index
---
# Article content starts here| Field | Purpose |
|---|---|
nav-title |
URL slug for the article (e.g., kore-hello-world) |
title |
Display title shown in article lists and headers |
description |
SEO description and preview text |
keywords |
Comma-separated keywords for search engines |
date-created |
Article creation date in YYYY-MM-DD format |
date-modified |
Last modification date in YYYY-MM-DD format |
root |
Layout component (usually .layouts.ArticleLayout) |
routeOverride |
Full URL path for the article (/articles/slug/index) |
- Markdown Formatting: Full Markdown support (headings, lists, tables, emphasis, etc.)
- Code Blocks: Syntax highlighting via Prism.js
- Images: Support for local and external images
- Links: Internal and external links with proper routing
- SEO: Automatic meta tags and JSON-LD schema
The website integrates with an external GitHub API for dynamic project data:
- GitHub projects are fetched from a hosted JSON API
- Project data includes stars, forks, and descriptions
- The data is embedded during the build process in
build/generated/ayfri/src/jsMain/kotlin/io/github/ayfri/data/Data.kt - API endpoint:
https://raw.githubusercontent.com/Ayfri/Portfolio/api/result.json
Data download happens automatically during the build via the downloadData Gradle task.
- Kotlin 2.2.21: Type-safe language for web development
- Compose for Web 1.9.1: Functional UI framework
- Kobweb 0.23.3: Full-stack Kotlin web framework
- Markdown Processing: KobwebX Markdown plugin for article conversion
- HTML/CSS: Compose HTML and CSS DSLs for styling
The project uses Gradle with several custom tasks:
kobwebStart: Start development server with live reloadkobwebExport: Export static HTML filesdownloadData: Download and process GitHub project data
Global styles are defined in Style.kt. The site uses:
- CSS-in-Code via Compose DSL
- Dark theme with accent colors
- Custom scrollbar styling
- Responsive media queries
Reusable components are in components/:
Header.kt: Navigation and brandingHead.kt: Metadata and SEO tags- Custom components for portfolio sections
Page layouts are in layouts/:
ArticleLayout: Template for blog articlesPageLayout: General page wrapper with header/footer
The website can be deployed anywhere that serves static files:
- Run
./gradlew kobwebExport -PkobwebEnv=PROD - Upload contents of
.kobweb/clientto your hosting - Ensure your server is configured for SPA routing (redirect 404s to index.html)
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.