Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .docs/agents.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Agent Guidance — mayeedwin/profile

## Project Overview
Personal PWA profile page for Maye Edwin — a **Vite + vanilla TypeScript** single-page app deployed to **Firebase Hosting**. No UI frameworks. Uses the [`pwafire`](https://pwafire.org/developer) library for Web Share and PWA install prompts.

## Architecture
```
index.html ← Vite HTML entry (root) — single-page layout, no panel routing
src/
main.ts ← Service worker registration + initWebShare() + install prompt
web-share.ts ← pwafire-based share logic; triggers on [data-share] buttons
vite-env.d.ts ← Vite client type reference (required for CSS imports in TS)
style.css ← All styles; Google Fonts (Syne, Plus Jakarta Sans) via CDN @import
public/
Comment on lines +7 to +14
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This architecture block claims src/main.ts contains panel navigation logic and style.css imports Google Fonts + Font Awesome, but the current src/main.ts only registers the service worker / init code and src/style.css imports different fonts and no Font Awesome. Please update this doc to match the current structure/behaviour.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 8bef421 — the architecture section now correctly shows the single-page layout, Syne/Plus Jakarta Sans fonts (no Font Awesome), and main.ts as SW registration + share/install init.

manifest.json ← PWA web manifest (icons reference per-size files)
service-worker.js ← Network-first caching SW with waitUntil-safe cache writes
icons/ ← pwafire128white.png, pwafire144white.png, pwafire192white.png, pwafire512.png
images/ ← mayeedwingdg.jpg and other profile images
dist/ ← Vite build output (gitignored) — Firebase Hosting serves this
```

## Critical Developer Workflows
```bash
npm install # install deps (vite, typescript, pwafire)
npm run dev # local dev server at http://localhost:5173
npm run build # tsc type-check + vite build → dist/
npm run preview # serve dist/ locally for smoke-testing
```
Firebase deploy: `firebase deploy` — reads `"public": "dist"` from `firebase.json`.

## Key Patterns & Conventions

### Layout
Single-page — all content visible in one scroll, no JS-driven panel transitions.
`#wrapper` > `.hero` + `.intro` sections + `footer` — all static HTML.

### Web Share (src/web-share.ts)
Any element with `[data-share="<context>"]` triggers sharing via `pwafire.webShare`.
Context must be one of `"home" | "work" | "about" | "contact"` — validated against `VALID_CONTEXTS` before use; falls back to `"home"` for unknown values.
Falls back to `pwafire.copyText(url)` if sharing fails.
Share trigger in HTML: `<button type="button" class="btn" data-share="home">Share</button>`.

### PWA / Service Worker
Service worker registered in `src/main.ts` on `window load` (errors logged with `console.warn`).
`public/service-worker.js` uses a **network-first** strategy: serves from network, writes to cache using `e.waitUntil(...)` so the write isn't terminated early, falls back to cache on failure.
Offline fallback returns `Response.error()` when neither network nor cache is available.

### CSS
`src/style.css` — dark theme (`--bg: #0a0a0a`). No CSS framework.
Google Fonts `Syne` + `Plus Jakarta Sans` imported via CDN `@import` at top of file.
No Font Awesome — social icons are inline SVG in `index.html`.

### Firebase
Project: `pwafire-codelab` (see `.firebaserc`).
`firebase.json` sets `"public": "dist"` — run `npm run build` before deploying.
12 changes: 0 additions & 12 deletions .github/workflows/label.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ bower_components
# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Build output
dist/

# Dependency directories
node_modules/

Expand Down
4 changes: 0 additions & 4 deletions app/assets/css/font-awesome.min.css

This file was deleted.

379 changes: 0 additions & 379 deletions app/assets/css/main.css

This file was deleted.

121 changes: 0 additions & 121 deletions app/assets/js/buttons-navigate.js

This file was deleted.

8 changes: 0 additions & 8 deletions app/assets/js/jquery.min.js

This file was deleted.

6 changes: 0 additions & 6 deletions app/assets/js/respond.min.js

This file was deleted.

Loading