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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,6 @@ pnpm-debug.log*
# storybook
*storybook.log
storybook-static

# rollup stats
stats.html
12 changes: 12 additions & 0 deletions .storybook/preview.ts → .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { withThemeByDataAttribute } from "@storybook/addon-themes";
import type { Preview } from "@storybook/react-vite";
// biome-ignore lint/correctness/noUnusedImports: We need to import React for Storybook previews
import React from "react";
import { FormProvider, useForm } from "react-hook-form";
import { themes } from "storybook/theming";

import "../src/styles/base.css";
Expand Down Expand Up @@ -35,6 +38,15 @@ const preview: Preview = {
},
defaultTheme: "white",
}),
(Story) => {
const form = useForm();

return (
<FormProvider {...form}>
<Story />
</FormProvider>
);
},
],
};

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ If you need help with your legal name change or gender marker change, come join
| `public` | Images, fonts, favicons, and app icons. |
| `src/components` | All of the .astro components that are used and reused across the site. |
| `src/constants` | Shared data for site info and colors. |
| `src/forms` | All PDFs and associated schema definitions. |
| `src/layouts` | Shared layout files for wrapping pages. |
| `src/pages` | Page-based routing for everything on the site. |
| `src/pdfs` | All PDF forms along with their schema definitions and tests. |
| `src/sanity` | Schemas and components used for Sanity, our CMS. |
| `src/styles` | Global site styles. |
| `src/utils` | Helper functions and other utilities. |
Expand Down
25 changes: 21 additions & 4 deletions astro.config.mjs → astro.config.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
import path from "node:path";
import cloudflare from "@astrojs/cloudflare";
import mdx from "@astrojs/mdx";
import react from "@astrojs/react";
import sitemap from "@astrojs/sitemap";
import sanity from "@sanity/astro";
import { defineConfig, passthroughImageService } from "astro/config";
import { visualizer } from "rollup-plugin-visualizer";

// https://github.com/withastro/astro/issues/12824
const alias = import.meta.env.PROD
? {
"react-dom/server": "react-dom/server.edge",
}
: undefined;

export default defineConfig({
output: "server",
adapter: cloudflare({
cloudflareModules: false,
imageService: "compile",
}),
image: {
Expand All @@ -34,10 +44,17 @@ export default defineConfig({
format: "file",
},
vite: {
ssr: {
external: ["buffer", "path", "fs", "os", "crypto", "async_hooks"].map(
(i) => `node:${i}`,
),
plugins: [
visualizer({
emitFile: true,
filename: "stats.html",
}),
],
resolve: {
alias: {
"@": path.resolve("src"),
...alias,
},
},
},
devToolbar: {
Expand Down
5 changes: 5 additions & 0 deletions biome.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
"!worker-configuration.d.ts"
]
},
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"formatter": {
"enabled": true,
"indentStyle": "space"
Expand Down
23 changes: 11 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"dev": "astro dev --open",
"start": "astro dev",
"build": "wrangler types && astro check && astro build",
"build:only": "astro build",
"preview": "wrangler types && astro preview",
"astro": "astro",
"lint": "biome lint",
Expand Down Expand Up @@ -39,6 +40,7 @@
"@astrojs/sitemap": "^3.6.0",
"@axe-core/playwright": "^4.11.0",
"@cantoo/pdf-lib": "^2.5.3",
"@maskito/core": "^4.0.1",
"@portabletext/types": "^3.0.0",
"@remixicon/react": "^4.7.0",
"@sanity/astro": "^3.2.10",
Expand All @@ -49,15 +51,14 @@
"@sanity/ui": "^3.1.11",
"@severo_bo/us-atlas-2023": "^4.0.0",
"astro": "5.16.0",
"astro-embed": "^0.9.2",
"astro-font": "^1.1.0",
"astro-github-file-loader": "^1.1.0",
"astro-portabletext": "^0.11.4",
"astro-portabletext": "^0.12.0",
"d3": "^7.9.0",
"d3-geo": "^3.1.1",
"d3-selection": "^3.0.0",
"dayjs": "^1.11.19",
"fathom-client": "^3.7.2",
"idb": "^8.0.3",
"language-name-map": "^0.3.0",
"markdown-it": "^14.1.0",
"postcss": "^8.5.6",
Expand All @@ -66,19 +67,19 @@
"react-dom": "^19.2.0",
"react-hook-form": "^7.66.1",
"react-is": "^19.2.0",
"react-player": "^3.4.0",
"react-lite-youtube-embed": "^3.3.2",
"rough-notation": "^0.5.1",
"sanitize-html": "^2.17.0",
"sanity": "^4.18.0",
"styled-components": "^6.1.19",
"topojson-client": "^3.1.0",
"typed-usa-states": "^2.1.0",
"typescript": "^5.9.3"
},
"devDependencies": {
"@biomejs/biome": "^2.3.7",
"@csstools/postcss-logical-viewport-units": "^3.0.4",
"@playwright/test": "^1.56.1",
"@playwright/test": "^1.57.0",
"@react-aria/test-utils": "1.0.0-beta.1",
"@sanity/cli": "^4.18.0",
"@storybook/addon-links": "^10.0.8",
"@storybook/addon-themes": "^10.0.8",
Expand All @@ -95,11 +96,11 @@
"@types/d3-selection": "^3.0.11",
"@types/geojson": "^7946.0.16",
"@types/node": "^24.10.1",
"@types/react": "^19.2.6",
"@types/react": "^19.2.7",
"@types/react-dom": "^19.2.3",
"@types/topojson-client": "^3.1.5",
"@types/topojson-specification": "^1.0.5",
"@vitest/coverage-v8": "4.0.13",
"@vitest/coverage-v8": "4.0.14",
"@vueless/storybook-dark-mode": "^10.0.3",
"autoprefixer": "^10.4.22",
"clsx": "^2.1.1",
Expand All @@ -108,15 +109,13 @@
"postcss-clamp": "^4.1.0",
"postcss-media-minmax": "^5.0.0",
"postcss-utopia": "^1.1.0",
"rollup-plugin-visualizer": "^6.0.5",
"sharp": "^0.34.5",
"storybook": "^10.0.8",
"vitest": "4.0.13",
"vitest": "4.0.14",
"wrangler": "^4.50.0"
},
"packageManager": "pnpm@10.23.0",
"overrides": {
"vite": "6.4.1"
},
"homepage": "https://namesake.fyi",
"bugs": {
"url": "https://github.com/namesakefyi/namesake.fyi/issues"
Expand Down
Loading