From 479f489e103e5b799bb9f2f3e42c81f278eb2ca8 Mon Sep 17 00:00:00 2001 From: Christian Cito <30470476+chrcit@users.noreply.github.com> Date: Sat, 16 Nov 2024 14:48:50 +0100 Subject: [PATCH] initial commit --- .cursorrules | 79 + .eslintrc.cjs | 84 + .gitignore | 5 + .prettierrc | 5 + .vscode/extensions.json | 7 + .vscode/settings.json | 3 + README.md | 30 + app/config.ts | 34 + app/entry.client.tsx | 18 + app/entry.server.tsx | 140 + app/lib/plausible.ts | 36 + app/root.tsx | 89 + app/routes/[robots.txt].tsx | 25 + app/routes/[sitemap.xml].tsx | 39 + app/routes/[webmanifest.json].tsx | 32 + app/routes/_index.tsx | 59 + app/routes/api.event.ts | 32 + app/routes/js.[script.js].ts | 12 + app/tailwind.css | 7 + docs/replicate.md | 95 + eslint.config.js | 14 + package.json | 52 + pnpm-lock.yaml | 7683 +++++++++++++++++++++++++++++ postcss.config.js | 6 + public/favicon.ico | Bin 0 -> 16958 bytes tailwind.config.ts | 22 + tsconfig.json | 32 + vite.config.ts | 24 + 28 files changed, 8664 insertions(+) create mode 100644 .cursorrules create mode 100644 .eslintrc.cjs create mode 100644 .gitignore create mode 100644 .prettierrc create mode 100644 .vscode/extensions.json create mode 100644 .vscode/settings.json create mode 100644 README.md create mode 100644 app/config.ts create mode 100644 app/entry.client.tsx create mode 100644 app/entry.server.tsx create mode 100644 app/lib/plausible.ts create mode 100644 app/root.tsx create mode 100644 app/routes/[robots.txt].tsx create mode 100644 app/routes/[sitemap.xml].tsx create mode 100644 app/routes/[webmanifest.json].tsx create mode 100644 app/routes/_index.tsx create mode 100644 app/routes/api.event.ts create mode 100644 app/routes/js.[script.js].ts create mode 100644 app/tailwind.css create mode 100644 docs/replicate.md create mode 100644 eslint.config.js create mode 100644 package.json create mode 100644 pnpm-lock.yaml create mode 100644 postcss.config.js create mode 100644 public/favicon.ico create mode 100644 tailwind.config.ts create mode 100644 tsconfig.json create mode 100644 vite.config.ts diff --git a/.cursorrules b/.cursorrules new file mode 100644 index 0000000..1149956 --- /dev/null +++ b/.cursorrules @@ -0,0 +1,79 @@ +You are an expert in modern full-stack development with Typescript, React, Remix, TailwindCSS. +You are thoughtful, give nuanced answers, and are brilliant at reasoning. You carefully provide accurate, factual, thoughtful answers. + +# Technologies + +- Typescript for frontend and backend +- React for frontend +- Remix for Backend for frontend +- TailwindCSS for styling +- Radix UI for accessible UI components +- Github Actions for CI/CD +- pnpm for package manager + +# Guidelines + +## Communication + +- Ask questions when you need to, don't make assumptions. +- Summarize your changes distinctly and ask follow up questions. +- Fully implement all requested functionality. +- Leave NO todo’s, placeholders or missing pieces. +- Ensure code is complete! Verify thoroughly finalised. + +## Documentation + +- Suggest adding/extending/modifying documentation in a root `docs/` folder +- Create user flow diagrams for complex interactions. + +## Javascript/Typescript + +- Utilize Typescript and avoid using any! +- Prefer types over interfaces +- Prefer object params for a function in most cases (except when there is only 1 param) +- kebab-case for filenames and folder-names +- camelCase for functions and variables +- PascalCase for React component functions +- Handle errors and edge cases gracefully +- Use typed error responses +- Add sensible logging where appropriate +- Use `const` for immutable variables. +- Use template strings for string interpolation. +- Use functional and declarative programming patterns; avoid classes. +- Avoid enums; use maps instead. + +## React + +- Write functional components +- Don't use `React.FC` +- Don't add too much boilerplate to the components – keep it clean +- Inline component prop types if they are used only once +- Always add loading and error states to data fetching components +- Use Error Boundaries for React component error catching (in Remix) + +## Accessibility + +- Use semantic elements (e.g.,
,
,