Skip to content

Commit 26b0cda

Browse files
authored
Update2 (#2)
## Summary <!-- Explain what changed and why. Keep this focused on the user-visible or technical outcome. --> Example: Fix mobile static exports so they use the selected responsive composition. ## Related issue <!-- Use "Closes #123" when merging this pull request should close an issue. Use "None" when there is no related issue. --> Closes # ## Type of change - [ ] BUG fix - [ ] Improvement to existing behavior - [ ] New function - [ ] Documentation or maintenance ## Verification <!-- List the checks you ran and any important manual scenarios. Do not check a command that you did not run. --> - [ ] `npm run typecheck` - [ ] `npm test` - [ ] `npm run build` - [ ] Relevant desktop/mobile, dark/light, and animated/static variants were inspected Additional verification: <!-- Example: Imported a v2 config and confirmed that profile content and visual choices were preserved. --> ## Screenshots or generated output <!-- Add before/after images or generated output for visual changes. Write "Not applicable" otherwise. --> ## Checklist - [ ] I kept this pull request focused and avoided unrelated refactoring. - [ ] I added or updated tests when behavior changed. - [ ] I updated documentation when setup, configuration, or user-visible behavior changed. - [ ] I did not add secrets, private data, unlicensed media, or unsafe raw CSS/SVG input. - [ ] I preserved backward compatibility, or documented the intentional breaking change above. --------- Signed-off-by: Talal <153442159+TFQ0@users.noreply.github.com>
1 parent ab070a4 commit 26b0cda

11 files changed

Lines changed: 428 additions & 743 deletions

File tree

README.md

Lines changed: 80 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -1,137 +1,124 @@
11
# Animated GitHub Profile Studio
22

3-
A browser-based editor for creating a personal GitHub profile README from one reusable configuration. Customize the design, fonts, text, animated terminal, featured repositories, images, GIFs, links, section order, colors, and motion settings, then export a ready-to-upload ZIP.
3+
A desktop-only visual editor for building animated GitHub profile READMEs from one reusable configuration. Design the profile, preview every theme and motion mode, then export a complete repository-ready bundle.
44

5-
The built-in sample is intentionally fictional and fully replaceable, so no maintainer profile, repository, or personal identity is used as the starting point.
5+
<p align="center">
6+
<img src="./assets/profile-header-dark.svg" alt="Fictional desktop GitHub profile generated by Animated GitHub Profile Studio" width="100%">
7+
</p>
68

7-
After GitHub Pages is enabled, the hosted Studio is available at:
9+
<p align="center">
10+
<a href="https://tfq0.github.io/animated-github-profile/"><strong>Open the hosted Studio</strong></a>
11+
·
12+
<a href="./SETUP.md">Setup and release guide</a>
13+
·
14+
<a href="./USER_CONTENT_NOTICE.md">Content notice</a>
15+
</p>
816

9-
**[Open the hosted Studio](https://tfq0.github.io/animated-github-profile/)**
17+
The header above is a committed example generated by the Studio. Its identity, repositories, and links are intentionally fictional and safe to replace.
1018

11-
## Templates, layout, and media customization
19+
## What the Studio does
1220

13-
Configuration v3 provides seven templates: Quality Control, Classic Terminal, Retro Arcade, Anime HUD, Bento Grid, Signal Poster, and Custom Canvas. The templates use generic, original interface elements and include no franchise characters, logos, or copied artwork.
21+
Animated GitHub Profile Studio turns a validated `profile.config.json` into a polished profile README and four self-contained desktop SVG headers:
1422

15-
The templates are more than palette swaps: they provide structurally distinct compositions that adapt independently to desktop and mobile output. Custom Canvas uses the same validated rendering system and offers constrained layout controls rather than unrestricted canvas editing.
23+
- Dark animated
24+
- Light animated
25+
- Dark static
26+
- Light static
1627

17-
The customization contract includes:
28+
Every header uses a fixed 1200 × 610 desktop canvas. The editor targets browser widths of 1180 px or wider and does not generate a separate phone layout.
1829

19-
- Responsive composition, alignment, spacing, and placement choices within safe layout bounds.
20-
- Two to six workflow steps, with an allowlisted safe shape selected for each step.
21-
- Decorative shapes described through a bounded SVG-safe DSL. The renderer converts validated shape data into SVG; users cannot insert arbitrary SVG elements or path commands.
22-
- Curated font presets that map to controlled, SVG-safe system font stacks.
23-
- Structured remote media entries for images and GIFs referenced by HTTPS URL, with accessibility and attribution information kept alongside each entry. Media remains separate README content and is not inserted into the generated hero canvas.
30+
## Highlights
2431

25-
Applying a template changes its visual system and layout defaults without replacing the user's profile text, repositories, links, sections, or media. Loading a complete sample is a separate, confirmed action that replaces profile content. Valid v1 and v2 configurations migrate automatically when imported or restored from browser storage.
26-
27-
The editor does not accept arbitrary raw CSS, SVG markup, SVG paths, or remote fonts. Decorative elements are code-generated from allowlisted primitives and bounded numeric values.
28-
29-
## What it includes
30-
31-
- Live desktop and mobile preview in dark and light themes.
32-
- Animated and reduced-motion/static SVG variants.
33-
- Seven structurally distinct responsive templates plus constrained custom layout controls.
34-
- Design, font, profile, hero, workflow-step shape, decorative shape, project, skill, link, structured media, palette, section, Markdown, and footer editing.
35-
- Optional public GitHub repository import with no login or token.
32+
- Seven distinct designs: Quality Control, Classic Terminal, Retro Arcade, Anime HUD, Bento Grid, Signal Poster, and Custom Canvas.
33+
- Live GitHub-style preview with dark/light and animated/static controls.
34+
- Editable identity, headline, terminal sequence, workflow, projects, skills, links, media, sections, colors, typography, and footer.
35+
- Constrained composition, spacing, alignment, panel, workflow, and decorative-shape controls.
36+
- Optional import of public GitHub repository metadata without login or a token.
3637
- Local autosave of the last valid configuration.
37-
- Versioned `profile.config.json` import/export.
38-
- One-click download of the currently previewed SVG variant without creating a ZIP.
39-
- Deterministic ZIP generation containing `README.md`, setup guidance, the saved config, and all eight SVG assets.
40-
- Strict runtime validation, HTTPS-only generated links, contextual XML/Markdown escaping, and self-contained SVG output.
41-
- WebMCP tools for agents to read or stage the same configuration used by the visible editor.
38+
- Versioned configuration import/export with automatic v1 and v2 migration.
39+
- Direct download of the currently previewed SVG.
40+
- Deterministic ZIP export containing everything needed for a profile repository.
41+
- Reduced-motion fallbacks and dark/light theme selection in the generated README.
42+
- Agent access through WebMCP tools that read or stage the same configuration used by the editor.
4243

43-
## Use the studio
44+
## Create a profile
4445

45-
1. Open the app and choose one of the seven templates, then adjust its constrained layout controls if desired.
46-
2. Select **Start a blank profile** or customize the clearly labeled fictional sample.
47-
3. Work through Profile, Hero, workflow steps and shapes, Projects, Skills, Links, Media, Colors, and Sections.
48-
4. Check the desktop/mobile, dark/light, and animated/static previews. Responsive compositions can adapt between desktop and mobile rather than preserving identical coordinates.
49-
5. Resolve validation errors and review any design warnings in Export.
50-
6. To keep only the image, choose its desktop/mobile, dark/light, and animated/static options, then select **Download SVG**.
51-
7. To publish the complete profile, download the ZIP instead.
52-
8. Upload its `README.md` and `assets/` directory to the public GitHub repository whose name exactly matches your username.
46+
1. Open the [hosted Studio](https://tfq0.github.io/animated-github-profile/) or run it locally.
47+
2. Choose a design, start with a blank profile, or load the clearly labeled fictional sample.
48+
3. Customize the profile content and desktop composition.
49+
4. Review the dark/light and animated/static previews.
50+
5. Resolve validation errors and inspect any design warnings in the Export step.
51+
6. Select **Save SVG** for one header or **Download ZIP** for the complete profile.
52+
7. Upload the generated `README.md` and `assets/` directory to the public GitHub repository named exactly like your username.
5353

54-
Keep the exported `profile.config.json`; importing it later restores an editable profile instead of requiring manual SVG changes.
54+
Keep the exported `profile.config.json`. Importing it later restores the editable profile without requiring manual SVG changes.
5555

56-
## Deploy the Studio with GitHub Pages
56+
## Exported bundle
5757

58-
This repository includes [`.github/workflows/deploy-pages.yml`](./.github/workflows/deploy-pages.yml). The workflow runs the type-checker and tests, builds the Vite application with the repository's GitHub Pages base path, and publishes the generated `dist/` directory whenever a commit is pushed to `main`. A failed check stops the deployment.
58+
| File | Purpose |
59+
| :--- | :--- |
60+
| `README.md` | Generated GitHub profile content and theme/motion image selection |
61+
| `profile.config.json` | Reusable, editable source configuration |
62+
| `SETUP.md` | Profile-specific publishing instructions |
63+
| `assets/profile-header-dark.svg` | Dark animated desktop header |
64+
| `assets/profile-header-light.svg` | Light animated desktop header |
65+
| `assets/profile-header-dark-static.svg` | Dark reduced-motion desktop header |
66+
| `assets/profile-header-light-static.svg` | Light reduced-motion desktop header |
5967

60-
Complete this one-time setup after pushing the repository to GitHub:
68+
Structured remote media remains referenced by HTTPS URL. It is not copied into the ZIP or embedded in the generated header.
6169

62-
1. Open the repository on GitHub.
63-
2. Select **Settings**, then **Pages**.
64-
3. Under **Build and deployment**, choose **GitHub Actions** as the source.
65-
4. Open the **Actions** tab and run **Deploy to GitHub Pages**, or push another commit to `main`.
66-
5. Wait for the workflow to finish, then open `https://tfq0.github.io/animated-github-profile/`.
70+
## Customization model
6771

68-
No deployment branch, generated `dist/` commit, server, API key, or repository secret is required. The published Studio is a public static website and stores editable drafts in each visitor's browser.
72+
`ProfileConfig` is the single source of truth for the editor, preview, README, SVGs, saved draft, and ZIP.
6973

70-
The `animated-github-profile` repository publishes the Studio itself. It is separate from a generated profile repository named `<username>/<username>`: use **Download complete ZIP** inside the Studio when you want to publish a generated profile.
74+
| Area | Available controls |
75+
| :--- | :--- |
76+
| Design | Template, composition, content order, spacing, panel system, background pattern, console style, text alignment |
77+
| Hero | Headline, command, status checks, animation timing, workflow labels and shapes, footer labels |
78+
| Content | About text, repositories, skills, links, custom Markdown, structured images and GIFs |
79+
| Appearance | Curated system font stacks, dark/light palettes, corner radius, decorative shapes |
80+
| Output | Theme, motion mode, standalone SVG, full ZIP, configuration import/export |
7181

72-
To publish a later update, verify it locally and push it to `main`. GitHub Actions will replace the hosted version automatically:
73-
74-
```bash
75-
npm run typecheck
76-
npm test
77-
npm run build
78-
git push origin main
79-
```
82+
Applying a design changes the visual system without replacing profile content. Loading a complete sample is a separate confirmed action because it replaces the current content.
8083

8184
## Local development
8285

83-
Requirements: Node.js `^22.13.0` or `>=24.0.0` and npm.
86+
Requirements:
87+
88+
- Node.js `^22.13.0` or `>=24.0.0`
89+
- npm
90+
91+
Install dependencies and start the development server:
8492

8593
```bash
8694
npm ci
8795
npm run dev
8896
```
8997

90-
The local app is served at `http://localhost:4173/`.
98+
Open `http://localhost:4173/` in a desktop browser.
99+
100+
Run the complete verification pipeline:
91101

92102
```bash
93103
npm run typecheck
94104
npm test
95105
npm run build
96106
```
97107

98-
The production site is written to `dist/`. Local builds keep portable relative asset URLs; the Pages workflow supplies the repository path during its production build.
99-
100108
## Architecture
101109

102110
```text
103111
src/
104-
├── domain/profile.ts # strict v3 config plus v1/v2 migration
105-
├── domain/presets.ts # trusted template defaults and visual presets
112+
├── domain/
113+
│ ├── profile.ts # strict v3 schema, defaults, and v1/v2 migration
114+
│ └── presets.ts # trusted visual presets
106115
├── generator/
107-
│ ├── svg.ts # pure eight-variant SVG renderer
108-
│ ├── readme.ts # GitHub README renderer
109-
│ ├── escape.ts # XML/Markdown/URL safety boundaries
110-
│ └── artifacts.ts # deterministic file and ZIP assembly
111-
├── services/github.ts # optional public repository import
112-
├── components/ # editor fields and GitHub-like preview
113-
├── webmcp.ts # agent-facing read/stage actions
114-
└── App.tsx # editor state and workflows
116+
│ ├── svg.ts # four-variant desktop SVG renderer
117+
│ ├── readme.ts # GitHub README renderer
118+
│ ├── escape.ts # XML, Markdown, and URL safety boundaries
119+
│ └── artifacts.ts # deterministic file and ZIP assembly
120+
├── services/github.ts # optional public repository import
121+
├── components/ # editor fields and profile preview
122+
├── webmcp.ts # agent-facing read and stage tools
123+
└── App.tsx # editor state and workflows
115124
```
116-
117-
`ProfileConfig` is the single source of truth. The visible preview, README source, SVG files, saved config, and ZIP are all produced from the same validated object. Template, responsive layout, workflow-shape, and decorative-shape values are resolved through trusted renderer registries. Imported GitHub data becomes an editable snapshot; it is never a hidden dependency of later exports.
118-
119-
## Privacy and output safety
120-
121-
- The editor has no backend and requests no GitHub token.
122-
- Drafts and the short-lived public repository cache stay in browser storage.
123-
- Only public repository metadata is fetched directly from GitHub's public API.
124-
- Generated SVGs contain no scripts, event handlers, remote fonts, external images, tracking, or live CI claims.
125-
- Layout and decorative SVG output is generated only from validated, bounded controls and allowlisted shape primitives; raw CSS, SVG markup, and path data are not accepted.
126-
- User-selected media is referenced by HTTPS URL in the README rather than copied into the ZIP or embedded in the generated hero SVG.
127-
- Previewing or viewing remote media may send an ordinary request to its third-party host. Remote content can disappear or change independently of the Studio.
128-
- Static fallbacks are generated for visitors who prefer reduced motion.
129-
- Custom Markdown blocks raw HTML and neutralizes non-HTTPS link destinations in generated output.
130-
131-
Users must own or hold permission for any media they add. Attribution alone does not grant permission, and adding media does not imply affiliation with or endorsement by its creator or rights holder. See [User content and third-party media notice](./USER_CONTENT_NOTICE.md).
132-
133-
## License
134-
135-
Animated GitHub Profile Studio is released under the [MIT License](./LICENSE).
136-
137-
The MIT License does not grant rights to user-supplied content or third-party media. See [User content and third-party media notice](./USER_CONTENT_NOTICE.md).

SETUP.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,26 @@ npm test
1919
npm run build
2020
```
2121

22-
These checks cover TypeScript, strict config parsing, all eight SVG variants, reduced-motion output, README-to-asset references, deterministic ZIP contents, unsafe input handling, public GitHub import errors, cache validation, and the WebMCP contract.
22+
These checks cover TypeScript, strict config parsing, all four desktop SVG variants, reduced-motion output, README-to-asset references, deterministic ZIP contents, unsafe input handling, public GitHub import errors, cache validation, and the WebMCP contract.
2323

2424
The v3 verification matrix must also cover:
2525

2626
- Quality Control, Classic Terminal, Retro Arcade, Anime HUD, Bento Grid, Signal Poster, and Custom Canvas.
27-
- Every supported responsive composition in desktop and mobile output, including constrained alignment, spacing, and placement boundary values.
27+
- Every supported desktop composition, including constrained alignment, spacing, and placement boundary values.
2828
- Two-step and six-step workflows, every allowlisted per-step shape, ordering, and text-fit limits.
2929
- Decorative shapes at their count and numeric boundaries, plus rejection of unknown primitives, excessive values, raw SVG, arbitrary path data, and CSS injection.
3030
- Every curated font preset and rejection of arbitrary font-family values or remote font references.
3131
- Migration of valid v1 and v2 drafts to v3, with user content and existing visual choices preserved.
3232
- Structured remote-media validation and attribution, rejection of unsafe media URLs, and confirmation that media remains separate HTTPS README content rather than hero SVG content.
3333
- Preservation of profile text, repositories, links, sections, and media when applying a template. Loading a complete sample must remain a separate confirmed replacement action.
3434

35-
For a release, inspect all seven templates with representative and maximum-length content in desktop/mobile, dark/light, and animated/static previews. Confirm that compositions are visibly distinct, remain within the SVG viewBox, and adapt safely between desktop and mobile. Design warnings are advisory because fixed SVG artwork cannot measure browser font metrics during generation.
35+
For a release, inspect all seven templates with representative and maximum-length content in the desktop dark/light and animated/static previews. Confirm that compositions are visibly distinct and remain within the 1200×610 SVG viewBox. Design warnings are advisory because fixed SVG artwork cannot measure browser font metrics during generation.
3636

3737
Exercise the constrained custom layout controls at minimum and maximum values, then verify that the visible preview, downloaded current SVG, and matching ZIP asset render the same configuration. Check workflows with two and six steps and mix every safe step shape. Decorative-shape tests must confirm that generated primitives remain bounded and cannot obscure required text or controls.
3838

39-
The preview toolbar can download its currently selected SVG by itself. Use the Export panel's complete ZIP when publishing the full README and all responsive theme variants.
39+
The preview toolbar can download its currently selected SVG by itself. Use the Export panel's complete ZIP when publishing the full README and all desktop theme and motion variants.
4040

41-
When changing the editor layout, inspect 1440 px, 1180 px, 900 px, 620 px, and 320 px viewport widths. Confirm that navigation and export actions remain reachable, keyboard focus remains visible, remote media stays within the preview, and no horizontal page overflow is introduced.
41+
When changing the editor layout, inspect the supported desktop widths at 1440 px and 1180 px. Confirm that navigation and export actions remain reachable, keyboard focus remains visible, remote media stays within the preview, and no horizontal page overflow is introduced.
4242

4343
Custom Canvas is constrained despite its name. Do not add arbitrary raw CSS, SVG markup, SVG path input, or remote fonts. Layouts, workflow shapes, and decorative shapes must be selected or composed through validated controls and code-generated renderer primitives.
4444

0 commit comments

Comments
 (0)