How mohamedfaridelsherbini/personal_website works
This is a Kotlin/Ktor personal portfolio website. Visitors request a home page or project case study; routes delegate page rendering to an application service, which loads résumé content through domain use cases and renders HTML. The site also provides an authenticated admin workflow for editing structured content and replacing a résumé, with cache invalidation so updates appear promptly. The README documents the content-driven design and modular templates; some route and view internals were not sampled, so only documented or indexed relationships are shown.
Main entry points: WebsiteService.kt Website service · Routes.kt Route registration · AdminContentService.kt Admin content service · usecases Content use cases
Components 21
HTTP interface
- Ktor startup
bootstrap/src/main/kotlin/com/personalwebsite/Application.kt - Route registration
infrastructure/src/main/kotlin/com/personalwebsite/infrastructure/web/routing/Routes.kt - Home routes
infrastructure/src/main/kotlin/com/personalwebsite/infrastructure/web/routing/HomeRoutes.kt - Project routes
infrastructure/src/main/kotlin/com/personalwebsite/infrastructure/web/routing/ProjectRoutes.kt - Admin routes
infrastructure/src/main/kotlin/com/personalwebsite/infrastructure/web/routing/AdminRoutes.kt - Sitemap routes
infrastructure/src/main/kotlin/com/personalwebsite/infrastructure/web/routing/SitemapRoutes.kt
Page application
- Website service
application/src/main/kotlin/com/personalwebsite/application/website/WebsiteService.kt - Page models
application/src/main/kotlin/com/personalwebsite/application/website/model/PageModel.kt - Website view model
application/src/main/kotlin/com/personalwebsite/application/website/model/WebsiteViewModel.kt - Render cache port
application/src/main/kotlin/com/personalwebsite/application/website/ports/RenderCache.kt - In-memory cache
infrastructure/src/main/kotlin/com/personalwebsite/infrastructure/cache/InMemoryRenderCache.kt
Domain content
- Content use cases
domain/src/main/kotlin/com/personalwebsite/domain/usecases - Résumé entities
domain/src/main/kotlin/com/personalwebsite/domain/entities - Repository ports
domain/src/main/kotlin/com/personalwebsite/domain/repositories
Content adapters
- JSON content loader
infrastructure/src/main/kotlin/com/personalwebsite/infrastructure/content/ContentLoader.kt - Content repositories
infrastructure/src/main/kotlin/com/personalwebsite/infrastructure/content - Admin content service
infrastructure/src/main/kotlin/com/personalwebsite/infrastructure/admin/AdminContentService.kt
HTML presentation
- HTML website view
infrastructure/src/main/kotlin/com/personalwebsite/infrastructure/web/view/HtmlWebsiteView.kt - Page renderers
infrastructure/src/main/kotlin/com/personalwebsite/infrastructure/web/view/templates - View components
infrastructure/src/main/kotlin/com/personalwebsite/infrastructure/web/view/components
Other components
- Site visitor
Connections 24
- Site visitor → Route registration: requests pages
README.md - Ktor startup → Route registration: registers routes
bootstrap/src/main/kotlin/com/personalwebsite/Application.kt - Route registration → Home routes: registers
- Route registration → Project routes: registers
- Route registration → Admin routes: registers
- Route registration → Sitemap routes: registers
- Home routes → Website service: requests rendering
- Project routes → Website service: requests rendering
infrastructure/src/main/kotlin/com/personalwebsite/infrastructure/web/routing/ProjectRoutes.kt - Admin routes → Admin content service: calls
infrastructure/src/main/kotlin/com/personalwebsite/infrastructure/web/routing/AdminRoutes.kt - Website service → Content use cases: loads content
application/src/main/kotlin/com/personalwebsite/application/website/WebsiteService.kt - Content use cases → Repository ports: queries
domain/src/main/kotlin/com/personalwebsite/domain/usecases/GetPersonalProjectsUseCase.kt - Repository ports → Résumé entities: returns entities
domain/src/main/kotlin/com/personalwebsite/domain/repositories/PersonalProjectRepository.kt - Content repositories → JSON content loader: loads JSON
infrastructure/src/main/kotlin/com/personalwebsite/infrastructure/content/PersonalProjectRepositoryImpl.kt - Content repositories → Repository ports: implements
infrastructure/src/main/kotlin/com/personalwebsite/infrastructure/content/PersonalProjectRepositoryImpl.kt - Website service → Website view model: builds
application/src/main/kotlin/com/personalwebsite/application/website/WebsiteService.kt - Website service → Page models: creates
application/src/main/kotlin/com/personalwebsite/application/website/WebsiteService.kt - Website service → Render cache port: reads and writes
application/src/main/kotlin/com/personalwebsite/application/website/WebsiteService.kt - In-memory cache → Render cache port: implements
- Website service → HTML website view: renders through
application/src/main/kotlin/com/personalwebsite/application/website/WebsiteService.kt - HTML website view → Page renderers: renders pages
infrastructure/src/main/kotlin/com/personalwebsite/infrastructure/web/view/HtmlWebsiteView.kt - Page renderers → View components: uses components
README.md - Admin content service → JSON content loader: clears cache
infrastructure/src/main/kotlin/com/personalwebsite/infrastructure/admin/AdminContentService.kt - Admin content service → Render cache port: clears cache
infrastructure/src/main/kotlin/com/personalwebsite/infrastructure/admin/AdminContentService.kt - Sitemap routes → Content use cases: queries projects
infrastructure/src/main/kotlin/com/personalwebsite/infrastructure/web/routing/SitemapRoutes.kt