Skip to content

Commit eaacc4f

Browse files
committed
Refactor for template use and genericize personal data
Converted project from a personal portfolio to a reusable template by replacing hardcoded names, emails, URLs, and branding with generic placeholders and environment variables. Updated documentation, scripts, and configuration files to guide downstream users on customizing the template. Adjusted localStorage keys, build labels, and remote data endpoints to avoid collisions for template forks. Provided example LICENSE guidance and improved clarity for contributors and maintainers.
1 parent e859493 commit eaacc4f

39 files changed

Lines changed: 420 additions & 154 deletions

.firebaserc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"projects": {
3-
"default": "kiyaverse"
3+
"default": "template-portfolio"
44
}
55
}

.github/copilot-instructions.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,59 @@
1+
# Copilot / AI agent instructions (project-specific)
2+
3+
This file contains focused, actionable rules for automated coding agents working in the KR_Portf repository. Keep guidance short and specific — prefer small, safe edits and follow the project's conventions.
4+
5+
## Quick architecture & big picture
6+
- Vite + React + TypeScript front-end served via Firebase Hosting. Entry points: `src/main.tsx``src/App.tsx``src/AppRouter.tsx`.
7+
- UI components: `src/components/`; page sections: `src/sections/`; content/data: `src/data/` (e.g., `build.ts`, `projects.ts`).
8+
- Theme and context providers: `src/providers/ThemeProvider.tsx`, `src/providers/theme-context.ts` and hook `src/hooks/useTheme.ts`.
9+
- Tests and visual checks: Playwright + Vitest under `tests/` and `playwright.config.ts`.
10+
11+
## Project-specific conventions (follow these)
12+
- Compose Tailwind utility classes directly in JSX. Use PascalCase for components and camelCase for hooks.
13+
- Visual style: rounded Material-like cards (`rounded-3xl`, `shadow-card`), warm orange/pink accents (`#f97316`, `#ec4899`), and `.font-kiya` for the printed name "Kiya Rose" (font located in `public/fonts`).
14+
- Respect `prefers-reduced-motion`. Framer Motion is used; prefer short fade/slide transitions and provide reduced-motion fallbacks.
15+
- Footer/legal: use `getBuildUpdatedAt()` from `src/data/build.ts` for the "Last updated" date — do not hard-code timestamps.
16+
- Contact form: client-only `mailto:` generation plus copy-to-clipboard CTA (see `src/sections/ContactSection.tsx`).
17+
18+
## Environment & secrets
19+
- Environment variables use the `VITE_` prefix. Critical: `VITE_TURNSTYLE_SITE` is intentionally misspelled (no second "t"); do not rename it.
20+
- Never commit secrets. Use `.env.local` locally and GitHub Secrets in CI.
21+
22+
## Common developer workflows & commands
23+
- Install deps: `npm ci` or `npm install`.
24+
- Dev server: `npm run dev` (Vite, http://localhost:5173).
25+
- Lint: `npm run lint` (run before PR).
26+
- Build: `npm run build``dist/` for Firebase Hosting.
27+
- Local hosting preview: `firebase emulators:start --only hosting` (project has `firebase.json`).
28+
- Run tests: `npm run test` (Playwright tests and other test runners configured in package.json).
29+
30+
## Places to inspect for examples and patterns
31+
- Routing & layout: `src/App.tsx`, `src/AppRouter.tsx`.
32+
- Footer/build label: `src/components/SiteFooter.tsx`, `src/data/build.ts` (localStorage prefix behavior).
33+
- Contact flow: `src/sections/ContactSection.tsx` (mailto + clipboard behaviour).
34+
- Theme logic: `src/providers/ThemeProvider.tsx`, `src/hooks/useTheme.ts`.
35+
- Page-level sections: `src/sections/*` — follow their existing patterns for spacing, animation, and accessibility.
36+
37+
## Editing guidance for AI agents
38+
- Make smallest useful change. Prefer a focused PR per issue.
39+
- Preserve existing UX and data flows. If you change `src/data/build.ts` or footer code, preserve the localStorage build-label behavior unless explicitly fixing it.
40+
- Avoid global CSS: adhere to Tailwind utility usage in JSX.
41+
- When adding routes: update `src/AppRouter.tsx` and use `src/utils/navigation.ts` helpers.
42+
43+
## Tests & quality gates
44+
- Before proposing changes: run `npm run lint` and `npm run build` locally.
45+
- Test files live under `tests/` (e.g. `a11y.spec.ts`, `screenshot.spec.ts`); Playwright is used for integration/visual checks.
46+
47+
## Native companion tool
48+
- `$DashCam!/` holds a macOS Swift helper app used by developers to manage dev and playwright codegen tasks. If you modify related scripts, update the DashCam Swift sources under `$DashCam!/Sources/DashboardApp`.
49+
50+
## PR checklist for automated changes
51+
- Lint passes (`npm run lint`).
52+
- Build succeeds (`npm run build`).
53+
- No secrets committed.
54+
- Follow naming and Tailwind conventions.
55+
56+
If any section is unclear or you want more repo file examples, say which area to expand and I will iterate.
157
# Copilot Instructions
258

359
## Style & Architecture

.github/workflows/cloudflare-pages-merge.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ jobs:
3939
with:
4040
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
4141
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
42-
projectName: kiyaverse
42+
# Replace projectName with your Cloudflare Pages project name
43+
projectName: template-portfolio
4344
branch: main
4445
directory: dist
4546
gitHubToken: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/cloudflare-pages-preview.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ jobs:
4242
with:
4343
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
4444
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
45-
projectName: kiyaverse
45+
# Replace projectName with your Cloudflare Pages project name
46+
projectName: template-portfolio
4647
branch: ${{ github.event.pull_request.head.ref }}
4748
directory: dist
4849
gitHubToken: ${{ secrets.GITHUB_TOKEN }}

AGENTS.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
- `npm run build` outputs to `dist/`, which Firebase Hosting serves via `firebase.json`.
88
- `.github/workflows/` houses CI/CD pipelines—update them when scripts or deploy behavior changes.
99
- Top-level layout pieces (`SiteHeader`, `PrimaryNav`, `SiteFooter`) live in `src/App.tsx`; keep large JSX trees broken into helpers to satisfy lint rules.
10-
- The root `LICENSE` is BSD 3-Clause (2025, Kiya Rose); mirror that notice when legal text appears elsewhere.
10+
- The root `LICENSE` is BSD 3-Clause (2025, Kiya Rose); preserve this BSD-3-Clause notice and the original copyright
11+
line in any redistribution or derived work. Do not remove or replace this license without explicit permission from
12+
the copyright holder. When referencing the license in documentation, point to `LICENSE` in the repo.
1113
- `src/data/build.ts` exposes helpers for the build label and build timestamp: the label stores a random prefix in `localStorage` keyed by the build signature so it only changes when the code does, and `getBuildUpdatedAt()` surfaces the deploy timestamp for privacy/legal copy—leave that flow intact.
1214
- `src/AppRouter.tsx`, `src/pages/PrivacyPolicyPage.tsx`, and `src/utils/navigation.ts` handle lightweight client-side routing so `/privacy-policy` renders inside the React app without duplicating static assets.
1315

@@ -35,8 +37,8 @@
3537
- Accent palette leans warm orange and pink (`accent.DEFAULT` `#f97316`, `accent.muted` `#ec4899`); dark mode remains deep slate—match those tones across new UI.
3638
- Use rounded Material Symbols icons for navigation, social chips, and headers to keep iconography consistent.
3739
- Drive animations with Framer Motion; always respect `prefers-reduced-motion` and provide sensible fallbacks (toggle animation uses short fade/slide, not full spins).
38-
- The custom `.font-kiya` (Nanum Pen Script) highlights the name “Kiya Rose”; apply it consistently when the name appears in new sections.
39-
- The footer should surface a dynamic current year, the typographic © symbol, the `.font-kiya` name, and the build label (prefix = last edit signature, suffix = render id) alongside the “Crafted with React, Tailwind CSS, and Firebase.” line, with a pill-style tooltip explaining the two segments.
40+
- The custom `.font-kiya` (Nanum Pen Script) highlights the site owner's name (for example, “Your Name”); apply it consistently when the owner name appears in new sections. Add a comment near any hard-coded display name so template users know to update the font usage.
41+
- The footer should surface a dynamic current year, the typographic © symbol, the `.font-kiya` display name (e.g. “Your Name”), and the build label (prefix = last edit signature, suffix = render id) alongside the “Crafted with React, Tailwind CSS, and Firebase.” line, with a pill-style tooltip explaining the two segments. Keep a short inline comment pointing at `src/data/build.ts` so template users can find where the build label is generated.
4042
- Privacy and legal copy should pull their “Last updated” value from `getBuildUpdatedAt()` so the date reflects the latest build automatically—never hardcode the date.
4143
- Developing skills use a dotted accent pill—follow the existing `isDeveloping` pattern in `SkillsSection` when adding new skills.
4244
- The contact form generates a `mailto:` draft; keep it client-only (no POST handlers) and preserve the copy-to-clipboard CTA.

CONTRIBUTING.md

Lines changed: 65 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,66 @@
1-
# Contributing to my Portfolio
1+
# Contributing to this template
22

3-
If you want to change something major make a suggestion via the [issues tab](https://github.com/kiyarose/Portf/issues).
4-
Otherwise you are free to make a fork of this project and make a PR to a new branch and I will review it for implementation.
5-
If you have any questions use the contact form on the website.
3+
This repository is a community-friendly template. If you find a bug or want to propose improvements:
4+
5+
- Open an issue in the template's repository (or your fork) describing the change.
6+
- Send a PR against `main` with a focused change and clear description/screenshots for visual changes.
7+
8+
If you've forked this template to make a personal portfolio, treat your fork as the canonical source for your site and maintain your own issues/PRs there.
9+
10+
---
11+
12+
Below are suggestions and quick checks to help you convert this repo into your own project, or to accept contributions to the template itself.
13+
14+
## For people using this template (your fork)
15+
16+
- Keep your fork as the canonical source for your personal site. Maintain issues/PRs on your fork and update the following files early in your edit process:
17+
- `README.md` — update site name, short description, and deploy steps.
18+
- `LICENSE` — replace the copyright line (see `LICENSE.example` for guidance).
19+
- Important: this template includes a BSD-3-Clause `LICENSE` that must be preserved as-is in the source
20+
when redistributing or publishing derived works (see `LICENSE.example` for how to add your own copyright
21+
attribution without removing the original line).
22+
- `public/index.html` and `src/data/*` — replace demo content with your personal content.
23+
24+
- If you plan to accept outside contributions on your fork, add a `CODE_OF_CONDUCT.md`, a `PULL_REQUEST_TEMPLATE.md`, and/or an `ISSUE_TEMPLATE/` directory so contributors have clear expectations.
25+
26+
## For contributors to this template repository
27+
28+
- Keep changes small and focused. This repo is used as a starting point for many forks, so API and config stability matters.
29+
- Before submitting a PR, run the normal checks:
30+
- `npm run lint`
31+
- `npm run build`
32+
- Run tests where present (`npm test` / Playwright checks)
33+
- Update/add documentation or inline comments for new features.
34+
35+
## Customizing contribution policies
36+
37+
You may want a different collaboration model depending on how public you want the project to be:
38+
39+
- Public template (default): allow issues and PRs from the community, protect `main` with branch protections, and enable CI checks.
40+
- Private/managed template: restrict PRs to maintainers, require issue approval or design review before merging.
41+
42+
Suggested repo files to add if you change the model:
43+
44+
- `CODE_OF_CONDUCT.md` — sets community expectations.
45+
- `PULL_REQUEST_TEMPLATE.md` — helps contributors include tests, screenshots, or migration notes.
46+
- `CODEOWNERS` — assigns reviewers automatically.
47+
48+
## Security and license reminders
49+
50+
- This repo ships a default `LICENSE` (BSD 3-Clause). If you change the license for your fork, update the `LICENSE` file and the `package.json` `license` field.
51+
- Preserve existing license headers and notices when redistributing or modifying upstream code. See `LICENSE.example` for guidance on common license choices and how to update attribution.
52+
- Preserve existing BSD-3-Clause headers and notices (including the 2025 Kiya Rose attribution) when redistributing or modifying upstream code. `LICENSE.example` shows how to add your own copyright line in
53+
addition to the original notice so legal attribution is not lost.
54+
- If you add new developer tools (linters, scanners, or CI steps) that require secrets or external services, document how to configure them in the `README.md` and `SECURITY.md` so downstream users can replicate or opt out.
55+
56+
---
57+
58+
If you want, I can also add example `PULL_REQUEST_TEMPLATE.md` and `CODE_OF_CONDUCT.md` files tailored for a template repository.
59+
# Contributing to this template
60+
61+
This repository is a community-friendly template. If you find a bug or want to propose improvements:
62+
63+
- Open an issue in the template's repository (or your fork) describing the change.
64+
- Send a PR against `main` with a focused change and clear description/screenshots for visual changes.
65+
66+
If you've forked this template to make a personal portfolio, treat your fork as the canonical source for your site and maintain your own issues/PRs there.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
2525
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
2626
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
2727
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

LICENSE.example

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
This repository includes a default `LICENSE` file (BSD 3-Clause) that must be preserved in source redistributions.
2+
3+
Use this `LICENSE.example` as guidance before you change the active `LICENSE` file in your fork. Important: do not remove or replace the BSD-3-Clause notice or the original copyright
4+
attribution to Kiya Rose (2025) when redistributing or publishing derived works unless you have explicit permission from the copyright holder.
5+
6+
1) Picking a license
7+
8+
- Permissive licenses (BSD, MIT, Apache 2.0): allow others to reuse and redistribute your code with few restrictions. Apache 2.0 adds an explicit patent grant.
9+
- Copyleft licenses (GPL family): require downstream projects to publish derivative works under the same license.
10+
- Creative Commons licenses are sometimes used for non-code assets (images, documentation) but are not recommended for source code.
11+
12+
Choose the license that aligns with how you want others to use and contribute to your project.
13+
14+
2) Editing `LICENSE`
15+
16+
- If you want to add your own copyright attribution in a fork, add your line below the original notice rather than replacing it.
17+
18+
Example (do not remove the original):
19+
20+
Copyright (c) 2025, Kiya Rose
21+
22+
- Update the `package.json` `license` field to match the chosen license identifier (for example, `"BSD-3-Clause"`, `"MIT"`, `"Apache-2.0"`, or `"GPL-3.0-only"`).
23+
24+
3) Preserving upstream attribution and notices
25+
26+
- If you redistribute modified code that includes code from other projects, preserve their license headers and notices as required by the original license.
27+
- For BSD-3-Clause (the default here), keep the copyright notice, list of conditions, and disclaimer in source redistributions.
28+
29+
4) If you change the license
30+
31+
- Changing the license of a project you don't exclusively own may require permission from contributors or rights holders. If the template has many contributors, consider whether you need contributor consent.
32+
33+
5) Security & contributor tooling notes
34+
35+
- If you add security scanners, dependency checks, or other developer tooling that requires credentials, document the required environment variables in `.env.example` and do not commit secrets.
36+
- If your license choice or contributor policies require Contributor License Agreements (CLAs) or DCO signoffs, add the necessary templates (`CLA.md` or a sign-off checklist) and document how contributors should sign.
37+
38+
6) Example quick steps to make the template your own
39+
40+
- Fork the repo.
41+
- Update `LICENSE` (change copyright line and year).
42+
- Update `README.md` and `public/index.html` with your site name and contact info.
43+
- Replace `src/data/*` content with your portfolio data.
44+
- Update `package.json` `name` and `license` fields.
45+
46+
---
47+
48+
Keep the active `LICENSE` file in the repo for legal clarity; this `LICENSE.example` is only guidance and should not replace the real `LICENSE` file in downstream forks.

0 commit comments

Comments
 (0)