|
1 | | -This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app). |
| 1 | +# Hashstack Landing Page |
2 | 2 |
|
3 | | -## Getting Started |
| 3 | +The marketing/landing page for [hashstack.finance](https://hashstack.finance), built with Next.js 15 and deployed to GitHub Pages. |
4 | 4 |
|
5 | | -First, run the development server: |
| 5 | +--- |
| 6 | + |
| 7 | +## Tech Stack |
| 8 | + |
| 9 | +| Tool | Version | Purpose | |
| 10 | +|---|---|---| |
| 11 | +| Next.js | 15.x | Framework (static export) | |
| 12 | +| React | 19.x | UI | |
| 13 | +| TypeScript | 5.x | Language | |
| 14 | +| Tailwind CSS | 4.x | Styling | |
| 15 | +| Yarn | - | Package manager (CI) | |
| 16 | +| Bun | - | Package manager (local dev) | |
| 17 | + |
| 18 | +--- |
| 19 | + |
| 20 | +## Local Development |
6 | 21 |
|
7 | 22 | ```bash |
8 | | -npm run dev |
9 | | -# or |
10 | | -yarn dev |
11 | | -# or |
12 | | -pnpm dev |
13 | | -# or |
| 23 | +# Install dependencies |
| 24 | +bun install |
| 25 | + |
| 26 | +# Start dev server (with Turbopack) |
14 | 27 | bun dev |
15 | 28 | ``` |
16 | 29 |
|
17 | | -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. |
| 30 | +Open [http://localhost:3000](http://localhost:3000). The page auto-reloads on file changes. |
| 31 | + |
| 32 | +> **Note:** CI uses `yarn`. Locally, `bun` is preferred for speed. Both work. |
| 33 | +
|
| 34 | +--- |
| 35 | + |
| 36 | +## Build |
| 37 | + |
| 38 | +The project is configured as a **static export** (`output: 'export'` in `next.config.js`). Running build generates a fully static site in `./out/`. |
| 39 | + |
| 40 | +```bash |
| 41 | +bun run build |
| 42 | +# Output: ./out/ |
| 43 | +``` |
| 44 | + |
| 45 | +--- |
| 46 | + |
| 47 | +## Deployment |
| 48 | + |
| 49 | +### Hosting: GitHub Pages |
| 50 | + |
| 51 | +The site is hosted on **GitHub Pages** at [hashstack.finance](https://hashstack.finance) via a custom domain. |
| 52 | + |
| 53 | +### Deployment Branch |
| 54 | + |
| 55 | +| Branch | Purpose | |
| 56 | +|---|---| |
| 57 | +| `prod-github-pages` | **Production** — pushes here trigger a live deployment | |
| 58 | +| `production` | Legacy branch (was used for old AWS S3/CloudFront deployment — do not use) | |
| 59 | + |
| 60 | +### CI/CD Workflow |
| 61 | + |
| 62 | +File: [`.github/workflows/deploy.yml`](.github/workflows/deploy.yml) |
| 63 | + |
| 64 | +Triggered automatically on every push to `prod-github-pages`. Can also be triggered manually via GitHub Actions → **Run workflow**. |
| 65 | + |
| 66 | +**Pipeline steps:** |
| 67 | +1. **Build job** — Checks out code, installs dependencies with `yarn`, runs `yarn build`, uploads `./out` as a Pages artifact |
| 68 | +2. **Deploy job** — Takes the artifact and deploys it to GitHub Pages |
| 69 | + |
| 70 | +``` |
| 71 | +push to prod-github-pages |
| 72 | + ↓ |
| 73 | + [build job] |
| 74 | + yarn install → yarn build → upload ./out |
| 75 | + ↓ |
| 76 | + [deploy job] |
| 77 | + deploy artifact → hashstack.finance live |
| 78 | +``` |
| 79 | + |
| 80 | +### How to Deploy |
| 81 | + |
| 82 | +```bash |
| 83 | +# Make your changes on any branch, then: |
| 84 | +git checkout prod-github-pages |
| 85 | +git merge <your-branch> |
| 86 | +git push origin prod-github-pages |
| 87 | +# GitHub Actions picks it up automatically (~1-2 min) |
| 88 | +``` |
| 89 | + |
| 90 | +Monitor deployment at: `https://github.com/0xHashstack/hstk-landing/actions` |
| 91 | + |
| 92 | +### GitHub Pages Settings |
| 93 | + |
| 94 | +- **Source:** GitHub Actions (not the legacy branch/folder method) |
| 95 | +- **Custom domain:** `hashstack.finance` |
| 96 | +- **HTTPS:** Enforced |
| 97 | +- **Repository:** Settings → Pages |
18 | 98 |
|
19 | | -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. |
| 99 | +> The `public/CNAME` file contains `hashstack.finance` — this is required for the custom domain to persist across deployments. |
20 | 100 |
|
21 | | -This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel. |
| 101 | +--- |
| 102 | + |
| 103 | +## DNS Configuration |
| 104 | + |
| 105 | +DNS is managed on **Namecheap** (migrated from AWS Route 53 in March 2025). |
| 106 | + |
| 107 | +| Record | Type | Value | |
| 108 | +|---|---|---| |
| 109 | +| `hashstack.finance` | A | `185.199.108/109/110/111.153` (GitHub Pages) | |
| 110 | +| `www` | CNAME | `0xhashstack.github.io` | |
| 111 | +| `app` | A | `185.199.108/109/110/111.153` (GitHub Pages) | |
| 112 | +| `token` | CNAME | `d1cb12cmfm8zq3.cloudfront.net` | |
| 113 | +| `docs` | CNAME | `8032f16d47-hosting.gitbook.io` | |
| 114 | +| `status` | CNAME | `statuspage.betteruptime.com` | |
| 115 | + |
| 116 | +**Nameservers:** `dns1.registrar-servers.com` / `dns2.registrar-servers.com` (Namecheap BasicDNS) |
| 117 | + |
| 118 | +**Mail:** Configured via Namecheap Mail Settings → Gmail (Google Workspace MX records auto-managed). |
| 119 | + |
| 120 | +--- |
| 121 | + |
| 122 | +## Repository Structure |
| 123 | + |
| 124 | +``` |
| 125 | +hstk-landing/ |
| 126 | +├── app/ # Next.js App Router pages and layouts |
| 127 | +├── components/ # Reusable UI components |
| 128 | +├── public/ |
| 129 | +│ └── CNAME # Custom domain for GitHub Pages (do not delete) |
| 130 | +├── .github/ |
| 131 | +│ └── workflows/ |
| 132 | +│ ├── deploy.yml # Production deployment (GitHub Pages) |
| 133 | +│ └── staging-deploy.yml # Legacy staging (AWS S3 — unused) |
| 134 | +├── next.config.js # Static export config |
| 135 | +└── package.json |
| 136 | +``` |
22 | 137 |
|
23 | | -## Learn More |
| 138 | +--- |
24 | 139 |
|
25 | | -To learn more about Next.js, take a look at the following resources: |
| 140 | +## Environment / Secrets |
26 | 141 |
|
27 | | -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. |
28 | | -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. |
| 142 | +No environment variables or secrets are required for the current GitHub Pages deployment. The site is fully static. |
29 | 143 |
|
30 | | -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome! |
| 144 | +> The legacy AWS deployment used `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` GitHub secrets — these are no longer needed and can be removed from repository settings. |
31 | 145 |
|
32 | | -## Deploy on Vercel |
| 146 | +--- |
33 | 147 |
|
34 | | -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. |
| 148 | +## Infrastructure Notes (for handover) |
35 | 149 |
|
36 | | -Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details. |
| 150 | +- **AWS:** All AWS hosting resources (CloudFront, S3, API Gateway, ECR) have been decommissioned as of March 2025. |
| 151 | +- **Previous hosting:** The site was previously hosted on AWS S3 + CloudFront (`www.hashstack.finance`). The `production` branch still has the old AWS deploy workflow but it is no longer triggered. |
| 152 | +- **Token page:** `token.hashstack.finance` still uses a separate CloudFront distribution pointing to an S3 bucket (`token.hashstack.finance` S3). This is independent of the landing page deployment. |
| 153 | +- **App:** `app.hashstack.finance` is served by GitHub Pages (same GitHub Pages setup, different subdomain A records in Namecheap DNS). |
0 commit comments