Skip to content

Latest commit

Β 

History

History
124 lines (95 loc) Β· 4.14 KB

File metadata and controls

124 lines (95 loc) Β· 4.14 KB

literallysofia.github.io

Personal portfolio website built with Astro, showcasing my work as a software engineer and designer. ✨

πŸ”— Live: literallysofia.github.io

πŸ› οΈ Tech Stack

Layer Technology
Framework Astro 5.x
Styling Vanilla CSS + Custom Properties
Images Astro Image + Sharp
Deployment GitHub Actions β†’ GitHub Pages

⚑ Features

  • πŸŒ— Dark/light mode with localStorage persistence
  • πŸ“± Responsive design across all breakpoints
  • πŸ–ΌοΈ Optimized images with automatic WebP conversion and lazy loading
  • 🎨 CSS-only animations (no heavy libraries)
  • πŸ”’ Type-safe content collections with Zod schemas
  • πŸ”€ View transitions for smooth page navigation
  • πŸ” Optional password-protected access gate
  • πŸ“„ Encrypted CV download (AES-256-GCM + PBKDF2)
  • πŸ“œ Scroll-triggered timeline animations

πŸ“ Project Structure

/
β”œβ”€β”€ .github/workflows/
β”‚   └── deploy.yml              # GitHub Actions deployment
β”œβ”€β”€ public/                     # Static assets (favicon, encrypted CV)
β”œβ”€β”€ scripts/
β”‚   └── encrypt-cv.mjs          # CV encryption utility
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ assets/                 # Images (processed by Astro)
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ *.astro             # Astro components
β”‚   β”‚   └── icons/              # SVG icon components
β”‚   β”œβ”€β”€ content/                # Content collections
β”‚   β”‚   β”œβ”€β”€ hero/               # Homepage hero
β”‚   β”‚   β”œβ”€β”€ about/              # Education, languages
β”‚   β”‚   β”œβ”€β”€ experience/         # Work timeline
β”‚   β”‚   β”œβ”€β”€ extra-curricular/   # Volunteering, speaking
β”‚   β”‚   β”œβ”€β”€ portfolio/          # Side projects
β”‚   β”‚   └── *.md                 # Collection markdown files
β”‚   β”œβ”€β”€ layouts/
β”‚   β”‚   └── Layout.astro        # Base layout
β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   β”œβ”€β”€ index.astro         # Home
β”‚   β”‚   β”œβ”€β”€ about.astro         # About
β”‚   β”‚   β”œβ”€β”€ work.astro          # Work experience
β”‚   β”‚   β”œβ”€β”€ misc.astro          # Extra-curricular & projects
β”‚   β”‚   └── 404.astro           # Not found
β”‚   β”œβ”€β”€ styles/                 # CSS modules
β”‚   β”‚   β”œβ”€β”€ theme.css           # Design tokens & dark/light mode
β”‚   β”‚   β”œβ”€β”€ global.css          # Global styles
β”‚   β”‚   β”œβ”€β”€ animations.css      # Animation definitions
β”‚   β”‚   └── ...                 # Component styles
β”‚   β”œβ”€β”€ content.config.ts       # Collection schemas (glob loaders)
β”‚   └── config.ts               # Site metadata
β”œβ”€β”€ astro.config.mjs
β”œβ”€β”€ tsconfig.json
└── package.json

πŸš€ Development

Prerequisites

  • Node.js 18+
  • npm 9+

Setup

# Install dependencies
npm install

# Copy environment variables
cp .env.example .env

# Start dev server
npm run dev

πŸ“‹ Available Scripts

Script Description
npm run dev Start development server
npm run build Type-check and build for production
npm run preview Preview production build locally
npm run encrypt-cv Encrypt CV PDF (requires CV_PASSWORD env var)

πŸ”‘ Environment Variables

See .env.example for available options:

  • PUBLIC_SITE_PASSWORD β€” password for the access gate
  • PUBLIC_ENABLE_PASSWORD_GATE β€” force-enable gate in dev mode
  • CV_PASSWORD β€” password for CV encryption/decryption

✏️ Content Management

Content lives in src/content/ as Markdown files with typed frontmatter. Schemas are defined in src/content.config.ts.

To update content, edit the Markdown files under the relevant collection directory and changes will reflect immediately in dev mode.

🌐 Deployment

Pushes to the source branch trigger a GitHub Actions workflow that builds and deploys to GitHub Pages.

To set up:

  1. Go to repository Settings β†’ Pages
  2. Set Source to GitHub Actions
  3. Add PUBLIC_SITE_PASSWORD as a repository secret (if using the password gate)

πŸ“ License

MIT