Skip to content

Commit 0b83823

Browse files
authored
Merge pull request #5 from cornell-dti/annie/setup-design-system
Design System Setup
2 parents bdfbd52 + 3a47b7f commit 0b83823

59 files changed

Lines changed: 8014 additions & 138 deletions

Some content is hidden

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

.cursor/rules/frontend/figma.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
## Figma MCP Integration Rules
2+
3+
These rules define how to translate Figma inputs into code for this project and must be followed for every Figma-driven change.
4+
5+
### Required flow (do not skip)
6+
7+
1. Run get_design_context first to fetch the structured representation for the exact node(s).
8+
2. If the response is too large or truncated, run get_metadata to get the high‑level node map and then re‑fetch only the required node(s) with get_design_context.
9+
3. Run get_screenshot for a visual reference of the node variant being implemented.
10+
4. Only after you have both get_design_context and get_screenshot, download any assets needed and start implementation.
11+
5. Translate the output (usually React + Tailwind) into this project’s conventions, styles and framework.  Reuse the project’s color tokens, components, and typography wherever possible.
12+
6. Validate against Figma for 1:1 look and behavior before marking complete.
13+
14+
### Implementation rules
15+
16+
- Treat the Figma MCP output (React + Tailwind) as a representation of design and behavior, not as final code style.
17+
- Replace Tailwind utility classes with the project’s preferred utilities/design‑system tokens when applicable.
18+
- Reuse existing components (e.g., buttons, inputs, typography, icon wrappers) instead of duplicating functionality.
19+
- Use the project’s color system, typography scale, and spacing tokens consistently.
20+
- Respect existing routing, state management, and data‑fetch patterns already adopted in the repo.
21+
- Strive for 1:1 visual parity with the Figma design. When conflicts arise, prefer design‑system tokens and adjust spacing or sizes minimally to match visuals.
22+
- Validate the final UI against the Figma screenshot for both look and behavior.
23+
24+
### Figma MCP server rules
25+
26+
  - The Figma MCP server provides an assets endpoint which can serve image and SVG assets
27+
  - IMPORTANT: If the Figma MCP server returns a localhost source for an image or an SVG, use that image or SVG source directly
28+
  - IMPORTANT: DO NOT import/add new icon packages, all the assets should be in the Figma payload
29+
  - IMPORTANT: do NOT use or create placeholders if a localhost source is provided

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,5 @@ jobs:
1616
run: bun run type-check
1717
- name: Lint check
1818
run: bun run lint
19+
- name: Format check
20+
run: bun run format:check

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@ dist-ssr
2222
*.njsproj
2323
*.sln
2424
*.sw?
25+
26+
# AI
27+
CLAUDE.md

.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
dist
3+
pnpm-lock.yaml
4+
convex/_generated

.prettierrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"semi": true,
3+
"singleQuote": false,
4+
"trailingComma": "all",
5+
"printWidth": 80,
6+
"tabWidth": 2,
7+
"plugins": ["prettier-plugin-tailwindcss"]
8+
}

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ If you are developing a production application, we recommend updating the config
1717

1818
```js
1919
export default defineConfig([
20-
globalIgnores(['dist']),
20+
globalIgnores(["dist"]),
2121
{
22-
files: ['**/*.{ts,tsx}'],
22+
files: ["**/*.{ts,tsx}"],
2323
extends: [
2424
// Other configs...
2525

@@ -34,40 +34,40 @@ export default defineConfig([
3434
],
3535
languageOptions: {
3636
parserOptions: {
37-
project: ['./tsconfig.node.json', './tsconfig.app.json'],
37+
project: ["./tsconfig.node.json", "./tsconfig.app.json"],
3838
tsconfigRootDir: import.meta.dirname,
3939
},
4040
// other options...
4141
},
4242
},
43-
])
43+
]);
4444
```
4545

4646
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
4747

4848
```js
4949
// eslint.config.js
50-
import reactX from 'eslint-plugin-react-x'
51-
import reactDom from 'eslint-plugin-react-dom'
50+
import reactX from "eslint-plugin-react-x";
51+
import reactDom from "eslint-plugin-react-dom";
5252

5353
export default defineConfig([
54-
globalIgnores(['dist']),
54+
globalIgnores(["dist"]),
5555
{
56-
files: ['**/*.{ts,tsx}'],
56+
files: ["**/*.{ts,tsx}"],
5757
extends: [
5858
// Other configs...
5959
// Enable lint rules for React
60-
reactX.configs['recommended-typescript'],
60+
reactX.configs["recommended-typescript"],
6161
// Enable lint rules for React DOM
6262
reactDom.configs.recommended,
6363
],
6464
languageOptions: {
6565
parserOptions: {
66-
project: ['./tsconfig.node.json', './tsconfig.app.json'],
66+
project: ["./tsconfig.node.json", "./tsconfig.app.json"],
6767
tsconfigRootDir: import.meta.dirname,
6868
},
6969
// other options...
7070
},
7171
},
72-
])
72+
]);
7373
```

ai/data/dummy_data.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,4 @@
8989
"location": "New York City",
9090
"tags": ["program", "first-year", "professional-track"]
9191
}
92-
]
92+
]

ai/prompts/clubSummary.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ Here are the events for this club (JSON):
2222
\`\`\`json
2323
${JSON.stringify(events, null, 2)}
2424
\`\`\`
25-
`
26-
}
25+
`;
26+
}

ai/prompts/weeklySummary.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@ Now write the digest based on this JSON:
4444
\`\`\`json
4545
${JSON.stringify(events, null, 2)}
4646
\`\`\`
47-
`
48-
}
47+
`;
48+
}

ai/summarize.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import { GoogleGenAI } from "@google/genai";
22

33
const ai = new GoogleGenAI({
4-
apiKey: process.env.GEMINI_API_KEY,
5-
})
4+
apiKey: process.env.GEMINI_API_KEY,
5+
});
66

77
export async function generateSummary(prompt: string) {
88
const res = await ai.models.generateContent({
99
model: "gemini-2.5-flash",
10-
contents: prompt
11-
})
10+
contents: prompt,
11+
});
1212

13-
return res.text
14-
}
13+
return res.text;
14+
}

0 commit comments

Comments
 (0)