Skip to content

Commit 36f628b

Browse files
author
Public Sync Bot
committed
chore: public sync (squashed snapshot; exclude apps/api, packages/indexer)
0 parents  commit 36f628b

File tree

583 files changed

+46860
-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.

583 files changed

+46860
-0
lines changed

.cursorrules

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
You are a Senior Front-End Developer working on a social media platform. You are an expert in the technologies listed below. Your answers should be accurate, thoughtful, and well reasoned.
2+
3+
- Follow the user's requirements exactly.
4+
- Plan your solution step by step and describe it in detailed pseudocode.
5+
- Confirm the approach and then write the code.
6+
- Produce correct, bug-free code that follows the Code Implementation Guidelines.
7+
- Prioritize clarity and readability over micro-optimizations.
8+
- Implement all requested features completely.
9+
- Do not leave TODOs, placeholders, or incomplete sections.
10+
- Verify the code is finished before delivering it.
11+
- Include all required imports and use descriptive names for key components.
12+
- Be concise and minimize extra prose.
13+
- If a correct answer is unclear, state that there may not be one.
14+
- If you do not know the answer, say so rather than guessing.
15+
- Avoid code comments unless a function needs additional explanation.
16+
17+
### Tech Stack
18+
19+
The user may ask about any of these technologies:
20+
21+
- ReactJS
22+
- Vite
23+
- JavaScript
24+
- TypeScript
25+
- HeadlessUI
26+
- TailwindCSS
27+
- HTML
28+
- CSS
29+
- Apollo GraphQL
30+
- Radix
31+
- Hono
32+
- Prisma with Postgres
33+
- Zod
34+
- Zustand
35+
- Prosekit
36+
- Remark and Rehype
37+
38+
### Code Implementation Guidelines
39+
40+
Follow these rules when writing code:
41+
42+
- Use early returns whenever possible to improve readability.
43+
- In React, always export the default component at the end of the file.
44+
- Style elements only with Tailwind classes; do not use CSS or style tags.
45+
- Use descriptive names for variables and functions. Event handlers should start with `handle`, such as `handleClick` or `handleKeyDown`.
46+
- Add accessibility attributes to interactive elements. For example, a tag should include `tabindex="0"`, `aria-label`, `onClick`, and `onKeyDown`.
47+
- Prefer arrow functions to function declarations and define types when possible.
48+
49+
### Monorepo Management
50+
51+
- Use pnpm workspaces for managing the monorepo.
52+
- Keep packages isolated and manage dependencies carefully.
53+
- Share configurations and scripts where appropriate.
54+
- Follow the workspace structure defined in the root `package.json`.
55+
56+
### Error Handling and Validation
57+
58+
- Handle errors and edge cases first.
59+
- Use early returns for error conditions to avoid nesting.
60+
- Apply guard clauses to manage invalid states early.
61+
- Provide clear error logging and user-friendly messages.
62+
- Use custom error types or factories for consistency.
63+
64+
### State Management and Data Fetching
65+
66+
- Use Zustand for state management.
67+
- Use TanStack React Query for data fetching, caching, and synchronization.
68+
- Use Apollo Client for GraphQL operations.
69+
- Minimize `useEffect` and `setState`; prefer derived state and memoization when possible.
70+
71+
### TypeScript and Zod Usage
72+
73+
- Use TypeScript throughout the codebase; prefer interfaces for object shapes.
74+
- Name interfaces after their component. For example, `Account` should use `AccountProps`.
75+
- Use Zod for schema validation and type inference.
76+
- Avoid enums; prefer literal types or maps.
77+
- Write functional components with TypeScript interfaces for props.
78+
79+
### Code Style and Structure
80+
81+
- Write concise TypeScript code with accurate examples.
82+
- Use functional and declarative patterns; avoid classes.
83+
- Prefer iteration and modularization to avoid duplication.
84+
- Use camelCase for variables and functions.
85+
- Use uppercase for environment variables.
86+
- Start function names with a verb, such as `handleClick`, `handleKeyDown`, or `handleChange`.
87+
- Use verbs for boolean variables, for example `isLoading`, `hasError`, or `canDelete`.
88+
- Spell out words fully and use correct spelling.
89+
- Structure files with exported components, subcomponents, helpers, static content, and types.
90+
91+
### References
92+
93+
- [Lens Protocol Docs](https://lens.xyz/docs/protocol)
94+
- [Grove Storage Docs](https://lens.xyz/docs/storage)

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @bigint

.github/workflows/remove-codex.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Remove Codex Label
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened, labeled, synchronize]
6+
7+
permissions:
8+
pull-requests: write
9+
10+
jobs:
11+
cleanup:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/github-script@v7
15+
with:
16+
script: |
17+
const pr = context.payload.pull_request;
18+
const labels = pr.labels.map(label => label.name);
19+
core.info(`Found labels on PR: ${JSON.stringify(labels)}`);
20+
21+
const codexLabels = labels.filter(name => name.toLowerCase().includes('codex'));
22+
core.info(`Codex labels detected: ${JSON.stringify(codexLabels)}`);
23+
24+
if (codexLabels.length > 0) {
25+
for (const label of codexLabels) {
26+
try {
27+
await github.rest.issues.removeLabel({
28+
owner: context.repo.owner,
29+
repo: context.repo.repo,
30+
issue_number: pr.number,
31+
name: label,
32+
});
33+
core.info(`✅ Removed label: ${label}`);
34+
} catch (err) {
35+
core.warning(`❌ Failed to remove label "${label}": ${err.message}`);
36+
}
37+
}
38+
39+
try {
40+
await github.rest.pulls.update({
41+
owner: context.repo.owner,
42+
repo: context.repo.repo,
43+
pull_number: pr.number,
44+
body: '',
45+
});
46+
core.info('🧹 Cleared PR description.');
47+
} catch (err) {
48+
core.warning(`❌ Failed to clear PR description: ${err.message}`);
49+
}
50+
} else {
51+
core.info('No codex label found. Skipping description clear.');
52+
}

.github/workflows/test.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v5
14+
- uses: pnpm/action-setup@v2
15+
with:
16+
version: 10.4.1
17+
run_install: false
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version-file: '.nvmrc'
21+
cache: 'pnpm'
22+
- run: pnpm install --frozen-lockfile
23+
- run: pnpm test

.gitignore

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# dependencies
2+
node_modules
3+
.pnp
4+
.pnp.js
5+
6+
# testing
7+
coverage
8+
9+
# expo
10+
.expo/
11+
expo-env.d.ts
12+
credentials.json
13+
ios/
14+
android/
15+
*.ipa
16+
*.apk
17+
18+
# misc
19+
.DS_Store
20+
*.pem
21+
.eslintcache
22+
23+
# debug
24+
npm-debug.log*
25+
yarn-debug.log*
26+
yarn-error.log*
27+
.pnpm-debug.log*
28+
29+
# local env files
30+
.env.local
31+
.env.development.local
32+
.env.test.local
33+
.env.production.local
34+
.env
35+
36+
# typescript
37+
*.tsbuildinfo
38+
39+
# JetBrains IDE
40+
.idea
41+
42+
# Node build artifacts
43+
dist
44+
node-compile-cache/

.husky/pre-commit

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
pnpm run biome:check
2+
pnpm typecheck

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20

.vscode/extensions.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"recommendations": [
3+
"formulahendry.auto-close-tag",
4+
"mikestead.dotenv",
5+
"biomejs.biome",
6+
"GitHub.github-vscode-theme",
7+
"mquandalle.graphql",
8+
"PKief.material-icon-theme",
9+
"Prisma.prisma",
10+
"christian-kohler.npm-intellisense",
11+
"bradlc.vscode-tailwindcss",
12+
"yzhang.markdown-all-in-one",
13+
"yoavbls.pretty-ts-errors"
14+
]
15+
}

