chore: migrate hosting documentation from Appwrite to self-hosted

Update README.md and astro.config.mjs to reflect the migration from
Appwrite to self-hosted infrastructure. Remove Appwrite-specific
environment variable schema from Astro config. Add .clinerules and
.cline to .gitignore.
This commit is contained in:
spaghet committed 2026-10-15 14:32:15 -04:00
1 parent d86f78fead
commit ac545c4668
53 files changed
+4102 -5110

No files matched your search

+4
View File
@@ -23,3 +23,7 @@ settings.json
# macOS-specific files
.DS_Store
#Cline
.clinerules
.cline
-63
View File
@@ -1,63 +0,0 @@
# Astro Migration Plan
## Overview
This document outlines the steps to upgrade Astro in this project while maintaining all existing functionality, including the Appwrite integration and security practices.
## Current State
- Astro version: 4.5.18
- Project structure is working with secure environment variable handling
- Appwrite integration properly configured with credentials in .env file
- All configuration fixes have been committed to the dev branch
## Migration Steps
### 1. Preparation
- Ensure all local changes are committed to the dev branch
- Create a backup of current working state (already done)
- Verify all tests pass before starting migration
### 2. Update Dependencies
```bash
# Update Astro core package
npm install astro@latest
# Update related packages
npm install @astrojs/mdx@latest
npm install @astrojs/tailwind@latest
npm install @astrojs/solid-js@latest
npm install @astrojs/sitemap@latest
```
### 3. Configuration Updates
- Review `astro.config.mjs` for any deprecated configurations
- Update integrations syntax if needed
- Ensure Tailwind CSS configuration remains compatible
### 4. Environment Variable Handling
- Verify `import.meta.env` usage is still valid
- Confirm Appwrite integration in `src/lib/appwrite.ts` works with new version
- Test that `.env` variables are properly loaded
### 5. Component Testing
- Test Header component with Appwrite images
- Test Footer component with Appwrite images
- Verify all other components still function correctly
### 6. Build and Deployment Verification
- Run `npm run build` to ensure successful compilation
- Test locally with `npm run preview`
- Verify all images load properly from Appwrite storage
## Security Considerations
- All environment variables remain in `.env` file
- No changes to how sensitive credentials are handled
- Migration maintains the same security practices
## Rollback Plan
If issues arise during migration:
1. Revert to previous commit: `git reset --hard HEAD~1`
2. Check that all functionality works as before
3. Investigate specific breaking changes in Astro release notes
## Timeline
Estimated time: 2-4 hours for full migration and testing
+2 -2
View File
@@ -8,7 +8,7 @@ My website follows a robust deployment workflow:
1. **Development**: I develop content and code locally using Gitea as my Git hosting solution
2. **Auto-push**: Changes are automatically pushed from Gitea to GitHub via configured webhooks
3. **Hosting**: The site is hosted on Appwrite, which provides a scalable and secure hosting environment
3. **Hosting**: The site is hosted on self-hosted infrastructure, which provides a scalable and secure hosting environment
4. **Delivery**: NGINX reverse proxy handles routing and serves content with optimal performance
This pipeline ensures that my website is always up-to-date with the latest changes while leveraging modern hosting technologies.
@@ -27,7 +27,7 @@ This website is built using Astro with the following key components:
- **Framework**: Astro (Static site generation)
- **Styling**: Tailwind CSS
- **TypeScript**: Type-safe development
- **Deployment**: Gitea → GitHub → Appwrite → NGINX reverse proxy
- **Deployment**: Gitea → GitHub → Self-hosted infrastructure → NGINX reverse proxy
## Getting Started
+2 -22
View File
@@ -1,4 +1,4 @@
import { defineConfig, envField } from "astro/config"
import { defineConfig } from "astro/config"
import mdx from "@astrojs/mdx"
import sitemap from "@astrojs/sitemap"
import tailwind from "@astrojs/tailwind"
@@ -10,25 +10,5 @@ export default defineConfig({
site: "https://spaghet.io",
integrations: [mdx(), sitemap(), solidJs(), tailwind({ applyBaseStyles: false })],
output: "server",
adapter: node({ mode: "ssr" }),
env: {
schema: {
VITE_APPWRITE_ENDPOINT: envField.string({ context: "server", access: "public" }),
VITE_APPWRITE_PROJECT_ID: envField.string({ context: "server", access: "public" }),
VITE_APPWRITE_BUCKET_ID: envField.string({ context: "server", access: "public" }),
VITE_APPWRITE_DATABASE_ID: envField.string({ context: "server", access: "public" }),
VITE_APPWRITE_BLOG_COLLECTION_ID: envField.string({ context: "server", access: "public" }),
VITE_APPWRITE_PROJECTS_COLLECTION_ID: envField.string({ context: "server", access: "public" }),
VITE_APPWRITE_WORK_COLLECTION_ID: envField.string({ context: "server", access: "public" }),
VITE_APPWRITE_LEGAL_COLLECTION_ID: envField.string({ context: "server", access: "public" }),
PUBLIC_APPWRITE_ENDPOINT: envField.string({ context: "client", access: "public" }),
PUBLIC_APPWRITE_PROJECT_ID: envField.string({ context: "client", access: "public" }),
PUBLIC_APPWRITE_BUCKET_ID: envField.string({ context: "client", access: "public" }),
PUBLIC_APPWRITE_DATABASE_ID: envField.string({ context: "client", access: "public" }),
PUBLIC_APPWRITE_BLOG_COLLECTION_ID: envField.string({ context: "client", access: "public" }),
PUBLIC_APPWRITE_PROJECTS_COLLECTION_ID: envField.string({ context: "client", access: "public" }),
PUBLIC_APPWRITE_WORK_COLLECTION_ID: envField.string({ context: "client", access: "public" }),
PUBLIC_APPWRITE_LEGAL_COLLECTION_ID: envField.string({ context: "client", access: "public" }),
}
}
adapter: node({ mode: "ssr" })
})
-107
View File
@@ -1,107 +0,0 @@
# Implementation Plan for Spaghet.io Website
## 1. Layout Files Fix (astro:content to Appwrite Data Types)
**Issue:** Astro layout files are using `astro:content` types instead of Appwrite data types causing "entry" attribute errors.
## 2. Dark Mode Styling Improvements
**Issues:**
- Spaghetti theme is too hard to read in dark mode
- Inconsistent text colors across components and layouts
- Border on hero image is too light
## 3. Search Function Enhancement (Appwrite SDK Integration)
**Status: Partially Complete**
The search component has already been updated to use Appwrite data instead of Fuse.js client-side search, but needs refinement to properly utilize Appwrite's querying capabilities.
## 4. Pagination Implementation for Blogs and Projects Pages
**Requirements:**
- Implement pagination on both blog and projects pages
- Allow variable item counts (10, 20, 50 items per page)
- Use Appwrite SDK with offset/limit parameters
- Maintain existing filtering functionality
## 5. Technical Implementation Details
### A. Layout Files Fix Strategy
1. **Update `src/layouts/ArticleBottomLayout.astro`**:
- Change from `CollectionEntry<"blog"> | CollectionEntry<"projects">` to Appwrite data types
- Ensure compatibility with Appwrite document structure
- Fix the entry attribute errors
### B. Dark Mode Improvements
1. **Enhance `src/styles/global.css`**:
- Improve text color contrast for dark mode readability
- Adjust border colors for better visibility
- Create consistent styling across all components
### C. Search Function Enhancement
1. **Refine `src/components/Search.tsx`**:
- Implement proper Appwrite SDK search queries
- Add server-side filtering instead of client-side
- Maintain existing UI functionality
### D. Pagination Implementation Strategy
1. **Modify `src/pages/blog/index.astro`**:
- Add pagination parameters (page, limit)
- Implement Appwrite SDK with offset/limit queries
- Create pagination controls with 10/20/50 item options
- Maintain existing tag filtering
2. **Modify `src/pages/projects/index.astro`**:
- Apply same pagination approach as blog page
- Ensure consistent UI/UX between both pages
3. **Update Appwrite Service Functions**:
- Add pagination support to getBlogPosts and getProjects functions
- Implement proper offset/limit parameter handling
## 6. Implementation Steps Timeline
### Phase 1: Layout Files Fix
- [ ] Update ArticleBottomLayout.astro to use Appwrite data types
- [ ] Update ArticleTopLayout.astro to use Appwrite data types
- [ ] Ensure all layout components are compatible with Appwrite data structure
- [ ] Remove all uses and references to astro:content. No longer using astro content.
### Phase 2: Dark Mode Improvements
- [ ] Improve text color contrast in global.css
- [ ] Adjust border colors for better visibility
- [ ] Test dark mode readability across all components
### Phase 3: Search Function Enhancement
- [ ] Implement proper Appwrite SDK search functionality
- [ ] Remove client-side filtering where possible
- [ ] Ensure search works with Appwrite data types
### Phase 4: Pagination Implementation (Blog & Projects Pages)
- [ ] Modify blog/index.astro to add pagination support
- [ ] Modify projects/index.astro to add pagination support
- [ ] Update appwrite-service.ts with pagination functions
- [ ] Implement page navigation controls
## 7. Technical Considerations
1. **Appwrite Query Parameters**: Use `offset` and `limit` for pagination
2. **Type Safety**: Maintain proper TypeScript types throughout
3. **Performance**: Optimize queries to minimize API calls
4. **User Experience**: Ensure smooth pagination transitions
5. **Backward Compatibility**: Maintain existing functionality while adding new features
## 8. Files to Modify
1. `src/layouts/ArticleBottomLayout.astro` - Fix data type issues
2. `src/layouts/ArticleTopLayout.astro` - Fix data type issues
3. `src/styles/global.css` - Improve dark mode styling
4. `src/components/Search.tsx` - Enhance search functionality
5. `src/pages/blog/index.astro` - Add pagination support
6. `src/pages/projects/index.astro` - Add pagination support
7. `src/lib/appwrite-service.ts` - Add pagination functions
## 9. Testing Requirements
- Verify pagination works correctly with 10/20/50 items
- Test all filtering and sorting functionality
- Ensure dark mode readability is improved
- Validate that search returns correct Appwrite data
- Confirm layout files work with Appwrite data types
+3024 -4050
View File
File diff suppressed because it is too large. Load diff
+13 -13
View File
@@ -14,16 +14,16 @@
"lint:fix": "eslint . --fix"
},
"dependencies": {
"@astrojs/check": "^0.5.6",
"@astrojs/mdx": "^4.3.3",
"@astrojs/node": "^9.4.1",
"@astrojs/rss": "^4.0.5",
"@astrojs/sitemap": "^3.5.0",
"@astrojs/solid-js": "^5.1.0",
"@astrojs/check": "^0.9.10",
"@astrojs/mdx": "^8.0.3",
"@astrojs/node": "^11.1.7",
"@astrojs/rss": "^4.0.19",
"@astrojs/sitemap": "^3.7.4",
"@astrojs/solid-js": "^7.0.2",
"@astrojs/tailwind": "^6.0.2",
"@solidjs/testing-library": "^0.8.10",
"@tailwindcss/typography": "^0.5.10",
"astro": "^5.13.0",
"astro": "^7.3.8",
"clsx": "^2.1.0",
"fuse.js": "^7.0.0",
"notenv": "^2.0.3",
@@ -31,16 +31,16 @@
"rehype-stringify": "^10.0.1",
"remark": "^15.0.1",
"remark-rehype": "^11.1.2",
"sharp": "^0.33.2",
"sharp": "^0.35.5",
"solid-js": "^1.8.15",
"tailwind-merge": "^2.2.1",
"tailwindcss": "^3.4.1",
"tailwind-merge": "^3.7.0",
"tailwindcss": "^3.4.19",
"ts-node": "^10.9.2",
"typescript": "^5.3.3",
"vitest": "^3.2.4"
"typescript": "^6.0.3",
"vite": "^8.3.4",
"vitest": "^5.0.4"
},
"devDependencies": {
"appwrite": "^18.2.0",
"dotenv-cli": "^10.0.0"
}
}
+8 -4
View File
@@ -1,5 +1,9 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<image width="36" height="36" xlink:href="data:image/png;base64,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 truncated
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 128 128">
<path d="M50.4 78.5a75.1 75.1 0 0 0-28.5 6.9l24.2-65.7c.7-2 1.9-3.2 3.4-3.2h29c1.5 0 2.7 1.2 3.4 3.2l24.2 65.7s-11.6-7-28.5-7L67 45.5c-.4-1.7-1.6-2.8-2.9-2.8-1.3 0-2.5 1.1-2.9 2.7L50.4 78.5Zm-1.1 28.2Zm-4.2-20.2c-2 6.6-.6 15.8 4.2 20.2a17.5 17.5 0 0 1 .2-.7 5.5 5.5 0 0 1 5.7-4.5c2.8.1 4.3 1.5 4.7 4.7.2 1.1.2 2.3.2 3.5v.4c0 2.7.7 5.2 2.2 7.4a13 13 0 0 0 5.7 4.9v-.3l-.2-.3c-1.8-5.6-.5-9.5 4.4-12.8l1.5-1a73 73 0 0 0 3.2-2.2 16 16 0 0 0 6.8-11.4c.3-2 .1-4-.6-6l-.8.6-1.6 1a37 37 0 0 1-22.4 2.7c-5-.7-9.7-2-13.2-6.2Z" />
<style>
path { fill: #000; }
@media (prefers-color-scheme: dark) {
path { fill: #FFF; }
}
</style>
</svg>

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 749 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 586 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

-2
View File
@@ -24,7 +24,5 @@
<path fill="#6366f1" d="M23.5 6.5C17.5 6.5 13.75 9.5 12.25 15.5C14.5 12.5 17.125 11.375 20.125 12.125C21.8367 12.5529 23.0601 13.7947 24.4142 15.1692C26.6202 17.4084 29.1734 20 34.75 20C40.75 20 44.5 17 46 11C43.75 14 41.125 15.125 38.125 14.375C36.4133 13.9471 35.1899 12.7053 33.8357 11.3308C31.6297 9.09158 29.0766 6.5 23.5 6.5ZM12.25 20C6.25 20 2.5 23 1 29C3.25 26 5.875 24.875 8.875 25.625C10.5867 26.0529 11.8101 27.2947 13.1642 28.6693C15.3702 30.9084 17.9234 33.5 23.5 33.5C29.5 33.5 33.25 30.5 34.75 24.5C32.5 27.5 29.875 28.625 26.875 27.875C25.1633 27.4471 23.9399 26.2053 22.5858 24.8307C20.3798 22.5916 17.8266 20 12.25 20Z"/>
</symbol>
<!-- appwrite icon-->
<symbol id="simple-icons--appwrite" viewBox="0 0 24 24"><path fill="currentColor" d="M24 17.291v5.29H10.557A10.58 10.58 0 0 1 0 12.715v-1.43c.048-.735.174-1.463.374-2.171C1.63 4.673 5.713 1.419 10.557 1.419s8.927 3.254 10.183 7.695h-5.749a5.28 5.28 0 0 0-4.434-2.404a5.28 5.28 0 0 0-4.434 2.404A5.23 5.23 0 0 0 5.267 12a5.27 5.27 0 0 0 1.66 3.848a5.27 5.27 0 0 0 3.63 1.443zm0-6.734v5.291h-9.813A5.28 5.28 0 0 0 15.848 12c0-.5-.07-.984-.199-1.443z"/></symbol>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

+10 -9
View File
@@ -1,5 +1,5 @@
import { formatDate } from "@lib/utils"
import type { BlogPost, Project } from "@lib/appwrite-service"
import type { BlogPost, Project } from "@lib/types"
type Props = {
entry: BlogPost | Project | any
@@ -8,35 +8,36 @@ type Props = {
}
export default function ArrowCard({entry, pill, collection}: Props) {
const id = entry.id || entry.$id
return (
<a href={`/${collection === 'blog' ? 'blog' : 'projects'}/${entry.$id}`} class="group p-4 gap-3 flex items-center border border-spaghetti-brown rounded-lg hover:bg-spaghetti-red/5 hover:dark:bg-spaghetti-cream/10 dark:border-spaghetti-cream/20 transition-colors duration-300 ease-in-out">
<div class="w-full group-hover:text-spaghetti-red group-hover:dark:text-spaghetti-cream blend">
<a href={`/${collection === 'blog' ? 'blog' : 'projects'}/${id}`} class="group p-4 gap-3 flex items-center border border-spaghetti-brown rounded-lg hover:bg-spaghetti-red/5 hover:dark:bg-spaghetti-cream/10 dark:border-spaghetti-dark-cream/20 transition-colors duration-300 ease-in-out">
<div class="w-full group-hover:text-spaghetti-red group-hover:dark:text-spaghetti-dark-cream blend">
<div class="flex flex-wrap items-center gap-2">
{pill &&
<div class="text-sm capitalize px-2 py-0.5 rounded-full border border-black/15 dark:border-spaghetti-cream/20 bg-spaghetti-yellow/20 dark:bg-spaghetti-yellow/20 dark:text-spaghetti-cream">
<div class="text-sm capitalize px-2 py-0.5 rounded-full border border-black/15 dark:border-spaghetti-dark-cream/20 bg-spaghetti-yellow/20 dark:bg-spaghetti-yellow/20 dark:text-spaghetti-dark-cream">
{collection === "blog" ? "post" : "project"}
</div>
}
<div class="text-sm uppercase text-spaghetti-brown dark:text-spaghetti-yellow">
<div class="text-sm uppercase text-spaghetti-brown dark:text-spaghetti-dark-yellow">
{formatDate(entry.date)}
</div>
</div>
<div class="font-semibold mt-3 text-spaghetti-brown/80 dark:text-spaghetti-cream">
<div class="font-semibold mt-3 text-spaghetti-brown/80 dark:text-spaghetti-dark-cream">
{entry.title}
</div>
<div class="text-sm line-clamp-2 text-spaghetti-brown/80 dark:text-spaghetti-cream">
<div class="text-sm line-clamp-2 text-spaghetti-brown/80 dark:text-spaghetti-dark-cream">
{entry.summary}
</div>
<ul class="flex flex-wrap mt-2 gap-1">
{entry.tags.map((tag:string) => (
<li class="text-xs uppercase py-0.5 px-1 rounded bg-spaghetti-yellow/20 dark:bg-spaghetti-yellow/20 text-spaghetti-brown/80 dark:text-spaghetti-yellow">
<li class="text-xs uppercase py-0.5 px-1 rounded bg-spaghetti-yellow/20 dark:bg-spaghetti-yellow/20 text-spaghetti-brown/80 dark:text-spaghetti-dark-yellow">
{tag}
</li>
))}
</ul>
</div>
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" class="stroke-current group-hover:stroke-black group-hover:dark:stroke-spaghetti-yellow">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" class="stroke-current group-hover:stroke-black group-hover:dark:stroke-spaghetti-dark-yellow">
<line x1="5" y1="12" x2="19" y2="12" class="scale-x-0 group-hover:scale-x-100 translate-x-4 group-hover:translate-x-1 transition-all duration-300 ease-in-out" />
<polyline points="12 5 19 12 12 19" class="translate-x-0 group-hover:translate-x-1 transition-all duration-300 ease-in-out" />
</svg>
+4 -4
View File
@@ -1,11 +1,11 @@
import type { BlogPost } from "@lib/appwrite-service"
import type { BlogPost } from "@lib/types"
import { createEffect, createSignal, For } from "solid-js"
import ArrowCard from "@components/ArrowCard"
import { cn } from "@lib/utils"
type Props = {
tags: string[]
data: BlogPost[] // Using Appwrite data instead of Astro content collections
data: BlogPost[]
}
export default function Blog({ data, tags }: Props) {
@@ -38,7 +38,7 @@ export default function Blog({ data, tags }: Props) {
<div class="grid grid-cols-1 sm:grid-cols-3 gap-6">
<div class="col-span-3 sm:col-span-1">
<div class="sticky top-24">
<div class="text-sm font-semibold uppercase mb-2 text-spaghetti-brown/80 dark:text-spaghetti-cream">Filter</div>
<div class="text-sm font-semibold uppercase mb-2 text-spaghetti-brown/80 dark:text-spaghetti-dark-cream">Filter</div>
{/* Tag Filter */}
<div class="mb-2">
<div class="text-xs uppercase mb-1 text-spaghetti-brown/70">Tags</div>
@@ -46,7 +46,7 @@ export default function Blog({ data, tags }: Props) {
<For each={tags}>
{(tag) => (
<li>
<button onClick={() => toggleTag(tag)} class={cn("w-full px-2 py-1 rounded", "whitespace-nowrap overflow-hidden overflow-ellipsis", "flex gap-2 items-center", "bg-spaghetti-yellow/20 dark:bg-spaghetti-yellow/20", "hover:bg-spaghetti-yellow/30 hover:dark:bg-spaghetti-yellow/30", "transition-colors duration-300 ease-in-out", filter().has(tag) && "text-spaghetti-brown/80 dark:text-spaghetti-brown")}>
<button onClick={() => toggleTag(tag)} class={cn("w-full px-2 py-1 rounded", "whitespace-nowrap overflow-hidden overflow-ellipsis", "flex gap-2 items-center", "bg-spaghetti-yellow/20 dark:bg-spaghetti-yellow/20", "hover:bg-spaghetti-yellow/30 hover:dark:bg-spaghetti-yellow/30", "transition-colors duration-300 ease-in-out", filter().has(tag) && "text-spaghetti-brown/80 dark:text-spaghetti-dark-cream")}>
<svg class={cn("size-5 fill-spaghetti-brown/50 dark:fill-spaghetti-brown/50", "transition-colors duration-300 ease-in-out", filter().has(tag) && "fill-spaghetti-brown dark:fill-spaghetti-brown")}>
<use href={`/ui.svg#square`} class={cn(!filter().has(tag) ? "block" : "hidden")} />
<use href={`/ui.svg#square-check`} class={cn(filter().has(tag) ? "block" : "hidden")} />
+3 -3
View File
@@ -27,7 +27,7 @@ import Container from "@components/Container.astro"
<div class="grid grid-cols-1 sm:grid-cols-2 gap-3">
<div class="flex flex-col items-center sm:items-start">
<a href="/" class="flex gap-1 w-fit font-semibold text-current hover:text-black dark:hover:text-white transition-colors duration-300 ease-in-out">
<img src="/api/assets/689d265e0036955a618d" alt="Logo" class="size-6" />
<img src="/images/logo.png" alt="Logo" class="size-6" />
{SITE.TITLE}
</a>
</div>
@@ -47,10 +47,10 @@ import Container from "@components/Container.astro"
<div class="h-full grid grid-cols-1 sm:grid-cols-2 gap-3">
<div class="order-2 sm:order-1 flex flex-col items-center justify-center sm:items-start">
<div class="legal">
<a href="/legal/terms" class="text-spaghetti-red hover:text-spaghetti-brown dark:hover:text-spaghetti-brown transition-colors duration-300 ease-in-out">
<a href="/legal/terms-of-service" class="text-spaghetti-red hover:text-spaghetti-brown dark:hover:text-spaghetti-brown transition-colors duration-300 ease-in-out">
Terms
</a> |
<a href="/legal/privacy" class="text-spaghetti-red hover:text-spaghetti-brown dark:hover:text-spaghetti-brown transition-colors duration-300 ease-in-out">
<a href="/legal/privacy-policy" class="text-spaghetti-red hover:text-spaghetti-brown dark:hover:text-spaghetti-brown transition-colors duration-300 ease-in-out">
Privacy
</a>
</div>
+1 -1
View File
@@ -11,7 +11,7 @@ import Container from "@components/Container.astro"
<div class="relative h-full w-full">
<div class="absolute left-0 top-1/2 -translate-y-1/2 flex gap-1 font-semibold">
<a href="/" class="flex gap-1 text-current hover:text-spaghetti-brown dark:hover:text-spaghetti-brown transition-colors duration-300 ease-in-out">
<img src='/api/assets/689d265e0036955a618d' alt="Logo" class="size-6" />
<img src='/images/logo.png' alt="Logo" class="size-6" />
<div>
{SITE.TITLE}
</div>
+3 -3
View File
@@ -1,4 +1,4 @@
import type { Project } from "@lib/appwrite-service"
import type { Project } from "@lib/types"
import { createEffect, createSignal, For } from "solid-js"
import ArrowCard from "@components/ArrowCard"
import { cn } from "@lib/utils"
@@ -35,12 +35,12 @@ export default function Projects({ data, tags }: Props) {
<div class="grid grid-cols-1 sm:grid-cols-3 gap-6">
<div class="col-span-3 sm:col-span-1">
<div class="sticky top-24">
<div class="text-sm font-semibold uppercase mb-2 text-spaghetti-brown">Filter</div>
<div class="text-sm font-semibold uppercase mb-2 text-spaghetti-brown dark:text-spaghetti-dark-cream">Filter</div>
<ul class="flex flex-wrap sm:flex-col gap-1.5">
<For each={tags}>
{(tag) => (
<li>
<button onClick={() => toggleTag(tag)} class={cn("w-full px-2 py-1 rounded", "whitespace-nowrap overflow-hidden overflow-ellipsis", "flex gap-2 items-center", "bg-spaghetti-yellow/20 dark:bg-spaghetti-yellow/20", "hover:bg-spaghetti-yellow/30 hover:dark:bg-spaghetti-yellow/30", "transition-colors duration-300 ease-in-out", filter().has(tag) && "text-spaghetti-brown dark:text-spaghetti-brown")}>
<button onClick={() => toggleTag(tag)} class={cn("w-full px-2 py-1 rounded", "whitespace-nowrap overflow-hidden overflow-ellipsis", "flex gap-2 items-center", "bg-spaghetti-yellow/20 dark:bg-spaghetti-yellow/20", "hover:bg-spaghetti-yellow/30 hover:dark:bg-spaghetti-yellow/30", "transition-colors duration-300 ease-in-out", filter().has(tag) && "text-spaghetti-brown dark:text-spaghetti-dark-cream")}>
<svg class={cn("size-5 fill-spaghetti-brown/50 dark:fill-spaghetti-brown/50", "transition-colors duration-300 ease-in-out", filter().has(tag) && "fill-spaghetti-brown dark:fill-spaghetti-brown")}>
<use href={`/ui.svg#square`} class={cn(!filter().has(tag) ? "block" : "hidden")} />
<use href={`/ui.svg#square-check`} class={cn(filter().has(tag) ? "block" : "hidden")} />
+20 -12
View File
@@ -1,10 +1,11 @@
import type { BlogPost, Project } from "@lib/appwrite-service"
import type { BlogPost, Project } from "@lib/types"
import { createEffect, createSignal, onCleanup } from "solid-js"
import ArrowCard from "@components/ArrowCard"
import { searchContent } from "@lib/appwrite-service"
type Props = {
query?: string
posts?: BlogPost[]
projects?: Project[]
}
export default function Search(props: Props) {
@@ -16,7 +17,7 @@ export default function Search(props: Props) {
// Debounce timeout reference
let debounceTimeout: NodeJS.Timeout | null = null
// Use Appwrite SDK to search all data with debouncing
// Client-side search through provided data
createEffect(() => {
if (query().length < 2) {
setResults({ posts: [], projects: [] })
@@ -32,20 +33,27 @@ export default function Search(props: Props) {
// Set new debounce timeout
debounceTimeout = setTimeout(() => {
setLoading(true)
searchContent(query())
.then(searchResults => {
setResults(searchResults)
try {
const q = query().toLowerCase()
const filteredPosts = (props.posts || []).filter(post =>
post.title.toLowerCase().includes(q) ||
post.summary.toLowerCase().includes(q) ||
post.tags.some(tag => tag.toLowerCase().includes(q))
)
const filteredProjects = (props.projects || []).filter(project =>
project.title.toLowerCase().includes(q) ||
project.summary.toLowerCase().includes(q) ||
project.tags.some(tag => tag.toLowerCase().includes(q))
)
setResults({ posts: filteredPosts, projects: filteredProjects })
setError(null)
})
.catch(err => {
} catch (err) {
console.error("Search error:", err)
// Handle error gracefully - maybe show an error message to user
setResults({ posts: [], projects: [] })
setError("Search failed. Please try again.")
})
.finally(() => {
} finally {
setLoading(false)
})
}
}, 300) // 300ms debounce delay
})
+48
View File
@@ -0,0 +1,48 @@
import { defineCollection, z } from "astro:content"
import { glob } from "astro/loaders"
const blog = defineCollection({
loader: glob({ pattern: "**/*.md", base: "./src/content/blog" }),
schema: z.object({
title: z.string(),
summary: z.string(),
date: z.date(),
tags: z.array(z.string()),
draft: z.boolean().default(false),
template: z.string().default("default"),
featured: z.boolean().default(false),
}),
})
const projects = defineCollection({
loader: glob({ pattern: "**/*.md", base: "./src/content/projects" }),
schema: z.object({
title: z.string(),
summary: z.string(),
date: z.date(),
tags: z.array(z.string()),
draft: z.boolean().default(false),
demoUrl: z.string().optional(),
repoUrl: z.string().optional(),
}),
})
const work = defineCollection({
loader: glob({ pattern: "**/*.md", base: "./src/content/work" }),
schema: z.object({
company: z.string(),
role: z.string(),
dateStart: z.date(),
dateEnd: z.date(),
}),
})
const legal = defineCollection({
loader: glob({ pattern: "**/*.md", base: "./src/content/legal" }),
schema: z.object({
title: z.string(),
date: z.date(),
}),
})
export const collections = { blog, projects, work, legal }
@@ -0,0 +1,76 @@
---
title: "Building My Personal Website: From Idea to Deployment"
summary: "A journey through creating my personal portfolio site, from initial concept to deployment."
date: 2025-08-12
tags: ["Tutorial", "Astro", "Portfolio", "Hosting", "Docker", "Website"]
draft: false
template: "default"
featured: false
---
As someone who loves spaghetti and all things tech, I've always been fascinated by the perfect balance of structure and creativity. When it came time to create my personal website, I wanted to build something that reflected both my passion for technology and my love for well-organized systems.
## The Concept
I decided to use Astro as the foundation for my portfolio site because of its excellent performance and flexibility. The idea was to create a modern, responsive website that showcases my work and projects while demonstrating my technical skills through the implementation itself.
The site needed to be:
- Fast and performant
- Responsive across all devices
- Easy to maintain and update
- A reflection of my technical expertise
## Development Process
I started by setting up the basic structure using Astro's capabilities. The site features:
- A clean, modern design with dark/light mode support
- Smooth animations and transitions for enhanced user experience
- Integrated blog section for technical articles
- Project showcase with detailed descriptions
- Contact form with email integration
- SEO optimization for better search engine visibility
## Deployment Strategy
This is where things get interesting. As someone running 2 Unraid servers with powerful hardware configurations (128GB RAM, 2 x E5 Xeon CPU, 200TB raw storage on NetApp arrays), I wanted to leverage my existing infrastructure for hosting this personal website.
### My Hosting Setup
I'm planning to host this site on my self-hosted infrastructure, which is part of my comprehensive Docker container ecosystem. The setup includes:
- A robust Docker infrastructure supporting PostgreSQL, MariaDB, MySQL, MongoDB, Redis, and Minio
## Deployment Challenges
While setting up the deployment, I've been working through some configuration challenges. Getting the infrastructure to behave properly has been a learning experience, but also a great opportunity to dive deep into the platform's capabilities.
The process has involved:
- Understanding the API structure
- Configuring proper database connections
- Setting up authentication and user management
- Ensuring proper security configurations
## Technical Details
The site leverages modern web development practices including:
- Component-based architecture with React
- Responsive design principles using Tailwind CSS
- Performance optimization techniques
- Integration with my existing Docker ecosystem
## Why This Approach?
I chose this approach because it reflects how I think about technology - structured, well-organized, and efficient. Just like a perfect bowl of spaghetti, everything has its place and works together seamlessly.
The experience of building and deploying this site has been both challenging and rewarding, showcasing my ability to work with complex systems while maintaining a clear focus on the end-user experience.
## Looking Forward
As I continue to develop this site, I plan to:
- Add more technical articles about my Docker setups and infrastructure
- Expand the blog section with detailed tutorials
- Continue refining the user experience based on feedback
- Document my journey of getting the deployment infrastructure to work properly
This project represents not just a portfolio, but also a demonstration of my approach to technology - structured yet creative, efficient yet elegant.
@@ -0,0 +1,121 @@
---
title: "Spaghet.io Website Improvements: A Comprehensive UI/UX Overhaul"
summary: "Detailed summary of all the UI/UX improvements made to the Spaghet.io website, including dark mode fixes, theme enhancements, and component updates."
date: 2025-08-13
tags: ["website", "ui", "ux", "improvements", "spaghetti"]
draft: false
template: "default"
featured: false
---
## Introduction
This post documents a comprehensive UI/UX overhaul of my personal website, Spaghet.io. The changes were focused on improving visual consistency, fixing dark mode conflicts, and enhancing the overall user experience while maintaining our signature spaghetti-themed aesthetic.
## Goal of This Session
The primary objective was to enhance the website's visual design by:
- Resolving dark mode conflicts with prose elements
- Ensuring consistent theme application across all components
- Fixing text color issues in selected menu items and buttons
- Making sure the spaghetti theme is consistently applied throughout the site
## Key Improvements Made
### 1. Fixed Dark Mode Conflicts with tw-prose Classes
**Problem:** The website had conflicts where prose elements (blog content) were not respecting our custom theme colors in dark mode, resulting in poor readability.
**Solution:** Updated tailwind.config.mjs to properly customize typography styles. Added CSS overrides in global.css to ensure spaghetti-themed colors are applied consistently in prose elements.
### 2. Enhanced Theme Consistency Across Components
**Problem:** Various components had inconsistent color usage, particularly in text and hover states.
**Solution:** Updated Header component to use proper text-spaghetti-brown colors for hover states. Fixed Footer component with consistent text-spaghetti-brown colors for legal links. Applied consistent theme classes throughout ArrowCard, Blog, Projects, StackCard, Search, Counter, and Drawer components.
### 3. Implemented Spaghetti-Themed Color Palette
**Color Scheme:**
- Main color: #FDE68A (spaghetti-yellow)
- Accent color: #FECACA (spaghetti-red)
- Background: #FEF3C7 (spaghetti-cream)
- Text: #78350F (spaghetti-brown)
### 4. Fixed Selected Menu Items and Buttons
**Problem:** Selected menu items and buttons had light red backgrounds with white text, which was inconsistent with our theme.
**Solution:** Updated Header navigation items to use text-spaghetti-brown instead of text-white for selected states. Updated Drawer navigation items to use text-spaghetti-brown instead of text-white for selected states. Updated Search button in header to use text-spaghetti-brown instead of text-white for selected states. Updated mobile drawer button to use text-spaghetti-brown instead of text-white for selected states.
### 5. Enhanced Hero Section with Spaghetti Theme
**Improvements:** Applied consistent text-spaghetti-brown colors throughout the hero section. Styled call-to-action buttons with spaghetti-red background and spaghetti-yellow borders. Maintained consistent theme application throughout the entire hero section.
## Technical Implementation Details
### CSS Customizations
The following changes were made to src/styles/global.css:
```css
/* Override default prose styles to respect our theme */
.prose {
color: var(--spaghetti-brown);
}
.prose a {
color: var(--spaghetti-red);
}
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
color: var(--spaghetti-brown);
}
/* Ensure dark mode respects our theme */
.dark .prose {
color: var(--spaghetti-brown);
}
.dark .prose a {
color: var(--spaghetti-red);
}
```
### Component Updates
All affected components were updated to use:
- text-spaghetti-brown for text content
- bg-spaghetti-red for selected states
- border-spaghetti-yellow/50 for borders
- Consistent hover effects with appropriate color transitions
## Before and After Comparison
### Navigation Menu
- **Before:** Selected items had light red background (bg-spaghetti-red) with white text (text-white)
- **After:** Selected items have light red background (bg-spaghetti-red) with dark brown text (text-spaghetti-brown)
### Prose Elements
- **Before:** Default Tailwind prose styles were overriding our theme colors in dark mode
- **After:** Custom CSS ensures consistent spaghetti-themed colors across all content
### Hero Section
- **Before:** Inconsistent color usage throughout the hero section
- **After:** Cohesive spaghetti theme with consistent text-spaghetti-brown colors for all content
## Future Improvements
While these changes have significantly improved the website's UI/UX, there are always opportunities for further enhancement:
- Implement more sophisticated animations and transitions
- Add more interactive elements with our spaghetti theme
- Continue refining the dark mode experience
- Explore additional theme variations that maintain the spaghetti aesthetic
## Conclusion
These improvements represent a significant step forward in creating a consistent, visually appealing, and user-friendly website that truly embodies the spirit of spaghetti - structured, well-organized, and satisfying to use. The site now maintains a cohesive design language while providing an enhanced user experience across all device sizes and themes.
The changes ensure that our signature spaghetti theme is consistently applied throughout the entire website, from navigation elements to content presentation, creating a unified and memorable user experience.
+45
View File
@@ -0,0 +1,45 @@
---
title: "Privacy Policy"
date: 2025-08-01
---
This Privacy Policy explains how we collect, use, and protect your personal information when you visit our website.
## Information We Collect
We may collect the following types of information:
- **Personal Information**: Name, email address, and other contact details you provide when subscribing to our newsletter or contacting us.
- **Usage Data**: Information about how you use our website, including pages visited, time spent, and click patterns.
- **Device Information**: Details about your device, including browser type, operating system, and IP address.
## How We Use Your Information
We use the information we collect to:
- Provide and improve our website and services
- Respond to your inquiries and requests
- Send you newsletters and updates (with your consent)
- Analyze website usage and performance
- Comply with legal obligations
## Cookies
We use cookies and similar tracking technologies to enhance your experience. You can control cookies through your browser settings.
## Third-Party Services
We may use third-party services that collect information separately. This privacy policy does not apply to those services.
## Your Rights
You have the right to:
- Access your personal information
- Request corrections or updates
- Request deletion of your information
- Opt out of marketing communications
## Contact Us
If you have questions about this privacy policy, please contact us at privacy@spaghet.io.
+38
View File
@@ -0,0 +1,38 @@
---
title: "Terms of Service"
date: 2025-08-01
---
These Terms of Service govern your use of our website and services.
## Acceptance of Terms
By accessing or using our website, you agree to be bound by these Terms of Service.
## Use of Website
You may use our website for personal, non-commercial purposes. You agree not to:
- Modify or copy any part of the website
- Use the website for any unlawful purpose
- Interfere with the proper working of the website
## Content
All content on our website, including text, graphics, and images, is our property and is protected by intellectual property laws.
## Disclaimer
Our website and content are provided "as is" without warranties of any kind. We do not warrant that the website will be error-free or uninterrupted.
## Limitation of Liability
We shall not be liable for any damages arising from your use of our website, including direct, indirect, or consequential damages.
## Changes to Terms
We reserve the right to modify these Terms of Service at any time. Your continued use of the website constitutes acceptance of any changes.
## Contact Us
If you have questions about these terms, please contact us at legal@spaghet.io.
+22
View File
@@ -0,0 +1,22 @@
---
title: "Astro Profile"
summary: "Personal portfolio website built with Astro, React, and Tailwind CSS"
date: 2025-08-01
tags: ["Astro", "React", "Tailwind CSS", "JavaScript", "TypeScript"]
draft: false
demoUrl: "https://spaghet.io"
repoUrl: "https://github.com/spaghetgaming/astro-profile"
---
A modern personal portfolio website showcasing my work, projects, and technical expertise. Built with Astro for optimal performance and SEO, utilizing React components for interactive elements, and styled with Tailwind CSS for responsive design.
Features include:
- Responsive design that works across all device sizes
- Smooth animations and transitions for enhanced user experience
- Clean, modern aesthetic with dark/light mode support
- Integrated blog section for technical articles
- Project showcase with detailed descriptions
- Contact form with email integration
- SEO optimization for better search engine visibility
The site demonstrates my proficiency in modern web development practices and technologies, including component-based architecture, responsive design principles, and performance optimization techniques.
+21
View File
@@ -0,0 +1,21 @@
---
title: "Gitea Implementation"
summary: "Self-hosted Git service with continuous integration capabilities"
date: 2025-08-01
tags: ["Git", "Gitea", "CI/CD", "Docker", "DevOps"]
draft: false
demoUrl: "https://gitea.spaghet.io"
---
Deployment and configuration of Gitea as a self-hosted Git service for version control and continuous integration. This implementation provides a comprehensive solution for managing code repositories, tracking issues, and automating development workflows.
Key features include:
- Repository management with Git-based version control
- Issue tracking and project management tools
- Continuous integration and deployment capabilities
- User authentication and access control
- Integration with Docker containers for easy deployment
- Customizable webhooks and automation scripts
- Backup and disaster recovery procedures
The project demonstrates my expertise in DevOps practices, infrastructure management, and the implementation of self-hosted solutions that provide greater control and security over development processes.
+21
View File
@@ -0,0 +1,21 @@
---
title: "Home System"
summary: "Technology as Lifestyle - Personal Docker ecosystem with 2 Unraid servers"
date: 2025-08-01
tags: ["DevOps", "Docker", "Unraid", "PostgreSQL", "MariaDB", "MySQL", "MongoDB", "Redis", "Minio", "Authentik", "LDAP", "Node-RED"]
draft: false
---
Designed and maintained a scalable Docker container ecosystem supporting PostgreSQL, MariaDB, MySQL, MongoDB, Redis, and Minio for high-availability applications, ensuring robust data storage, caching, and object storage solutions.
Configured and secured authentication frameworks using Authentik, Vaultwarden, and LDAP integration, implementing zero-trust security models and access control for internal and external systems.
Deployed and supported proxy and API gateway solutions to enable secure, scalable, and customizable network infrastructure for internal and external applications.
Provided end-to-end support for 30+ users utilizing the containerized applications, including troubleshooting, configuration guidance, and documentation for tools like Zammad, and Immich.
Streamlined DevOps workflows with Node-RED, custom APIs, and automation scripts, enhancing productivity for both personal and team projects.
Maintained and optimized containerized tools for personal and organizational use, ensuring reliability, performance, and user-friendly interfaces.
Handled on-call duties for critical applications, resolving issues and minimizing downtime for users relying on the containerized ecosystem.
+198
View File
@@ -0,0 +1,198 @@
---
title: "Spaghet.io Website"
summary: "A comprehensive overview of the Spaghet.io personal website, detailing its features, design elements, and technical implementation."
date: 2025-08-13
tags: ["website", "portfolio", "personal", "astro", "spaghetti"]
draft: false
---
## Overview
Spaghet.io is my personal website that showcases my professional work, blog posts, projects, and expertise in technology and innovation. The site embodies my passion for spaghetti, noodles, and all things tech through its design and functionality.
## Key Features
### 1. Responsive Design
The website features a fully responsive design that works seamlessly across:
- Desktop browsers
- Tablets
- Mobile devices
- All screen sizes
### 2. Dark Mode Support
Dual Theme Implementation:
- Light mode with warm, spaghetti-themed colors
- Dark mode with complementary dark theme that maintains visual consistency
- Smooth transitions between themes
- Automatic theme detection based on system preferences
### 3. Spaghetti-Themed Color Palette
**Primary Colors:**
- Spaghetti Yellow: #FDE68A - Used for highlights and interactive elements
- Spaghetti Red: #FECACA - Used for accents and important actions
- Spaghetti Cream: #FEF3C7 - Used for backgrounds and subtle elements
- Spaghetti Brown: #78350F - Used for text content and primary elements
### 4. Interactive UI Components
**Navigation Elements:**
- Fixed header with smooth scrolling
- Mobile-friendly drawer navigation
- Hover effects with color transitions
- Selected state indicators with consistent theme colors
**Content Presentation:**
- Blog post cards with hover animations
- Project showcase with filtering capabilities
- Tag-based organization system
- Responsive tables and lists
### 5. Technical Implementation
**Built With:**
- Astro: Static site generator for optimal performance
- SolidJS: For reactive UI components
- Tailwind CSS: Utility-first CSS framework
- TypeScript: Type safety and enhanced development experience
- Markdown: Content management system
### 6. Performance Optimizations
**Optimizations Implemented:**
- Lazy loading of images and components
- Efficient CSS with minimal bundle size
- Optimized JavaScript with tree-shaking
- Responsive image handling
- Minimal third-party dependencies
## UI Components
### Header & Navigation
- Fixed position header with brand logo
- Desktop navigation with hover effects
- Mobile drawer menu with hamburger icon
- Search functionality
- Theme toggle button
### Hero Section
- Animated background elements
- Welcome message with personal introduction
- Call-to-action buttons styled with spaghetti theme
- Responsive text sizing for all devices
### Blog Section
- Recent posts preview
- Filterable by tags
- Card-based layout with hover effects
- Date formatting and categorization
### Projects Section
- Project showcase with filtering capabilities
- Tag-based organization system
- Responsive grid layout
- Detailed project cards with descriptions
### Footer
- Copyright information with current year
- Legal links (Privacy Policy, Terms of Service)
- Social media integration
- Consistent spaghetti-themed styling
## Design Elements
### Visual Theme
The website maintains a consistent spaghetti theme throughout:
- Warm color scheme that evokes feelings of comfort and satisfaction
- Clean, organized layout that mirrors the structure of good spaghetti
- Subtle animations and transitions for enhanced user experience
- Proper contrast ratios for accessibility
### Typography
- Clear hierarchy with appropriate font weights
- Responsive text sizing
- Consistent spacing and alignment
- Readable fonts optimized for both light and dark modes
### Layout Structure
- Grid-based responsive layout
- Consistent padding and margins
- Visual balance across all sections
- Proper use of white space
## Technical Architecture
### Component Structure
The site uses a modular component architecture:
- Header - Navigation and branding
- Footer - Site information and links
- Blog - Content display with filtering
- Projects - Portfolio showcase
- ArrowCard - Generic card component for content
- StackCard - Technology stack display
- Search - Search functionality
### Theme System
The theme system supports:
- CSS variables for consistent color management
- Dark mode detection and switching
- Theme persistence across sessions
- Smooth transitions between themes
### Content Management
Content is managed through:
- Markdown files for blog posts and projects
- Astro's content collections
- Frontmatter metadata for categorization
- Template-based generation system
## Responsive Features
### Mobile Experience
- Touch-friendly navigation elements
- Optimized touch targets
- Collapsible sections for smaller screens
- Performance optimized for mobile devices
### Tablet Experience
- Adaptive layout adjustments
- Intermediate view sizes
- Maintained usability across screen sizes
### Desktop Experience
- Full-width content presentation
- Advanced hover effects and animations
- Multi-column layouts where appropriate
## Accessibility
The website includes accessibility features:
- Semantic HTML structure
- Proper contrast ratios for text
- Keyboard navigation support
- Screen reader compatibility
- Responsive design for all devices
## Future Enhancements
Potential future improvements include:
- Enhanced animation system with more sophisticated transitions
- Additional interactive elements that reflect the spaghetti theme
- More advanced filtering and search capabilities
- Integration with external APIs for dynamic content
- Expanded multimedia presentation options
- Improved social sharing features
## Conclusion
Spaghet.io represents a cohesive blend of technical excellence and thematic consistency. The site successfully combines modern web technologies with a playful yet professional spaghetti-themed aesthetic to create an engaging user experience that reflects my passion for both technology and culinary arts.
The implementation maintains the structure and organization that makes good spaghetti satisfying to use, while providing an enjoyable browsing experience across all devices and themes.
+22
View File
@@ -0,0 +1,22 @@
---
company: "Spaghet Tech"
role: "Creator"
dateStart: 2023-05-01
dateEnd: 2026-10-14
---
Deep knowledge of ITSM (e.g., INC, PRB, CHG, ESC, etc.), ITOM (e.g., CMDB, ACC, CertDisc, etc.), and ITAM (e.g., SAM, HAM) to position myself as a trusted advisor.
Proven ability to connect with decision-makers in industries (e.g., healthcare, enterprise services) through professional platforms, conferences, or referrals to secure long-term partnerships.
Skilled in translating technical services (e.g., instance data replication, M365 integration) into business value, ensuring alignment with client goals and fostering trust.
Financial acumen to balance market rates, project scope, and client budgets while offering flexible pricing models (e.g., hourly vs. project-based) to secure work.
Hands-on experience with tools like Docker, Kubernetes, and ITSM/ITOM platforms to deliver scalable, secure, and compliant solutions (e.g., Archiving, Certificate Discovery, CMDB steering).
Ability to coordinate cross-functional teams, manage timelines, and ensure successful delivery of complex projects (e.g., Employee Center Migrations, IDR for global instances).
Quick thinking to address challenges like data replication gaps, integration hurdles, or user support needs for 30+ users, while maintaining system reliability.
Strong customer service skills to provide ongoing support, troubleshoot issues, and retain clients (e.g., maintaining 30+ user satisfaction through proactive documentation and on-call maintenance).
@@ -0,0 +1,22 @@
---
company: "Clear Skye"
role: "Technical Architect"
dateStart: 2022-03-01
dateEnd: 2023-05-01
---
Proficient in ServiceNow Identity Governance modules (e.g., IdentityIQ, ClearSkye IGA) for designing, configuring, and optimizing workflows for access management, entitlements, and compliance.
Expertise in AWS, Azure, GCP to build scalable, secure, and compliant identity governance architectures for hybrid/multi-cloud environments.
Experience with REST, SOAP, and middleware tools to integrate ClearSkye IGA with identity providers (SAML, OAuth), HR systems, and enterprise apps for seamless data flow.
Knowledge of GDPR, SOC2, ISO 27001, and NIST frameworks to design secure IGA solutions with access controls, audit trails, and regulatory alignment.
Skilled in automating deployment pipelines, IaC (Terraform, CloudFormation), and monitoring tools (Prometheus) to ensure reliable IGA system updates.
Expertise in designing data privacy frameworks, managing user data lifecycle, and leveraging analytics for risk assessments, entitlement audits, and access insights.
Proven ability to collaborate with IT ops, security teams, and business stakeholders to translate governance requirements into technical solutions.
Ability to resolve complex IGA challenges (e.g., entitlement conflicts, access delays) and adapt architectures to evolving compliance, user, and tech trends.
+18
View File
@@ -0,0 +1,18 @@
---
company: "Neoteric Technologies"
role: "Sr. Cloud Architect"
dateStart: 2021-03-01
dateEnd: 2022-01-01
---
Results-driven technical leader with deep expertise in cloud architecture and infrastructure design.
Extensive experience in designing scalable, secure, and compliant identity governance architectures for hybrid/multi-cloud environments.
Proficient in AWS, Azure, and GCP platforms to build robust cloud solutions.
Skilled in automating deployment pipelines and implementing Infrastructure as Code (IaC) using tools like Terraform and CloudFormation.
Experience with monitoring tools to ensure reliable system updates and performance optimization.
Knowledge of security frameworks and compliance standards to design secure cloud solutions.
@@ -0,0 +1,14 @@
---
company: "Computer Aid, Inc."
role: "Technical Consultant"
dateStart: 2019-07-01
dateEnd: 2021-07-01
---
Technical Consultant for ServiceNow practice with expertise in IT Service Management platforms.
Deep knowledge of ITSM (e.g., INC, PRG, CHG, ESC) and related frameworks to support enterprise clients.
Experience in implementing and optimizing ServiceNow solutions for various business needs.
Strong ability to translate technical requirements into business value for clients.
@@ -0,0 +1,14 @@
---
company: "TriMedx"
role: "Senior Software Engineer"
dateStart: 2017-09-01
dateEnd: 2019-07-01
---
Experienced software engineer with focus on delivering fast, elegant code along with delightful user interfaces.
Proficient in web technologies including JavaScript, HTML, CSS, React, AngularJS, and Angular.
Strong background in developing marketing and ecommerce websites to complex enterprise applications.
Dedicated to creating functional and aesthetically pleasing digital solutions.
@@ -0,0 +1,14 @@
---
company: "CareWorks Tech"
role: "ServiceNow Developer"
dateStart: 2016-06-01
dateEnd: 2017-09-01
---
Experienced ServiceNow developer with expertise in IT Service Management platforms.
Skilled in implementing and customizing ServiceNow solutions for enterprise clients.
Knowledge of ITSM frameworks including INC, PRG, CHG, ESC to support business operations.
Proficient in configuring and maintaining ServiceNow applications to meet client requirements.
@@ -0,0 +1,20 @@
---
company: "zulily"
role: "Technical Change Manager"
dateStart: 2014-10-01
dateEnd: 2016-06-01
---
Designed and maintained internal tools for Fulfillment Center (FC) Operations, including:
- Weekly performance monitoring systems with actionable feedback for employee development and recognition.
- Employee recognition program to incentivize performance.
- Supplies inventory management system (e.g., Corrugated Boxes, Tape, Bubble Wrap) for tracking usage and movement.
- Employee kiosks for Overtime sign-ups, Voluntary-Time-Off, Department Transfers, and peer recognition.
- Dock Management System to streamline trailer tracking for transportation vendors.
Tested and approved deployments of Fulfillment Center Systems (FCS) tools for fulfillment tasks (e.g., Receive, Stow, Pick, Pack).
Documented and prioritized feature requests, improvements, and bug fixes from FC Operations, managing Agile sprints with weekly and biweekly check-ins to ensure project alignment.
Led operational process improvements to enhance efficiency, scalability, and overall FC operations performance.
+16
View File
@@ -0,0 +1,16 @@
---
company: "Amazon"
role: "Area Manager"
dateStart: 2010-03-01
dateEnd: 2014-10-01
---
Monitored associate productivity metrics and resolved performance barriers.
Conducted training sessions for peers and leadership on new fulfillment tech tools.
Empowered direct reports to enforce safety, quality, and productivity standards.
Recruited top talent for individual contributors to boost team success.
Led cross-functional teams to implement processes improving operational efficiency in North America.
@@ -0,0 +1,8 @@
---
company: "National Guard Bureau"
role: "Chaplain Assistant"
dateStart: 2007-12-01
dateEnd: 2012-12-01
---
Support role within the National Guard Bureau focused on chaplain services and community outreach.
+20 -44
View File
@@ -1,66 +1,42 @@
---
import type { BlogPost, Project } from "@lib/appwrite-service"
import { getBlogPosts, getProjects } from "@lib/appwrite-service"
import type { BlogPost, Project } from "@lib/types"
type Props = {
entry: BlogPost | Project | any
collection?: string
allEntries?: any[]
}
const { entry } = Astro.props
const collection = entry.$collectionId === process.env.VITE_APPWRITE_BLOG_COLLECTION_ID ? 'blog' : 'projects'
const { entry, collection = "blog", allEntries = [] } = Astro.props
const content = entry?.content || ""
// Get the content from the entry
const content = entry.contentHtml
// Fetch all documents for navigation
let prevEntry = null
let nextEntry = null
if (collection === "blog") {
const blogPosts = await getBlogPosts()
// Sort by date descending to get newest first
const sortedPosts = blogPosts.sort((a, b) => new Date(b.date).getTime() - new Date(a.date).getTime())
// Find current post index
const currentIndex = sortedPosts.findIndex(post => post.$id === entry.$id)
// Find prev/next entries
let prevEntry: any = null
let nextEntry: any = null
if (allEntries.length > 0) {
const currentIndex = allEntries.findIndex((e: any) => e.id === entry.id)
if (currentIndex > 0) {
prevEntry = sortedPosts[currentIndex - 1]
prevEntry = allEntries[currentIndex - 1]
}
if (currentIndex < sortedPosts.length - 1) {
nextEntry = sortedPosts[currentIndex + 1]
}
} else if (collection === "projects") {
const projects = await getProjects()
// Sort by date descending to get newest first
const sortedProjects = projects.sort((a, b) => new Date(b.date).getTime() - new Date(a.date).getTime())
// Find current project index
const currentIndex = sortedProjects.findIndex(project => project.$id === entry.$id)
if (currentIndex > 0) {
prevEntry = sortedProjects[currentIndex - 1]
}
if (currentIndex < sortedProjects.length - 1) {
nextEntry = sortedProjects[currentIndex + 1]
if (currentIndex < allEntries.length - 1) {
nextEntry = allEntries[currentIndex + 1]
}
}
---
<div>
<article class="text-spaghetti-brown/80 dark:text-spaghetti-cream" set:html={content} />
<article class="text-spaghetti-brown/80 dark:text-spaghetti-dark-cream" set:html={content} />
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
{prevEntry && (
<a href={`/${collection}/${prevEntry.$id}`} class="group p-4 gap-3 flex items-center border rounded-lg hover:bg-black/5 hover:dark:bg-spaghetti-cream/10 border-black/15 dark:border-spaghetti-cream/20 blend">
<div class="order-2 w-full h-full group-hover:text-spaghetti-brown/80 group-hover:dark:text-spaghetti-cream blend">
<a href={`/${collection}/${prevEntry.id}`} class="group p-4 gap-3 flex items-center border rounded-lg hover:bg-black/5 hover:dark:bg-spaghetti-cream/10 border-black/15 dark:border-spaghetti-dark-cream/20 blend">
<div class="order-2 w-full h-full group-hover:text-spaghetti-brown/80 group-hover:dark:text-spaghetti-dark-cream blend">
<div class="flex flex-wrap gap-2">
<div class="text-sm uppercase">
Prev
</div>
</div>
<div class="font-semibold mt-3 text-spaghetti-brown/80 dark:text-spaghetti-cream">
<div class="font-semibold mt-3 text-spaghetti-brown/80 dark:text-spaghetti-dark-cream">
{prevEntry.title}
</div>
</div>
@@ -71,12 +47,12 @@ if (collection === "blog") {
</a>
)}
{nextEntry && (
<a href={`/${collection}/${nextEntry.$id}`} class="group p-4 gap-3 flex items-center border rounded-lg hover:bg-black/5 hover:dark:bg-spaghetti-cream/10 border-black/15 dark:border-spaghetti-cream/20 transition-colors duration-300 ease-in-out blend dark:text-spaghetti-cream">
<div class="w-full h-full text-right group-hover:text-spaghetti-brown/80 group-hover:dark:text-spaghetti-cream blend">
<a href={`/${collection}/${nextEntry.id}`} class="group p-4 gap-3 flex items-center border rounded-lg hover:bg-black/5 hover:dark:bg-spaghetti-cream/10 border-black/15 dark:border-spaghetti-dark-cream/20 transition-colors duration-300 ease-in-out blend dark:text-spaghetti-dark-cream">
<div class="w-full h-full text-right group-hover:text-spaghetti-brown/80 group-hover:dark:text-spaghetti-dark-cream blend">
<div class="text-sm uppercase">
Next
</div>
<div class="font-semibold mt-3 text-spaghetti-brown/80 dark:text-spaghetti-cream">
<div class="font-semibold mt-3 text-spaghetti-brown/80 dark:text-spaghetti-dark-cream">
{nextEntry.title}
</div>
</div>
+12 -10
View File
@@ -1,27 +1,29 @@
---
import type { BlogPost, Project } from "@lib/appwrite-service"
import type { BlogPost, Project } from "@lib/types"
import { formatDate, readingTime } from "@lib/utils"
type Props = {
entry: BlogPost | Project | any
collection?: string
}
const { entry } = Astro.props
const { entry, collection = "blog" } = Astro.props
if (!entry) {
return null
}
const { title, summary, date } = entry
const demoUrl = "demoUrl" in entry ? entry.demoUrl : null
const repoUrl = "repoUrl" in entry ? entry.repoUrl : null
const collection = entry.$collectionId === process.env.VITE_APPWRITE_BLOG_COLLECTION_ID ? 'blog' : 'projects'
const body = entry.content
const body = entry.content || ""
---
<div>
<a href={`/${collection}`} class="group w-fit p-1.5 gap-1.5 text-sm flex items-center border text-spaghetti-brown/100 dark:text-spaghetti-yellow rounded hover:bg-spaghetti-brown/5 hover:dark:bg-spaghetti-red/10 border-spaghetti-brown/15 dark:border-spaghetti-cream/20 transition-colors duration-300 ease-in-out">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" class="stroke-current group-hover:stroke-spaghetti-brown group-hover:dark:stroke-spaghetti-yellow">
<a href={`/${collection}`} class="group w-fit p-1.5 gap-1.5 text-sm flex items-center border text-spaghetti-brown/100 dark:text-spaghetti-dark-yellow rounded hover:bg-spaghetti-brown/5 hover:dark:bg-spaghetti-red/10 border-spaghetti-brown/15 dark:border-spaghetti-dark-cream/20 transition-colors duration-300 ease-in-out">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" class="stroke-current group-hover:stroke-spaghetti-brown group-hover:dark:stroke-spaghetti-dark-yellow">
<line x1="19" y1="12" x2="5" y2="12" class="scale-x-0 group-hover:scale-x-100 translate-x-3 group-hover:translate-x-0 transition-all duration-300 ease-in-out" />
<polyline points="12 19 5 12 12 5" class="translate-x-1 group-hover:translate-x-0 transition-all duration-300 ease-in-out" />
</svg>
<div class="w-full group-hover:text-spaghetti-brown group-hover:dark:text-spaghetti-yellow transition-colors duration-300 ease-in-out">
<div class="w-full group-hover:text-spaghetti-brown group-hover:dark:text-spaghetti-dark-yellow transition-colors duration-300 ease-in-out">
Back to {`${collection.charAt(0).toUpperCase()}${collection.slice(1)}`}
</div>
</a>
@@ -39,10 +41,10 @@ const body = entry.content
{readingTime(body)}
</div>
</div>
<h1 class="text-3xl font-semibold text-spaghetti-brown/100 dark:text-spaghetti-cream mt-2">
<h1 class="text-3xl font-semibold text-spaghetti-brown/100 dark:text-spaghetti-dark-cream mt-2">
{title}
</h1>
<div class="mt-1 text-spaghetti-brown/80 dark:text-spaghetti-cream">
<div class="mt-1 text-spaghetti-brown/80 dark:text-spaghetti-dark-cream">
{summary}
</div>
{(demoUrl || repoUrl) &&
@@ -1,80 +0,0 @@
import { describe, it, expect } from 'vitest';
import { getBlogPosts, getProjects, getWorkExperiences, getLegalDocuments } from '../appwrite-service';
describe('AppWrite Service', () => {
describe('getBlogPosts', () => {
it('should return an array of blog posts', async () => {
const posts = await getBlogPosts();
expect(Array.isArray(posts)).toBe(true);
expect(posts.length).toBeGreaterThan(0);
// Check that each post has the expected properties
posts.forEach((post) => {
expect(post).toHaveProperty('title');
expect(post).toHaveProperty('summary');
expect(post).toHaveProperty('date');
expect(post).toHaveProperty('tags');
expect(post).toHaveProperty('draft');
expect(post).toHaveProperty('content');
expect(post).toHaveProperty('template');
expect(post).toHaveProperty('featured');
});
});
});
describe('getProjects', () => {
it('should return an array of projects', async () => {
const projects = await getProjects();
expect(Array.isArray(projects)).toBe(true);
expect(projects.length).toBeGreaterThan(0);
// Check that each project has the expected properties
projects.forEach((project) => {
expect(project).toHaveProperty('title');
expect(project).toHaveProperty('summary');
expect(project).toHaveProperty('date');
expect(project).toHaveProperty('tags');
expect(project).toHaveProperty('draft');
expect(project).toHaveProperty('content');
expect(project).toHaveProperty('demoUrl');
expect(project).toHaveProperty('repoUrl');
});
});
});
describe('getWorkExperiences', () => {
it('should return an array of work experiences', async () => {
const workExperiences = await getWorkExperiences();
expect(Array.isArray(workExperiences)).toBe(true);
expect(workExperiences.length).toBeGreaterThan(0);
// Check that each work experience has the expected properties
workExperiences.forEach((work) => {
expect(work).toHaveProperty('company');
expect(work).toHaveProperty('role');
expect(work).toHaveProperty('dateStart');
expect(work).toHaveProperty('content');
expect(work).toHaveProperty('dateEnd');
});
});
});
describe('getLegalDocuments', () => {
it('should return an array of legal documents', async () => {
const legalDocuments = await getLegalDocuments();
expect(Array.isArray(legalDocuments)).toBe(true);
expect(legalDocuments.length).toBeGreaterThan(0);
// Check that each legal document has the expected properties
legalDocuments.forEach((doc) => {
expect(doc).toHaveProperty('title');
expect(doc).toHaveProperty('date');
expect(doc).toHaveProperty('content');
});
});
});
});
-396
View File
@@ -1,396 +0,0 @@
import type { Models, } from "appwrite";
import { Query } from "appwrite";
import { databases, } from "./appwrite"; // Import the already initialized databases instances
import { remark } from "remark";
import remarkRehype from "remark-rehype";
import rehypeStringify from "rehype-stringify";
// We're using the storage instance from appwrite.ts which is properly initialized
// This file only contains service functions and types
/**
* Convert markdown content to HTML
*/
export function convertMarkdownToHTML(markdown: string): string {
if (!markdown) return "";
try {
const file = remark()
.use(remarkRehype)
.use(rehypeStringify)
.processSync(markdown);
return file.toString();
} catch (error) {
console.error("Error converting markdown to HTML:", error);
return markdown; // Return raw markdown if conversion fails
}
}
// Types for our collections
export type BlogPost = Models.Document & {
title: string;
summary: string;
date: Date;
tags: string[];
draft: boolean;
content: string;
contentHtml?: string; // HTML version of the content
image?: string; // File ID for the featured image
template: string; // e.g., "default", "feature", "news"
featured: boolean;
};
export type Project = Models.Document & {
title: string;
summary: string;
date: Date;
tags: string[];
draft: boolean;
demoUrl?: string;
repoUrl?: string;
content: string;
contentHtml?: string; // HTML version of the content
image?: string; // File ID for the featured image
};
export type WorkExperience = Models.Document & {
company: string;
role: string;
dateStart: Date;
content: string;
contentHtml?: string; // HTML version of the content
dateEnd: Date | string;
};
export type LegalDocument = Models.Document & {
title: string;
date: Date;
content: string;
contentHtml?: string; // HTML version of the content
};
// Define a unified type for search results
export type SearchEntry = BlogPost | Project;
// Collection IDs - these should be configured based on your Appwrite setup
let blogCollection = '', projectsCollection = '', workCollection = '', legalCollection = '', databaseID = '';
// Check if we're in a server environment (SSR)
if (typeof window === 'undefined') {
// Server-side: use environment variables directly
blogCollection = process?.env?.VITE_APPWRITE_BLOG_COLLECTION_ID || 'blog';
projectsCollection = process?.env?.VITE_APPWRITE_PROJECTS_COLLECTION_ID || "projects";
workCollection = process?.env?.VITE_APPWRITE_WORK_COLLECTION_ID || "work";
legalCollection = process?.env?.VITE_APPWRITE_LEGAL_COLLECTION_ID || "legal";
databaseID = process.env.VITE_APPWRITE_DATABASE_ID || "main";
} else {
blogCollection = import.meta.env.PUBLIC_APPWRITE_BLOG_COLLECTION_ID || 'blog';
projectsCollection = import.meta.env.PUBLIC_APPWRITE_PROJECTS_COLLECTION_ID || "projects";
workCollection = import.meta.env.PUBLIC_APPwrite_WORK_COLLECTION_ID || "work";
legalCollection = import.meta.env.PUBLIC_APPWRITE_LEGAL_COLLECTION_ID || "legal";
databaseID = import.meta.env.PUBLIC_APPWRITE_DATABASE_ID || "main";
}
/**
* Get blog posts from Appwrite database
*/
export async function getBlogPosts(): Promise<BlogPost[]> {
try {
const response = await databases.listDocuments<BlogPost>(
databaseID,
blogCollection
);
// Convert markdown content to HTML for each post
const postsWithHtml = response.documents.map(post => ({
...post,
contentHtml: convertMarkdownToHTML(post.content)
}));
return postsWithHtml;
} catch (error) {
console.error("Error fetching blog posts:", error);
throw new Error("Failed to fetch blog posts");
}
}
/**
* Get paginated blog posts from Appwrite database
*/
export async function getBlogPostsPaginated(page: number, limit: number): Promise<{ posts: BlogPost[], total: number }> {
try {
// For Appwrite SDK, the correct way to call listDocuments with pagination
const response = await databases.listDocuments<BlogPost>(
databaseID,
blogCollection,
[
// Only fetch published posts (not drafts)
Query.equal("draft", false),
Query.orderDesc('date')
]
);
// Apply pagination manually since Appwrite SDK might not support offset/limit directly in this version
const paginatedPosts = response.documents.slice((page - 1) * limit, page * limit);
// Convert markdown content to HTML for each post
const postsWithHtml = paginatedPosts.map(post => ({
...post,
contentHtml: convertMarkdownToHTML(post.content)
}));
return {
posts: postsWithHtml,
total: response.total
};
} catch (error) {
console.error("Error fetching paginated blog posts:", error);
throw new Error("Failed to fetch paginated blog posts");
}
}
/**
* Get a specific blog post by ID
*/
export async function getBlogPostById(id: string): Promise<BlogPost> {
try {
const response = await databases.getDocument<BlogPost>(
databaseID,
blogCollection,
id
);
// Convert markdown content to HTML
return {
...response,
contentHtml: convertMarkdownToHTML(response.content)
};
} catch (error) {
console.error("Error fetching blog post:", error);
throw new Error("Failed to fetch blog post");
}
}
/**
* Get projects from Appwrite database
*/
export async function getProjects(): Promise<Project[]> {
try {
const response = await databases.listDocuments<Project>(
databaseID,
projectsCollection,
[
// Only fetch published projects (not drafts)
Query.equal("draft", false),
Query.orderDesc('date')
]
);
// Convert markdown content to HTML for each project
const projectsWithHtml = response.documents.map(project => ({
...project,
contentHtml: convertMarkdownToHTML(project.content)
}));
return projectsWithHtml;
} catch (error) {
console.error("Error fetching projects:", error);
throw new Error("Failed to fetch projects");
}
}
/**
* Get paginated projects from Appwrite database
*/
export async function getProjectsPaginated(page: number, limit: number): Promise<{ posts: Project[], total: number }> {
try {
const response = await databases.listDocuments<Project>(
databaseID,
projectsCollection,
[
// Only fetch published projects (not drafts)
Query.equal("draft", false),
Query.orderDesc('date')
]
);
// Apply pagination manually since Appwrite SDK might not support offset/limit directly in this version
const paginatedPosts = response.documents.slice((page - 1) * limit, page * limit);
// Convert markdown content to HTML for each project
const projectsWithHtml = paginatedPosts.map(project => ({
...project,
contentHtml: convertMarkdownToHTML(project.content)
}));
return {
posts: projectsWithHtml,
total: response.total
};
} catch (error) {
console.error("Error fetching paginated projects:", error);
throw new Error("Failed to fetch paginated projects");
}
}
/**
* Get a specific project by ID
*/
export async function getProjectById(id: string): Promise<Project> {
try {
const response = await databases.getDocument<Project>(
databaseID,
projectsCollection,
id
);
// Convert markdown content to HTML
return {
...response,
contentHtml: convertMarkdownToHTML(response.content)
};
} catch (error) {
console.error("Error fetching project:", error);
throw new Error("Failed to fetch project");
}
}
/**
* Get work experiences from Appwrite database
*/
export async function getWorkExperiences(): Promise<WorkExperience[]> {
try {
const response = await databases.listDocuments<WorkExperience>(
databaseID,
workCollection
);
// Convert markdown content to HTML for each project
return response.documents.map(work => ({
...work,
contentHtml: convertMarkdownToHTML(work.content)
}));
} catch (error) {
console.error("Error fetching work experiences:", error);
throw new Error("Failed to fetch work experiences");
}
}
/**
* Get legal documents from Appwrite database
*/
export async function getLegalDocuments(): Promise<LegalDocument[]> {
try {
const response = await databases.listDocuments<LegalDocument>(
databaseID,
legalCollection
);
return response.documents;
} catch (error) {
console.error("Error fetching legal documents:", error);
throw new Error("Failed to fetch legal documents");
}
}
/**
* Perform a search across blog posts and projects using Appwrite SDK
*/
export async function searchContent(query: string): Promise<{ posts: BlogPost[], projects: Project[] }> {
try {
// Search in blog collection for the query term
const blogResponse = await databases.listDocuments<BlogPost>(
databaseID,
blogCollection,
[
Query.and([
Query.equal("draft", false),
Query.or([
Query.search("title", query),
Query.search("summary", query),
Query.search("content", query)
])
]),
Query.orderDesc('date')
]
);
// Search in projects collection for the query term
const projectResponse = await databases.listDocuments<Project>(
databaseID,
projectsCollection,
[
Query.and([
Query.equal("draft", false),
Query.or([
Query.search("title", query),
Query.search("summary", query),
Query.search("content", query)
])
]),
Query.orderDesc('date')
]
);
// Convert markdown content to HTML for blog posts
const blogPostsWithHtml = blogResponse.documents.map(post => ({
...post,
contentHtml: convertMarkdownToHTML(post.content)
}));
// Convert markdown content to HTML for projects
const projectsWithHtml = projectResponse.documents.map(project => ({
...project,
contentHtml: convertMarkdownToHTML(project.content)
}));
return {
posts: blogPostsWithHtml,
projects: projectsWithHtml
};
} catch (error) {
console.error("Error performing search:", error);
// More specific error handling for Appwrite errors
if (error instanceof Error) {
throw new Error(`Search failed: ${error.message}`);
}
throw new Error("Search failed due to an unknown error");
}
}
// Remove the duplicate function - keep only the original searchContent function
// The original searchContent function is already correctly implemented and should be used
/**
* Get a public URL for a file
*/
export function getFileUrl(bucketId: string, fileId: string): string {
return `${process.env.VITE_APPWRITE_ENDPOINT}/storage/buckets/${bucketId}/files/${fileId}/view?project=${process.env.VITE_APPWRITE_PROJECT_ID}`;
}
/**
* Get a preview URL for a file (thumb or preview)
*/
export function getFilePreviewUrl(bucketId: string, fileId: string, type: "thumb" | "preview"): string {
return `${process.env.VITE_APPWRITE_ENDPOINT}/storage/buckets/${bucketId}/files/${fileId}/view?project=${process.env.VITE_APPWRITE_PROJECT_ID}&mode=${type}`;
}
/**
* Get a download URL for a file
*/
export function getFileDownloadUrl(bucketId: string, fileId: string): string {
return `${process.env.VITE_APPWRITE_ENDPOINT}/storage/buckets/${bucketId}/files/${fileId}/download?project=${process.env.VITE_APPWRITE_PROJECT_ID}`;
}
-32
View File
@@ -1,32 +0,0 @@
import { Client, Databases } from "appwrite";
const client = new Client();
// Check if we're in a server environment (SSR)
if (typeof window === 'undefined') {
// Server-side: use environment variables directly
const endpoint = process.env.VITE_APPWRITE_ENDPOINT;
const projectId = process.env.VITE_APPWRITE_PROJECT_ID;
if (!endpoint || !projectId) {
throw new Error('Appwrite configuration missing in server environment');
}
client
.setEndpoint(endpoint) // Your Appwrite endpoint
.setProject(projectId); // Your Project ID
} else {
// Client-side: use import.meta.env (need to prefix with PUBLIC_ for Astro to make them available)
const endpoint = import.meta.env.PUBLIC_APPWRITE_ENDPOINT;
const projectId = import.meta.env.PUBLIC_APPWRITE_PROJECT_ID;
if (!endpoint || !projectId) {
throw new Error('Appwrite configuration missing in client environment');
}
client
.setEndpoint(endpoint) // Your Appwrite endpoint
.setProject(projectId); // Your Project ID
}
export const databases = new Databases(client);
+39
View File
@@ -0,0 +1,39 @@
export interface BlogPost {
id: string;
title: string;
summary: string;
date: string;
tags: string[];
draft: boolean;
content: string;
template: string;
featured: boolean;
}
export interface Project {
id: string;
title: string;
summary: string;
date: string;
tags: string[];
draft: boolean;
content: string;
demoUrl: string;
repoUrl: string;
}
export interface WorkExperience {
id: string;
company: string;
role: string;
dateStart: string;
dateEnd: string;
content: string;
}
export interface LegalDocument {
id: string;
title: string;
date: string;
content: string;
}
-92
View File
@@ -1,92 +0,0 @@
import { type APIRoute } from 'astro';
import { getFileUrl, getFilePreviewUrl } from '../../../lib/appwrite-service.ts';
export const GET: APIRoute = async ({ params, request }) => {
const { fileID } = params;
// Validate that we have a file ID
if (!fileID) {
return new Response(
JSON.stringify({ error: 'File ID is required' }),
{ status: 400, headers: { 'Content-Type': 'application/json' } }
);
}
try {
// Get the bucket ID from environment variables
const bucketId = process.env.VITE_APPWRITE_BUCKET_ID;
if (!bucketId) {
return new Response(
JSON.stringify({ error: 'Bucket ID is not configured' }),
{ status: 500, headers: { 'Content-Type': 'application/json' } }
);
}
// Parse query parameters for preview type
const url = new URL(request.url);
const type = url.searchParams.get('type') as "thumb" | "preview" | null;
let fileUrl: string;
// Determine the appropriate URL based on query parameter or default to view
if (type === 'thumb' || type === 'preview') {
fileUrl = getFilePreviewUrl(bucketId, fileID, type);
} else {
// Default to regular view URL
fileUrl = getFileUrl(bucketId, fileID);
}
// Return a redirect response to the file URL
return new Response(
null,
{
status: 302,
headers: {
'Location': fileUrl
}
}
);
} catch (error) {
console.error('Error fetching file:', error);
return new Response(
JSON.stringify({ error: 'Failed to fetch file' }),
{ status: 500, headers: { 'Content-Type': 'application/json' } }
);
}
};
// Handle HEAD requests for preflight checks
export const HEAD: APIRoute = async ({ params }) => {
const { fileID } = params;
if (!fileID) {
return new Response(
null,
{ status: 400 }
);
}
try {
// Get the bucket ID from environment variables
const bucketId = process.env.VITE_APPWRITE_BUCKET_ID;
if (!bucketId) {
return new Response(
null,
{ status: 500 }
);
}
// For HEAD requests, we just validate that the file URL can be generated
// This is a basic check - in production you might want to actually verify
// that the file exists on Appwrite
const fileUrl = getFileUrl(bucketId, fileID);
// Return a successful response (we don't actually need to return anything specific for HEAD)
return new Response(null, { status: 200 });
} catch (error) {
console.error('Error checking file:', error);
return new Response(null, { status: 500 });
}
};
+13 -17
View File
@@ -1,38 +1,34 @@
---
import { getCollection } from "astro:content"
import PageLayout from "@layouts/PageLayout.astro"
import TopLayout from "@layouts/TopLayout.astro"
import BottomLayout from "@layouts/BottomLayout.astro"
import ArticleTopLayout from "@layouts/ArticleTopLayout.astro"
import ArticleBottomLayout from "@layouts/ArticleBottomLayout.astro"
import { getBlogPostById } from "@lib/appwrite-service"
export const prerender = true
// Get the requested post
const slug = Astro.params.slug || ''
const post = await getBlogPostById(slug)
.then(blogPost => {
if (blogPost) {
return blogPost;
}
return null;
})
.catch(error => {
console.error("Error fetching blog post:", error);
return null;
})
export async function getStaticPaths() {
const entries = await getCollection("blog", ({ data }) => !data.draft)
return entries.map((entry) => ({
params: { slug: entry.id },
props: { entry: { ...entry, content: entry.rendered?.html }, allEntries: entries },
}))
}
const { title, summary } = post || { title: "Post not found", summary: "" }
const { entry, allEntries } = Astro.props
const { title, summary } = entry.data
---
<PageLayout title={title} description={summary}>
<TopLayout>
<div class="animate">
<ArticleTopLayout entry={post}/>
<ArticleTopLayout entry={entry}/>
</div>
</TopLayout>
<BottomLayout>
<div class="animate">
<ArticleBottomLayout entry={post} />
<ArticleBottomLayout entry={entry} allEntries={allEntries} />
</div>
</BottomLayout>
</PageLayout>
+15 -21
View File
@@ -1,31 +1,25 @@
---
import { getCollection } from "astro:content"
import PageLayout from "@layouts/PageLayout.astro"
import TopLayout from "@layouts/TopLayout.astro"
import BottomLayout from "@layouts/BottomLayout.astro"
import Blog from "@components/Blog"
import { BLOG } from "@consts"
import { getBlogPostsPaginated } from "@lib/appwrite-service"
// Get page and limit from URL parameters
const url = new URL(typeof window !== 'undefined' ? window.location.href : 'http://localhost')
const pageParam = url.searchParams.get('page') || '1'
const limitParam = url.searchParams.get('limit') || '10'
const page = parseInt(pageParam)
const limit = parseInt(limitParam)
// Fetch paginated blog posts
const { posts } = await getBlogPostsPaginated(page, limit)
.then(result => {
return result;
})
.catch(error => {
console.error("Error fetching blog posts:", error);
return { posts: [], total: 0 };
})
// Get all tags for filtering
const tags = [...new Set(posts.flatMap(post => post.tags))]
.sort((a, b) => a.localeCompare(b))
const entries = await getCollection("blog", ({ data }) => !data.draft)
const posts = entries.map((entry) => ({
id: entry.id,
slug: entry.id,
title: entry.data.title,
summary: entry.data.summary,
date: entry.data.date.toISOString(),
tags: entry.data.tags,
draft: entry.data.draft,
content: entry.body ?? "",
template: entry.data.template,
featured: entry.data.featured,
}))
const tags = Array.from(new Set(posts.flatMap((p) => p.tags)))
---
<PageLayout title={BLOG.TITLE} description={BLOG.DESCRIPTION}>
+24 -22
View File
@@ -1,5 +1,5 @@
---
import { getBlogPosts, getProjects } from "@lib/appwrite-service";
import { getCollection } from "astro:content"
import PageLayout from "@layouts/PageLayout.astro"
import ArrowCard from "@components/ArrowCard"
import StackCard from "@components/StackCard.astro"
@@ -7,16 +7,23 @@ import { SITE, SOCIALS } from "@consts"
import TwinklingStars from "@components/TwinklingStars.astro"
import MeteorShower from "@components/MeteorShower.astro"
// Fetch blog posts and projects from Appwrite
const posts = (await getBlogPosts())
.filter(post => !post.draft)
.sort((a, b) => new Date(b.date).getTime() - new Date(a.date).getTime())
.slice(0,3)
const allBlogEntries = await getCollection("blog", ({ data }) => !data.draft)
const posts = allBlogEntries.slice(0, 3).map((entry) => ({
$id: entry.id,
title: entry.data.title,
summary: entry.data.summary,
date: entry.data.date,
tags: entry.data.tags,
}))
const projects = (await getProjects())
.filter(project => !project.draft)
.sort((a, b) => new Date(b.date).getTime() - new Date(a.date).getTime())
.slice(0,3)
const allProjectEntries = await getCollection("projects", ({ data }) => !data.draft)
const projects = allProjectEntries.slice(0, 3).map((entry) => ({
$id: entry.id,
title: entry.data.title,
summary: entry.data.summary,
date: entry.data.date,
tags: entry.data.tags,
}))
const stack = [
{
@@ -38,11 +45,6 @@ const stack = [
text: "Tailwind",
icon: "tailwind",
href: "https://tailwindcss.com"
},
{
text: "Appwrite",
icon: "simple-icons--appwrite",
href: "https://appwrite.io"
}
]
---
@@ -83,9 +85,9 @@ const stack = [
</div>
</div>
<div class="animate absolute h-full w-full flex items-center justify-center">
<div class='relative w-full h-full flex items-center justify-center text-spaghetti-brown/100 dark:text-spaghetti-cream'>
<div class='relative w-full h-full flex items-center justify-center text-spaghetti-brown/100 dark:text-spaghetti-dark-cream'>
<div class='p-5 text-center'>
<img src='/api/assets/689d27a400194d326f69' alt="Quinn Marvin" class="rounded-full w-32 h-32 mx-auto mb-4 border-4 border-spaghetti-brown dark:border-spaghetti-cream" />
<img src='/images/profile.jpg' alt="Quinn Marvin" class="rounded-full w-32 h-32 mx-auto mb-4 border-4 border-spaghetti-brown dark:border-spaghetti-dark-cream" />
<p class='animated text-lg md:text-xl lg:text-2xl font-semibold opacity-75'>
Hello, I am Quinn Marvin
</p>
@@ -155,7 +157,7 @@ const stack = [
<!-- Tech Stack Section -->
<section class="animate">
<div class="space-y-4">
<p class="font-semibold text-spaghetti-brown dark:text-spaghetti-cream">
<p class="font-semibold text-spaghetti-brown dark:text-spaghetti-dark-cream">
Website build with
</p>
<div class="flex flex-wrap items-center gap-2 mt-5">
@@ -167,10 +169,10 @@ const stack = [
/>
))}
</div>
<div class="dark:text-spaghetti-cream">
<div class="dark:text-spaghetti-dark-cream">
Performing reactivity and statefulness, special guest
<a href="https://www.solidjs.com/" target="_blank" class="w-fit group underline decoration-[.5px] decoration-black/25 dark:decoration-white/50 hover:decoration-black dark:hover:decoration-white text-black dark:text-white underline-offset-2 blend">
<span class="text-spaghetti-brown/75 dark:text-spaghetti-cream/75 group-hover:text-spaghetti-brown group-hover:dark:text-spaghetti-cream blend">
<span class="text-spaghetti-brown/75 dark:text-spaghetti-dark-cream/75 group-hover:text-spaghetti-brown group-hover:dark:text-spaghetti-dark-cream blend">
SolidJS
</span>
</a>
@@ -182,7 +184,7 @@ const stack = [
<section class="animate">
<div class="space-y-4">
<div class="flex justify-between">
<p class="font-semibold text-spaghetti-brown dark:text-spaghetti-cream">
<p class="font-semibold text-spaghetti-brown dark:text-spaghetti-dark-cream">
Recent projects
</p>
<a href="/projects" class="w-fit col-span-3 group flex gap-1 items-center underline decoration-[.5px] decoration-black/25 dark:decoration-white/50 hover:decoration-black dark:hover:decoration-white text-black dark:text-white underline-offset-2 blend">
@@ -203,7 +205,7 @@ const stack = [
<!-- Contact Section -->
<section class="animate">
<div class=" text-spaghetti-brown dark:text-spaghetti-cream">
<div class=" text-spaghetti-brown dark:text-spaghetti-dark-cream">
<p class="font-semibold">
Let's Connect
</p>
+14 -15
View File
@@ -1,37 +1,36 @@
---
export const prerender = true;
import { getCollection } from "astro:content"
import PageLayout from "@layouts/PageLayout.astro"
import TopLayout from "@layouts/TopLayout.astro"
import BottomLayout from "@layouts/BottomLayout.astro"
import { formatDate } from "@lib/utils"
import { SITE } from "@consts"
import { getLegalDocuments } from "@lib/appwrite-service"
// Get the requested legal doc (simplified approach)
const legalDocs = await getLegalDocuments()
const doc = legalDocs.find(d => d.$id === Astro.params.slug) || null
if (!doc) {
// Handle case where document is not found
return new Response("Not Found", { status: 404 })
export async function getStaticPaths() {
const entries = await getCollection("legal")
return entries.map((entry) => ({
params: { slug: entry.id },
props: { entry },
}))
}
// Skip render() call since we're using Appwrite data directly
// const { Content } = await doc.render();
const { entry } = Astro.props
const doc = entry
---
<PageLayout title={doc.title} description={`${doc.title} for ${SITE.TITLE}`}>
<PageLayout title={doc.data.title} description={`${doc.data.title} for ${SITE.TITLE}`}>
<TopLayout>
<div class="animate">
<div class="page-heading">
{doc.title}
{doc.data.title}
</div>
<p class="font-normal opacity-75">
Last updated: {formatDate(doc.date)}
Last updated: {formatDate(doc.data.date)}
</p>
</div>
</TopLayout>
<BottomLayout>
<article class="animate prose dark:prose-invert text-spaghetti-brown/100 dark:text-spaghetti-cream" set:html={doc.contentHtml}></article>
<article class="animate prose dark:prose-invert text-spaghetti-brown/100 dark:text-spaghetti-cream" set:html={doc.rendered?.html}></article>
</BottomLayout>
</PageLayout>
+14 -17
View File
@@ -1,37 +1,34 @@
---
import { getCollection } from "astro:content"
import PageLayout from "@layouts/PageLayout.astro"
import TopLayout from "@layouts/TopLayout.astro"
import BottomLayout from "@layouts/BottomLayout.astro"
import ArticleTopLayout from "@layouts/ArticleTopLayout.astro"
import ArticleBottomLayout from "@layouts/ArticleBottomLayout.astro"
import { getProjectById } from "@lib/appwrite-service"
// Get the requested project
const slug = Astro.params.slug || ''
const project = await getProjectById(slug)
.then(projectData => {
if (projectData) {
return projectData
}
return null;
})
.catch(error => {
console.error("Error fetching project:", error);
return null;
})
export const prerender = true
const { title, summary } = project || { title: "Project not found", summary: "" }
export async function getStaticPaths() {
const entries = await getCollection("projects", ({ data }) => !data.draft)
return entries.map((entry) => ({
params: { slug: entry.id },
props: { entry: { ...entry, content: entry.rendered?.html }, allEntries: entries },
}))
}
const { entry, allEntries } = Astro.props
const { title, summary } = entry.data
---
<PageLayout title={title} description={summary}>
<TopLayout>
<div class="animate">
<ArticleTopLayout entry={project}/>
<ArticleTopLayout entry={entry} collection="projects"/>
</div>
</TopLayout>
<BottomLayout>
<div class="animate">
<ArticleBottomLayout entry={project} />
<ArticleBottomLayout entry={entry} collection="projects" allEntries={allEntries} />
</div>
</BottomLayout>
</PageLayout>
+15 -23
View File
@@ -1,33 +1,25 @@
---
import { getCollection } from "astro:content"
import PageLayout from "@layouts/PageLayout.astro"
import TopLayout from "@layouts/TopLayout.astro"
import BottomLayout from "@layouts/BottomLayout.astro"
import Projects from "@components/Projects"
import { PROJECTS } from "@consts"
import { getProjectsPaginated } from "@lib/appwrite-service"
// Get page and limit from URL parameters
const url = new URL(typeof window !== 'undefined' ? window.location.href : 'https://home.spaghet.io')
const pageParam = url.searchParams.get('page') || '1'
const limitParam = url.searchParams.get('limit') || '10'
const page = parseInt(pageParam)
const limit = parseInt(limitParam)
// Fetch paginated projects
const { posts } = await getProjectsPaginated(page, limit)
.then(result => {
console.log(result)
return result;
})
.catch(error => {
console.error("Error fetching projects:", error);
return { posts: [], total: 0 };
})
// Get all tags for filtering
const tags = [...new Set(posts.flatMap(project => project.tags))]
.sort((a, b) => a.localeCompare(b))
const entries = await getCollection("projects", ({ data }) => !data.draft)
const posts = entries.map((entry) => ({
id: entry.id,
slug: entry.id,
title: entry.data.title,
summary: entry.data.summary,
date: entry.data.date.toISOString(),
tags: entry.data.tags,
draft: entry.data.draft,
content: entry.body ?? "",
demoUrl: entry.data.demoUrl,
repoUrl: entry.data.repoUrl,
}))
const tags = Array.from(new Set(posts.flatMap((p) => p.tags)))
---
<PageLayout title={PROJECTS.TITLE} description={PROJECTS.DESCRIPTION}>
+10 -18
View File
@@ -1,35 +1,27 @@
import rss from "@astrojs/rss"
import { getCollection } from "astro:content"
import { SITE } from "@consts"
import { getBlogPosts, getProjects } from "@lib/appwrite-service"
type Context = {
site: string
}
export async function GET(context: Context) {
// Get data from Appwrite instead of Astro content collections
const blogPosts = await getBlogPosts()
const projects = await getProjects()
const entries = await getCollection("blog", ({ data }) => !data.draft)
// Combine and sort items by date (most recent first)
const items = [...blogPosts, ...projects]
.sort((a, b) => new Date(b.date).getTime() - new Date(a.date).getTime())
.map((item) => ({
title: item.title,
description: item.summary,
pubDate: item.date,
link: item.$collectionId === process.env.VITE_APPWRITE_BLOG_COLLECTION_ID ? `/blog/${item.$id}/` : `/projects/${item.$id}/`,
const items = entries
.sort((a, b) => b.data.date.getTime() - a.data.date.getTime())
.map((entry) => ({
title: entry.data.title,
description: entry.data.summary,
pubDate: entry.data.date,
link: `/blog/${entry.id}/`,
}))
return rss({
title: SITE.TITLE,
description: SITE.DESCRIPTION,
site: context.site,
items: items.map((item) => ({
title: item.title,
description: item.description,
pubDate: item.pubDate,
link: item.link,
})),
items: items,
})
}
+32 -6
View File
@@ -1,18 +1,44 @@
---
import { getCollection } from "astro:content"
import PageLayout from "@layouts/PageLayout.astro"
import TopLayout from "@layouts/TopLayout.astro"
import BottomLayout from "@layouts/BottomLayout.astro"
import Search from "@components/Search"
import { SEARCH } from "@consts"
// The search page now uses client-side search with Appwrite SDK directly
// No need to pre-load all data as the Search component handles this via API calls
// Fetch blog posts
const blogEntries = await getCollection("blog", ({ data }) => !data.draft)
const posts = blogEntries.map((entry) => ({
id: entry.id,
slug: entry.id,
title: entry.data.title,
summary: entry.data.summary,
date: entry.data.date.toISOString(),
tags: entry.data.tags,
draft: entry.data.draft,
content: entry.body ?? "",
template: entry.data.template,
featured: entry.data.featured,
}))
// Handle URL search parameters - add proper client-side handling for search query
// Fetch projects
const projectEntries = await getCollection("projects", ({ data }) => !data.draft)
const projects = projectEntries.map((entry) => ({
id: entry.id,
slug: entry.id,
title: entry.data.title,
summary: entry.data.summary,
date: entry.data.date.toISOString(),
tags: entry.data.tags,
draft: entry.data.draft,
content: entry.body ?? "",
demoUrl: entry.data.demoUrl || "",
repoUrl: entry.data.repoUrl || "",
}))
// Handle URL search parameters
const url = new URL(typeof window !== 'undefined' ? window.location.href : 'http://localhost')
const searchParam = url.searchParams.get('search') || ''
// Pass initial search query to component if present in URL
const initialQuery = searchParam
---
@@ -24,7 +50,7 @@ const initialQuery = searchParam
</TopLayout>
<BottomLayout>
<div class="animate" id="search-container">
<Search client:load query={initialQuery}/>
<Search client:load query={initialQuery} posts={posts} projects={projects} />
</div>
</BottomLayout>
</PageLayout>
+7 -18
View File
@@ -1,22 +1,11 @@
---
import { getCollection } from "astro:content"
import PageLayout from "@layouts/PageLayout.astro"
import TopLayout from "@layouts/TopLayout.astro"
import BottomLayout from "@layouts/BottomLayout.astro"
import { WORK } from "@consts"
import { getWorkExperiences, type WorkExperience } from "@lib/appwrite-service"
type Props = {
entry: WorkExperience
}
const work = await getWorkExperiences()
.then(workList => {
return workList;
})
.catch(error => {
console.error("Error fetching work experiences:", error);
return [];
})
const work = await getCollection("work")
function formatWorkDate(input: Date | string) {
if (typeof input === "string") input = new Date(input)
@@ -39,18 +28,18 @@ function formatWorkDate(input: Date | string) {
<BottomLayout>
<ul>
{
work.sort((a, b) => a.dateEnd > b.dateEnd ? -1 : b.dateEnd > a.dateEnd ? 1 : 0).map((entry) => (
work.sort((a, b) => a.data.dateEnd > b.data.dateEnd ? -1 : b.data.dateEnd > a.data.dateEnd ? 1 : 0).map((entry) => (
<li class="animate border-b border-black/10 dark:border-white/25 mt-4 py-8 first-of-type:mt-0 first-of-type:pt-0 last-of-type:border-none">
<div class="text-sm uppercase mb-4">
{formatWorkDate(entry.dateStart)} - {formatWorkDate(entry.dateEnd)}
{formatWorkDate(entry.data.dateStart)} - {formatWorkDate(entry.data.dateEnd)}
</div>
<div class="text-spaghetti-brown/100 dark:text-spaghetti-yellow font-semibold">
{entry.company}
{entry.data.company}
</div>
<div class="text-sm font-semibold text-spaghetti-brown/100 dark:text-spaghetti-yellow">
{entry.role}
{entry.data.role}
</div>
<article class="prose dark:prose-invert text-spaghetti-brown/100 dark:text-spaghetti-cream" set:html={entry.contentHtml}></article>
<article class="prose dark:prose-invert text-spaghetti-brown/100 dark:text-spaghetti-cream" set:html={entry.rendered?.html}></article>
</li>
))
}
+52 -4
View File
@@ -4,11 +4,16 @@
:root{
--copy-btn-margin:10px;
/* Pastel Palette Colors for Spaghetti Theme */
/* Pastel Palette Colors for Spaghetti Theme - Light Mode */
--spaghetti-yellow: #FDE68A;
--spaghetti-red: #FECACA;
--spaghetti-cream: #FEF3C7;
--spaghetti-brown: #78350F;
--spaghetti-brown: #451A03;
/* Dark Mode Colors - Better contrast on black background */
--spaghetti-dark-cream: #F5E6D3;
--spaghetti-dark-red: #FCA5A5;
--spaghetti-dark-yellow: #FCD34D;
}
@layer base {
@@ -99,9 +104,9 @@ body {
@apply font-semibold text-black dark:text-white;
}
/* Better contrast for text elements */
/* Better contrast for text elements - use dark brown for readability */
.text-spaghetti-brown {
color: #f59e0b !important; /* Amber-400 for better visibility */
color: var(--spaghetti-brown);
}
/* Better background for code blocks in dark mode */
@@ -129,6 +134,19 @@ body {
color: var(--spaghetti-brown);
}
/* Dark mode text colors - use warm cream for better readability */
.dark .text-spaghetti-yellow {
color: var(--spaghetti-dark-yellow);
}
.dark .text-spaghetti-red {
color: var(--spaghetti-dark-red);
}
.dark .text-spaghetti-brown {
color: var(--spaghetti-dark-cream);
}
.bg-spaghetti-cream {
background-color: var(--spaghetti-cream);
}
@@ -163,15 +181,27 @@ article {
color: var(--spaghetti-brown);
}
.dark article {
color: var(--spaghetti-dark-cream);
}
/* Override default prose styles that conflict with our theme */
.prose {
color: var(--spaghetti-brown);
}
.dark .prose {
color: var(--spaghetti-dark-cream);
}
.prose a {
color: var(--spaghetti-red);
}
.dark .prose a {
color: var(--spaghetti-dark-red);
}
.prose h1,
.prose h2,
.prose h3,
@@ -181,10 +211,23 @@ article {
color: var(--spaghetti-brown);
}
.dark .prose h1,
.dark .prose h2,
.dark .prose h3,
.dark .prose h4,
.dark .prose h5,
.dark .prose h6 {
color: var(--spaghetti-dark-cream);
}
.prose code {
color: var(--spaghetti-brown);
}
.dark .prose code {
color: var(--spaghetti-dark-cream);
}
.prose pre {
background-color: var(--spaghetti-cream);
}
@@ -198,6 +241,11 @@ article {
color: var(--spaghetti-brown);
}
.dark .prose th,
.dark .prose td {
color: var(--spaghetti-dark-cream);
}
.page-heading {
@apply font-semibold text-black dark:text-white;
}
+3
View File
@@ -97,6 +97,9 @@ export default {
red: "#FECACA",
cream: "#FEF3C7",
brown: "#78350F",
"dark-cream": "#F5E6D3",
"dark-red": "#FCA5A5",
"dark-yellow": "#FCD34D",
}
}
},