Skip to content

Commit 21ea7a1

Browse files
committed
Initial commit
0 parents  commit 21ea7a1

File tree

131 files changed

+8365
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+8365
-0
lines changed

.cursorrules

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
Code Style and Structure:
2+
- Write concise, technical TypeScript code with accurate examples
3+
- Use functional and declarative programming patterns; avoid classes
4+
- Prefer iteration and modularization over code duplication
5+
- Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError)
6+
- Structure files: exported component, subcomponents, helpers, static content, types
7+
8+
Naming Conventions:
9+
- Use lowercase with dashes for directories (e.g., components/auth-wizard)
10+
- Favor named exports for components
11+
12+
TypeScript Usage:
13+
- Use TypeScript for all code; prefer interfaces over types
14+
- Avoid enums; use maps instead
15+
- Use functional components with TypeScript interfaces
16+
17+
Syntax and Formatting:
18+
- Use the "function" keyword for pure functions
19+
- Avoid unnecessary curly braces in conditionals; use concise syntax for simple statements
20+
- Use declarative JSX
21+
22+
Error Handling and Validation:
23+
- Prioritize error handling: handle errors and edge cases early
24+
- Use early returns and guard clauses
25+
- Implement proper error logging and user-friendly messages
26+
- Use Zod for form validation
27+
- Model expected errors as return values in Server Actions
28+
- Use error boundaries for unexpected errors
29+
30+
UI and Styling:
31+
- Use Shadcn UI, Radix, and Tailwind Aria for components and styling
32+
- Implement responsive design with Tailwind CSS; use a mobile-first approach
33+
34+
Performance Optimization:
35+
- Minimize 'use client', 'useEffect', and 'setState'; favor React Server Components (RSC)
36+
- Wrap client components in Suspense with fallback
37+
- Use dynamic loading for non-critical components
38+
- Optimize images: use WebP format, include size data, implement lazy loading
39+
40+
Key Conventions:
41+
- Use 'nuqs' for URL search parameter state management
42+
- Optimize Web Vitals (LCP, CLS, FID)
43+
- Limit 'use client':
44+
- Favor server components and Next.js SSR
45+
- Use only for Web API access in small components
46+
- Avoid for data fetching or state management
47+
48+
Follow Next.js docs for Data Fetching, Rendering, and Routing

.github/workflows/check.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Check
2+
on:
3+
push:
4+
paths:
5+
- '**'
6+
jobs:
7+
check:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: oven-sh/setup-bun@v1
12+
with:
13+
bun-version: latest
14+
- name: Install dependencies
15+
run: bun install
16+
- name: 🔦 Run linter
17+
run: bun run lint
18+
- name: 🪐 Check TypeScript
19+
run: bun run typecheck

.gitignore

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
node_modules
5+
.pnp
6+
.pnp.js
7+
8+
# testing
9+
coverage
10+
11+
# next.js
12+
.next/
13+
out/
14+
next-env.d.ts
15+
16+
# expo
17+
.expo/
18+
dist/
19+
20+
# production
21+
build
22+
23+
# misc
24+
.DS_Store
25+
*.pem
26+
27+
# debug
28+
npm-debug.log*
29+
yarn-debug.log*
30+
yarn-error.log*
31+
.pnpm-debug.log*
32+
33+
# local env files
34+
.env
35+
.env*.local
36+
37+
# vercel
38+
.vercel
39+
40+
# typescript
41+
*.tsbuildinfo
42+
43+
# turbo
44+
.turbo
45+
46+
# react-email
47+
.react-email
48+
packages/email/public
49+
!packages/email/public/.gitkeep
50+
!packages/email/.react-email/.gitkeep
51+
52+
# Storybook
53+
storybook-static
54+
tailwind.css

.vscode/settings.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"editor.defaultFormatter": "biomejs.biome",
3+
"[javascript]": {
4+
"editor.defaultFormatter": "biomejs.biome"
5+
},
6+
"[typescript]": {
7+
"editor.defaultFormatter": "biomejs.biome"
8+
},
9+
"[typescriptreact]": {
10+
"editor.defaultFormatter": "biomejs.biome"
11+
},
12+
"editor.codeActionsOnSave": {
13+
"quickfix.biome": "explicit",
14+
"source.organizeImports.biome": "explicit"
15+
},
16+
"editor.formatOnSave": true,
17+
"typescript.enablePromptUseWorkspaceTsdk": true,
18+
"typescript.tsdk": "node_modules/typescript/lib",
19+
"typescript.preferences.autoImportFileExcludePatterns": [
20+
"next/router.d.ts",
21+
"next/dist/client/router.d.ts"
22+
],
23+
"terminal.integrated.localEchoStyle": "dim",
24+
"search.exclude": {
25+
"**/node_modules": true
26+
}
27+
}

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2024 Midday Labs AB.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)