11# CLAUDE.md - SecureChain Frontend Project Context
22
33> ** ⚠️ IMPORTANT GUIDELINES FOR THIS FILE:**
4+ >
45> - ** Maximum length:** 500 lines
56> - ** Include only relevant context** for current development needs
67> - ** Remove outdated or unused sections** regularly
@@ -274,7 +275,7 @@ function MyComponent() {
274275## 🗄️ State Management
275276
276277- ** PackageContext** - Global package state
277- - ** AuthProvider** - Authentication state
278+ - ** AuthProvider** - Authentication state
278279- ** ThemeProvider** - Theme state
279280- ** Local Storage Keys:** ` user_email ` , ` theme ` , ` locale ` , ` home-active-tab `
280281
@@ -372,9 +373,9 @@ The backend exposes **two separate endpoints** for graph expansion:
372373
373374``` typescript
374375interface GraphNode {
375- id: string // PURL format
376- label: string // Package name or version
377- type: string // PyPIPackage, NPMPackage, Version, etc.
376+ id: string // PURL format
377+ label: string // Package name or version
378+ type: string // PyPIPackage, NPMPackage, Version, etc.
378379 props: {
379380 name: string
380381 purl: string
@@ -389,12 +390,12 @@ interface GraphNode {
389390}
390391
391392interface GraphEdge {
392- id: string // Format: {source}_{type}_{target}
393- source: string // Node ID
394- target: string // Node ID
395- type: string // HAVE or DEPENDS_ON
393+ id: string // Format: {source}_{type}_{target}
394+ source: string // Node ID
395+ target: string // Node ID
396+ type: string // HAVE or DEPENDS_ON
396397 props? : {
397- constraints? : string // Version constraints
398+ constraints? : string // Version constraints
398399 parent_version_name? : string
399400 }
400401}
@@ -434,23 +435,27 @@ if (node.type === 'Version') {
434435## 🛠️ Quick Guide for AI Agents
435436
436437### Adding a new feature:
438+
4374391 . Create types in ` /types/NewFeature.ts `
4384402 . Create hooks in ` /hooks/api/useNewFeature.ts `
4394413 . Create components in ` /components/feature/newfeature/ `
4404424 . Add routes in ` /app/[locale]/newfeature/ `
4414435 . Add translations in ` /public/locales/{en,es}/newfeature.json `
442444
443445### Modifying UI:
446+
4444471 . Check ` /components/ui/ ` for existing components
4454482 . Add with shadcn if needed: ` npx shadcn-ui@latest add [component] `
4464493 . Use Tailwind for styling
447450
448451### Adding endpoints:
452+
4494531 . Define in ` /constants/apiEndpoints.ts `
4504542 . Create type in ` /types/ `
4514553 . Create hook in ` /hooks/api/ `
452456
453457### Debugging:
458+
454459- Check ` /lib/config/config.ts ` for env vars
455460- Review ` middleware.ts ` for auth issues
456461- Browser console and Network tab for API calls
0 commit comments