.vscode/settings.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"[javascript]": {
3+
"editor.defaultFormatter": "biomejs.biome"
4+
},
5+
"[json]": {
6+
"editor.defaultFormatter": "biomejs.biome"
7+
},
8+
"[markdown]": {
9+
"editor.defaultFormatter": "DavidAnson.vscode-markdownlint"
10+
},
11+
"[solidity]": {
12+
"editor.defaultFormatter": "NomicFoundation.hardhat-solidity",
13+
"editor.tabSize": 1
14+
},
15+
"[typescript]": {
16+
"editor.defaultFormatter": "biomejs.biome"
17+
},
18+
"[typescriptreact]": {
19+
"editor.defaultFormatter": "biomejs.biome"
20+
},
21+
"editor.codeActionsOnSave": {
22+
"source.fixAll.biome": "explicit"
23+
},
24+
"editor.defaultFormatter": "biomejs.biome",
25+
"editor.fontFamily": "MonoLisa, Menlo, Monaco, 'Courier New', monospace",
26+
"editor.fontSize": 12,
27+
"editor.formatOnSave": true,
28+
"editor.insertSpaces": true,
29+
"editor.lineHeight": 2.3,
30+
"editor.tabSize": 2,
31+
"git.autofetch": true,
32+
"git.confirmSync": false,
33+
"git.enableSmartCommit": true,
34+
"search.exclude": {
35+
"**/node_modules": true
36+
}
37+
}

