How with-alif/alif_protfolio works
Purpose and Entry Points
This is a framework-free personal portfolio with a Supabase-backed CMS. The public site starts at index.html, with JavaScript bootstrapping from script/main.js; the management interface is split between admin/index.html (login) and admin/panel.html (content dashboard). A Vercel serverless endpoint at api/telegram.js handles Telegram notifications.
Public Application Composition
The public page is assembled as modular DOM-rendered sections coordinated by script/body.js and core/app.js. Section builders represent the major portfolio domains—profile, experience, projects, skills, services, contact, and related content—under script/sections/. Global and component CSS is distributed across lib/, app/, and style/, keeping the runtime static and browser-native.
Data Access and Content Rendering
Supabase is the central content boundary. config/supabase.js initializes database access, while config/schema.sql defines the database schema and row-level-security model. Public renderers load remote content through script/utils/loadData.js, then convert it into section-specific UI; project-specific rendering and detail presentation reside in project/projects.js and project/project-details.js.
CMS Administration
The admin flow authenticates users through admin/admin.js, then exposes Supabase CRUD operations through admin/panel.js. The dashboard manages the same content entities consumed by the public portfolio, allowing updates to propagate through the shared database rather than source edits. Admin views are isolated from the public site at admin/index.html and admin/panel.html.
Contact and Notification Pipeline
Contact submissions are handled client-side by config/mailer.js, using EmailJS configuration in config/config.js for inbox delivery. The notification path also reaches the deployed Vercel endpoint api/telegram.js, which uses server-side environment variables to call the Telegram Bot API. This separates sensitive Telegram credentials from static browser assets.
Interactive UI Subsystems
Projects support filtering, tags, rich details, and external links through project/projects.js, project/project-details.js, and tags/tags.js. Service content has its own dynamic interaction layer in service/service.js. SVG icon rendering is centralized in icons/index.js, with individual icon definitions such as icons/github-icon.js, avoiding a heavyweight icon runtime.
Runtime and Infrastructure Boundaries
The frontend is static HTML/CSS/ES modules and can run from a live server; Vercel is required when exercising serverless notification behavior. Supabase provides PostgreSQL persistence and authentication/RLS-backed access control; EmailJS and Telegram are external messaging services. Configuration and schema ownership are concentrated in config/, while api/telegram.js is the only server-side execution boundary visible in this tree.
Main entry points: app.js Application core · mailer.js Contact handler · supabase.js Supabase client · projects.js Projects UI
Components 19
Public portfolio
- Public entry
index.html - Browser bootstrap
script/main.js - Page composition · Coordinates modular portfolio sections.
script/body.js - Application core
core/app.js - Portfolio sections · Profile, experience, skills, services, and contact UI.
- Content loader
script/utils/loadData.js - Projects UI · Filtering, tags, project cards, and details.
project/projects.js - Tag interactions
tags/tags.js - Service interactions
service/service.js
CMS administration
- Admin login
admin/index.html - Admin authentication
admin/admin.js - Content dashboard
admin/panel.js
Content and configuration
- Supabase client
config/supabase.js - Supabase · Shared persistence and access-control boundary.
config/schema.sql
Contact notifications
- Contact handler
config/mailer.js - EmailJS config
config/config.js - EmailJS
- Telegram endpoint · Keeps Telegram credentials server-side.
api/telegram.js - Telegram Bot API
Connections 20
- Public entry → Browser bootstrap: loads
- Browser bootstrap → Page composition: starts
- Page composition → Application core: coordinates
- Application core → Portfolio sections: renders
- Application core → Projects UI: renders
- Application core → Service interactions: renders
- Projects UI → Tag interactions: uses
- Portfolio sections → Content loader: loads content
- Projects UI → Content loader: loads projects
- Content loader → Supabase client: queries through
- Supabase client → Supabase: accesses
- Admin login → Admin authentication: loads
- Admin authentication → Supabase client: authenticates via
- Admin authentication → Content dashboard: authorizes access
- Content dashboard → Supabase client: CRUD operations
- Portfolio sections → Contact handler: submits contact
- Contact handler → EmailJS config: uses
- Contact handler → EmailJS: delivers email
- Contact handler → Telegram endpoint: notifies
- Telegram endpoint → Telegram Bot API: calls with server env