Personal portfolio and technical blog for Nilushan Silva, built with Astro, React, TypeScript, Tailwind CSS, and DaisyUI.
- Static portfolio pages with interactive React islands
- Type-safe blog and project content collections
- Multi-theme DaisyUI interface with persisted theme selection
- Mermaid diagrams in MDX content
- RSS feed, sitemap, canonical URLs, Open Graph metadata, and structured data
- Context-aware Gemini chatbot with a client-side fallback
- Firebase Hosting and Cloud Functions deployment
- Astro 5 in server mode with static page prerendering
- React 19 for interactive components
- TypeScript with strict checking and the
@/*path alias - Tailwind CSS 4 and DaisyUI 5
- MDX content collections
- Firebase Hosting and Cloud Functions (Node.js 22)
- pnpm 10
- Node.js 22 recommended (CI and Firebase Functions use Node.js 22)
- pnpm 10.11 or newer
- Firebase CLI only when deploying manually
pnpm install
cp .env.example .env.local
pnpm devThe development server is available at http://localhost:4321 by default.
The chatbot uses built-in portfolio answers when its API is unavailable. To enable Gemini responses locally, set GEMINI_API_KEY in .env.local.
pnpm dev # Start the development server
pnpm build # Create the production build
pnpm preview # Preview the production build
pnpm astro # Run Astro CLI commandsThere is currently no dedicated test or lint script. Use pnpm build as the baseline validation command.
src/
├── assets/ # Source images and other optimized assets
├── components/ # Astro and interactive React components
├── content/
│ ├── blog/ # Blog posts (MDX)
│ └── projects/ # Project case studies (MDX)
├── data/ # Central portfolio data
├── layouts/ # Shared page layouts
├── lib/ # Utilities, theme management, chatbot context
├── pages/ # Site routes and /api/chat
├── styles/ # Global styles
└── types/ # Shared TypeScript types
functions/ # Firebase Cloud Function wrapper for Astro SSR
docs/ # Project documentation
public/ # Assets copied without processing
- Personal details, skills, and experience:
src/data/portfolio.ts - Blog posts:
src/content/blog/*.mdx - Project case studies:
src/content/projects/*.mdx - Collection schemas:
src/content.config.ts
Production deploys to Firebase when changes are pushed to master. Pull requests from branches in this repository receive a Hosting preview deployment. The /api/** path is routed to the api Cloud Function in Sydney (australia-southeast1).
See Firebase deployment for setup, secrets, manual deployment, and troubleshooting.
Start with the documentation index:
This repository is a personal portfolio. You may use it for inspiration, but do not copy personal content directly.