AGENTS.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Repository Agent Guidelines
2+
3+
This project uses the coding and collaboration rules defined in `.cursorrules`.
4+
5+
## General Principles
6+
7+
- Implement requests thoroughly and adhere strictly to the requirements.
8+
- Plan solutions carefully before writing any code.
9+
- Produce clean, functional code that follows best practices.
10+
- Prioritize readability over performance and avoid duplication.
11+
- Include all required imports and use clear, descriptive names.
12+
- Remove placeholders or incomplete sections before committing.
13+
14+
## Tech Stack
15+
16+
- React with Vite and TypeScript
17+
- HeadlessUI, Tailwind CSS, and Radix
18+
- Apollo GraphQL with Hono
19+
- Prisma with Postgres
20+
- Zustand and TanStack React Query
21+
- Zod for validation
22+
- Prosekit with Remark and Rehype
23+
24+
## Implementation Guidelines
25+
26+
- Use early returns and guard clauses.
27+
- Export default React components at the end of each file.
28+
- Style elements exclusively with Tailwind classes.
29+
- Name event handlers with a `handle` prefix (e.g., `handleClick`).
30+
- Add accessibility attributes like `tabIndex`, `aria-label`, and keyboard handlers.
31+
- Prefer arrow functions and define types or interfaces for props.
32+
- Place files in pnpm workspaces and keep packages isolated.
33+
- Handle errors early with custom error types when appropriate.
34+
- Favor derived state and memoization over excessive `useEffect`.
35+
- Use interfaces for props and avoid enums, preferring literal types.
36+
- Follow camelCase naming and use verbs for boolean flags.
37+
- Organize exports, subcomponents, helpers, static content, and types within files.
38+
39+
## References
40+
41+
- [Lens Protocol Documentation](https://lens.xyz/docs/protocol)
42+
- [Grove Storage Documentation](https://lens.xyz/docs/storage)
43+
44+
## Required Commands
45+
46+
Run these commands before committing:
47+
48+
- `pnpm biome:check`
49+
- `pnpm typecheck`
50+
- `pnpm build`
51+
- `pnpm test`
52+
53+
## PR Instructions
54+
55+
- Use a conventional commit message for the title.
56+
- Example: `feat: allow provided config object to extend other configs`.
57+
- Keep the title under 50 characters.

0 commit comments

Comments
 (0)