|
1 | | -# KawaiiLinktree |
| 1 | +# 🌸 HazelTree |
| 2 | +[](https://github.com/hazeliscoding/hazel-tree/actions/workflows/deploy.yml) |
2 | 3 |
|
3 | | -This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 21.0.3. |
| 4 | +A cute, lightweight Linktree-style profile page built with Angular. |
| 5 | +Content is driven by a single JSON file so you can update links, labels, emojis, and profile info without touching the UI. |
4 | 6 |
|
5 | | -## Development server |
| 7 | +> 💻 Platform: **Web** (Angular 21) |
| 8 | +> |
| 9 | +> ✨ Features: **light/dark theme**, **sparkle cursor**, **copy-to-clipboard links + toast** |
6 | 10 |
|
7 | | -To start a local development server, run: |
| 11 | +--- |
8 | 12 |
|
9 | | -```bash |
10 | | -ng serve |
11 | | -``` |
| 13 | +## 🛠 Tech Stack |
| 14 | + |
| 15 | +- Angular 21 (standalone components + new control flow) |
| 16 | +- TypeScript |
| 17 | +- RxJS |
| 18 | +- Vitest (via `ng test`) |
| 19 | +- GitHub Pages deploy (`gh-pages`) |
12 | 20 |
|
13 | | -Once the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files. |
| 21 | +--- |
14 | 22 |
|
15 | | -## Code scaffolding |
| 23 | +## 🚀 Running Locally |
16 | 24 |
|
17 | | -Angular CLI includes powerful code scaffolding tools. To generate a new component, run: |
| 25 | +From a terminal in the project root: |
18 | 26 |
|
19 | 27 | ```bash |
20 | | -ng generate component component-name |
| 28 | +# 1. Install deps |
| 29 | +npm install |
| 30 | + |
| 31 | +# 2. Start dev server |
| 32 | +npm run start |
21 | 33 | ``` |
22 | 34 |
|
23 | | -For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run: |
| 35 | +Open `http://localhost:4200/`. |
24 | 36 |
|
25 | | -```bash |
26 | | -ng generate --help |
27 | | -``` |
| 37 | +--- |
| 38 | + |
| 39 | +## 🧩 Customization (Your Links + Profile) |
| 40 | + |
| 41 | +Edit your content in [public/assets/site-config.json](public/assets/site-config.json). |
| 42 | + |
| 43 | +Supports: |
28 | 44 |
|
29 | | -## Building |
| 45 | +- `profile`: name, handle, bio, avatar |
| 46 | +- `links[]`: label, url, emoji, description |
| 47 | +- optional link extras: |
| 48 | + - `isNew: true` to show a “new” pill |
| 49 | + - `copyText` to copy text instead of navigating (shows a toast) |
30 | 50 |
|
31 | | -To build the project run: |
| 51 | +Notes: |
| 52 | + |
| 53 | +- The app loads config from `assets/site-config.json` (relative), so it works correctly when deployed under a sub-path (GitHub Pages). |
| 54 | +- Put images under `public/assets/` and reference them like `assets/avatar.png`. |
| 55 | + |
| 56 | +--- |
| 57 | + |
| 58 | +## 🏗 Building |
32 | 59 |
|
33 | 60 | ```bash |
34 | | -ng build |
| 61 | +npm run build |
35 | 62 | ``` |
36 | 63 |
|
37 | | -This will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed. |
| 64 | +Build output goes to `dist/`. |
38 | 65 |
|
39 | | -## Running unit tests |
| 66 | +--- |
40 | 67 |
|
41 | | -To execute unit tests with the [Vitest](https://vitest.dev/) test runner, use the following command: |
| 68 | +## 🧪 Tests |
42 | 69 |
|
43 | 70 | ```bash |
44 | | -ng test |
| 71 | +npm run test |
45 | 72 | ``` |
46 | 73 |
|
47 | | -## Running end-to-end tests |
| 74 | +--- |
| 75 | + |
| 76 | +## 🌍 Deploying (GitHub Pages) |
| 77 | + |
| 78 | +Deploys happen automatically via GitHub Actions on every push to `main` (or `master`). |
| 79 | + |
| 80 | +The workflow builds with `--base-href /<repo-name>/` automatically (based on the GitHub repository name). |
| 81 | + |
| 82 | +If you haven’t yet, enable GitHub Pages in your repo settings: |
| 83 | + |
| 84 | +- **Settings → Pages → Build and deployment → Source:** `Deploy from a branch` |
| 85 | +- **Branch:** `gh-pages` (root) |
48 | 86 |
|
49 | | -For end-to-end (e2e) testing, run: |
| 87 | +This repo includes a deploy script that builds for production and publishes `dist/kawaii-linktree/browser` via `gh-pages`: |
50 | 88 |
|
51 | 89 | ```bash |
52 | | -ng e2e |
| 90 | +npm run deploy |
53 | 91 | ``` |
54 | 92 |
|
55 | | -Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs. |
| 93 | +If you’re deploying to a different repo name / sub-path and using the manual script, update the `--base-href` in the `deploy` script in [package.json](package.json). |
56 | 94 |
|
57 | | -## Additional Resources |
58 | 95 |
|
59 | | -For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page. |
|
0 commit comments