|
1 | | -# Sofia Silva - Portfolio Website |
| 1 | +# literallysofia.github.io |
2 | 2 |
|
3 | | -A personal portfolio website built with Astro + React, showcasing my work as a software engineer. |
| 3 | +Personal portfolio website built with [Astro](https://astro.build), showcasing my work as a software engineer and designer. ✨ |
4 | 4 |
|
5 | | -## Tech Stack |
| 5 | +🔗 **Live:** [literallysofia.github.io](https://literallysofia.github.io) |
6 | 6 |
|
7 | | -- **Framework:** Astro 4.x |
8 | | -- **UI Library:** React 18 (Islands Architecture) |
9 | | -- **Styling:** Vanilla CSS with CSS Custom Properties |
10 | | -- **Deployment:** GitHub Actions → GitHub Pages |
11 | | -- **Image Optimization:** Astro Image + Sharp |
| 7 | +## 🛠️ Tech Stack |
12 | 8 |
|
13 | | -## Key Features |
| 9 | +| Layer | Technology | |
| 10 | +|-------|-----------| |
| 11 | +| Framework | Astro 5.x | |
| 12 | +| Styling | Vanilla CSS + Custom Properties | |
| 13 | +| Images | Astro Image + Sharp | |
| 14 | +| Deployment | GitHub Actions → GitHub Pages | |
14 | 15 |
|
15 | | -- ⚡ Fast static site generation with minimal JavaScript |
16 | | -- 🎨 Dark/light mode toggle with localStorage persistence |
17 | | -- 📱 Fully responsive design |
18 | | -- ♿ Accessible navigation and smooth scrolling |
19 | | -- 🖼️ Optimized images with automatic WebP conversion |
20 | | -- 🎭 CSS animations (no heavy animation libraries) |
21 | | -- 🔧 Type-safe content collections |
| 16 | +## ⚡ Features |
22 | 17 |
|
23 | | -## Architecture Highlights |
| 18 | +- 🌗 Dark/light mode with `localStorage` persistence |
| 19 | +- 📱 Responsive design across all breakpoints |
| 20 | +- 🖼️ Optimized images with automatic WebP conversion and lazy loading |
| 21 | +- 🎨 CSS-only animations (no heavy libraries) |
| 22 | +- 🔒 Type-safe content collections with Zod schemas |
| 23 | +- 🔀 View transitions for smooth page navigation |
| 24 | +- 🔐 Optional password-protected access gate |
| 25 | +- 📄 Encrypted CV download (AES-256-GCM + PBKDF2) |
| 26 | +- 📜 Scroll-triggered timeline animations |
24 | 27 |
|
25 | | -### Dependency Minimalism |
26 | | -Only **5 production dependencies** (79% reduction from previous Gatsby build): |
27 | | -- `astro` |
28 | | -- `react` |
29 | | -- `react-dom` |
30 | | -- `sharp` (for image optimization) |
31 | | -- `@astrojs/react` (dev dependency) |
32 | | - |
33 | | -### Component Strategy |
34 | | -- **React Islands** (interactive): Header, MobileMenu, DarkModeToggle |
35 | | -- **Astro Components** (static): Banner, About, Timeline, Portfolio, Footer |
36 | | -- **SVG Icons** (inline): GitHub, LinkedIn, Behance, Link |
37 | | - |
38 | | -## Project Structure |
| 28 | +## 📁 Project Structure |
39 | 29 |
|
40 | 30 | ``` |
41 | 31 | / |
42 | | -├── public/ # Static assets (favicon, etc.) |
| 32 | +├── .github/workflows/ |
| 33 | +│ └── deploy.yml # GitHub Actions deployment |
| 34 | +├── public/ # Static assets (favicon, encrypted CV) |
| 35 | +├── scripts/ |
| 36 | +│ └── encrypt-cv.mjs # CV encryption utility |
43 | 37 | ├── src/ |
44 | | -│ ├── assets/ # Images (processed by Astro) |
| 38 | +│ ├── assets/ # Images (processed by Astro) |
45 | 39 | │ ├── components/ |
46 | | -│ │ ├── react/ # React island components |
47 | | -│ │ ├── icons/ # SVG icon components |
48 | | -│ │ └── *.astro # Static Astro components |
49 | | -│ ├── content/ # Content collections (markdown) |
50 | | -│ │ ├── hero/ |
51 | | -│ │ ├── about/ |
52 | | -│ │ ├── experience/ |
53 | | -│ │ ├── extra-curricular/ |
54 | | -│ │ └── portfolio/ |
| 40 | +│ │ ├── *.astro # Astro components |
| 41 | +│ │ └── icons/ # SVG icon components |
| 42 | +│ ├── content/ # Content collections |
| 43 | +│ │ ├── hero/ # Homepage hero |
| 44 | +│ │ ├── about/ # Education, languages |
| 45 | +│ │ ├── experience/ # Work timeline |
| 46 | +│ │ ├── extra-curricular/ # Volunteering, speaking |
| 47 | +│ │ ├── portfolio/ # Side projects |
| 48 | +│ │ └── *.md # Collection markdown files |
55 | 49 | │ ├── layouts/ |
56 | | -│ │ └── Layout.astro |
| 50 | +│ │ └── Layout.astro # Base layout |
57 | 51 | │ ├── pages/ |
58 | | -│ │ ├── index.astro |
59 | | -│ │ └── 404.astro |
60 | | -│ ├── styles/ # Vanilla CSS modules |
61 | | -│ └── config.ts # Site configuration |
| 52 | +│ │ ├── index.astro # Home |
| 53 | +│ │ ├── about.astro # About |
| 54 | +│ │ ├── work.astro # Work experience |
| 55 | +│ │ ├── misc.astro # Extra-curricular & projects |
| 56 | +│ │ └── 404.astro # Not found |
| 57 | +│ ├── styles/ # CSS modules |
| 58 | +│ │ ├── theme.css # Design tokens & dark/light mode |
| 59 | +│ │ ├── global.css # Global styles |
| 60 | +│ │ ├── animations.css # Animation definitions |
| 61 | +│ │ └── ... # Component styles |
| 62 | +│ ├── content.config.ts # Collection schemas (glob loaders) |
| 63 | +│ └── config.ts # Site metadata |
| 64 | +├── astro.config.mjs |
| 65 | +├── tsconfig.json |
62 | 66 | └── package.json |
63 | 67 | ``` |
64 | 68 |
|
65 | | -## Development |
| 69 | +## 🚀 Development |
66 | 70 |
|
67 | 71 | ### Prerequisites |
68 | | -- Node.js 18.x or higher |
69 | | -- npm 9.x or higher |
| 72 | + |
| 73 | +- Node.js 18+ |
| 74 | +- npm 9+ |
70 | 75 |
|
71 | 76 | ### Setup |
72 | 77 |
|
73 | 78 | ```bash |
74 | 79 | # Install dependencies |
75 | 80 | npm install |
76 | 81 |
|
77 | | -# Start development server |
78 | | -npm run dev |
| 82 | +# Copy environment variables |
| 83 | +cp .env.example .env |
79 | 84 |
|
80 | | -# Build for production |
81 | | -npm run build |
82 | | - |
83 | | -# Preview production build |
84 | | -npm run preview |
| 85 | +# Start dev server |
| 86 | +npm run dev |
85 | 87 | ``` |
86 | 88 |
|
87 | | -### Content Management |
88 | | - |
89 | | -Content is managed through Astro Content Collections in the `src/content/` directory. Each collection has: |
90 | | -- Type-safe schemas defined in `src/content/config.ts` |
91 | | -- Markdown files with frontmatter for structured data |
92 | | -- Automatic validation and TypeScript types |
| 89 | +### 📋 Available Scripts |
93 | 90 |
|
94 | | -To update content: |
95 | | -1. Edit the markdown files in `src/content/{collection}/index.md` |
96 | | -2. Follow the existing frontmatter structure |
97 | | -3. Run `npm run dev` to see changes instantly |
| 91 | +| Script | Description | |
| 92 | +|--------|------------| |
| 93 | +| `npm run dev` | Start development server | |
| 94 | +| `npm run build` | Type-check and build for production | |
| 95 | +| `npm run preview` | Preview production build locally | |
| 96 | +| `npm run encrypt-cv` | Encrypt CV PDF (requires `CV_PASSWORD` env var) | |
98 | 97 |
|
99 | | -## Deployment |
| 98 | +### 🔑 Environment Variables |
100 | 99 |
|
101 | | -The site automatically deploys to GitHub Pages via GitHub Actions when you push to the `source` branch. |
| 100 | +See `.env.example` for available options: |
102 | 101 |
|
103 | | -### GitHub Pages Setup |
| 102 | +- `PUBLIC_SITE_PASSWORD` — password for the access gate |
| 103 | +- `PUBLIC_ENABLE_PASSWORD_GATE` — force-enable gate in dev mode |
| 104 | +- `CV_PASSWORD` — password for CV encryption/decryption |
104 | 105 |
|
105 | | -1. Go to repository Settings → Pages |
106 | | -2. Set Source to "GitHub Actions" |
107 | | -3. Push to `source` branch to trigger deployment |
| 106 | +### ✏️ Content Management |
108 | 107 |
|
109 | | -The workflow is defined in `.github/workflows/deploy.yml`. |
| 108 | +Content lives in `src/content/` as Markdown files with typed frontmatter. Schemas are defined in `src/content.config.ts`. |
110 | 109 |
|
111 | | -## Styling |
| 110 | +To update content, edit the Markdown files under the relevant collection directory and changes will reflect immediately in dev mode. |
112 | 111 |
|
113 | | -Uses vanilla CSS with CSS Custom Properties for: |
114 | | -- Zero build dependencies for styles |
115 | | -- Future-proof CSS that works forever |
116 | | -- Easy theme customization via CSS variables |
117 | | -- Responsive design with standard media queries |
| 112 | +## 🌐 Deployment |
118 | 113 |
|
119 | | -Theme variables are defined in `src/styles/theme.css`: |
120 | | -```css |
121 | | -:root { |
122 | | - --font-playfair: "Playfair Display", serif; |
123 | | - --color-primary: #c38352; |
124 | | - --color-secondary: #71a7b2; |
125 | | - /* ... */ |
126 | | -} |
127 | | -``` |
128 | | - |
129 | | -## Browser Support |
| 114 | +Pushes to the `source` branch trigger a GitHub Actions workflow that builds and deploys to GitHub Pages. |
130 | 115 |
|
131 | | -- Chrome/Edge (last 2 versions) |
132 | | -- Firefox (last 2 versions) |
133 | | -- Safari (last 2 versions) |
134 | | -- Mobile browsers (iOS Safari, Chrome Mobile) |
| 116 | +To set up: |
135 | 117 |
|
136 | | -## Performance |
| 118 | +1. Go to repository **Settings** → **Pages** |
| 119 | +2. Set Source to **GitHub Actions** |
| 120 | +3. Add `PUBLIC_SITE_PASSWORD` as a repository secret (if using the password gate) |
137 | 121 |
|
138 | | -- Lighthouse scores: 95+ performance, 100 accessibility/best-practices/SEO |
139 | | -- Minimal JavaScript (< 150KB total, mostly React islands) |
140 | | -- Optimized images with responsive srcsets |
141 | | -- Fast initial page load with static HTML |
142 | | - |
143 | | -## License |
| 122 | +## 📝 License |
144 | 123 |
|
145 | 124 | MIT |
146 | | - |
147 | | -## Contact |
148 | | - |
149 | | -- Email: sofialcfsilva@gmail.com |
150 | | -- GitHub: [@literallysofia](https://github.com/literallysofia) |
151 | | -- LinkedIn: [sofialcfsilva](https://www.linkedin.com/in/sofialcfsilva) |
152 | | - |
153 | | ---- |
154 | | - |
155 | | -Built with [Astro](https://astro.build) and ❤️ |
0 commit comments