How kafi350/portfolio-svelte works
Project type and purpose
• This is a single-page portfolio web app built with SvelteKit and deployed as a static site.
• It serves personal data (projects, bio, interests) from a local data module and integrates with EmailJS for the contact form.
File structure
• src/
• app.html – HTML template
• data/data.js – portfolio content (bio, projects)
• lib/components – reusable Svelte UI components (Header, Footer, ProjectCard, etc.)
• routes – SvelteKit pages (+layout.svelte, +page.svelte, and per-route pages: about, contact, interests)
• styles/global.css – global styling
• static/ – fonts and photos served as-is
• config files – svelte.config.js, vite.config.js, vercel.json for build & deployment
• package.json & eslint.config.js – dependencies and linting rules
README for additional insights
• Uses Node.js + npm for local development & build
• Run npm run dev for SvelteKit’s dev server
• Data customization via data.js
• EmailJS keys configured via environment variables
Main components
a. Developer Machine (local dev)
• Source code in Git repository
• npm / SvelteKit CLI
b. CI/CD Pipeline / Hosting
• GitHub (code storage) → Vercel (build & deploy)
• Vercel runs npm run build, outputs static assets
• CDN distributes content globally
c. Client Browser
• Requests HTML/CSS/JS from the CDN/Vercel
• Renders static site
• Loads data.js at runtime or build time (depending on SSG vs SSR configuration)
d. External Service
• EmailJS API for sending contact-form emails
e. Static Assets
• Fonts and photos served from the static folder via CDN
Relationships and data flows
• Developer → GitHub (code commit)
Architectural patterns & design principles
• Component-based UI: small, reusable Svelte components under lib/components
• File-based routing: SvelteKit’s routes directory
• Static-first deployment: leverage SSG / CDN for performance
• Separation of concerns: data.js for content, .env for secrets, components for UI
Technologies & frameworks
• Frontend: SvelteKit, Vite
• Styling: CSS (global.css)
• Hosting: Vercel + CDN
• External API: EmailJS
• Build tools: Node.js, npm