Skip to content

Commit ef979cb

Browse files
CopilotStarefossen
andcommitted
Fix code formatting for prerequisites changes
Co-authored-by: Starefossen <968267+Starefossen@users.noreply.github.com>
1 parent 3e09b1e commit ef979cb

3 files changed

Lines changed: 56 additions & 18 deletions

File tree

docs/CODE_ANALYSIS.md

Lines changed: 40 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,18 @@ The Cloud Native Days Norway website codebase consists of approximately **281,02
4343

4444
### Main Categories (Top 10)
4545

46-
| Rank | Category | Lines | Percentage | Files | Description |
47-
|------|----------|-------|------------|-------|-------------|
48-
| 1 | Business Logic | 74,705 | 26.6% | 46 | Badge generation, email logic, authentication |
49-
| 2 | UI Components | 72,743 | 25.9% | 322 | Admin UI and public React components |
50-
| 3 | Storybook | 38,040 | 13.5% | 179 | Component stories for design system |
51-
| 4 | Tests | 20,796 | 7.4% | 86 | Unit and integration tests |
52-
| 5 | Utilities | 18,457 | 6.6% | 151 | Helper functions and shared utilities |
53-
| 6 | API | 12,106 | 4.3% | 47 | tRPC routers and REST endpoints |
54-
| 7 | UI Pages | 11,453 | 4.1% | 70 | Next.js App Router pages and layouts |
55-
| 8 | Documentation | 6,668 | 2.4% | 24 | Markdown documentation files |
56-
| 9 | Other | 5,458 | 1.9% | 64 | Miscellaneous files |
57-
| 10 | Data Schemas | 5,446 | 1.9% | 40 | Sanity schemas and validation |
46+
| Rank | Category | Lines | Percentage | Files | Description |
47+
| ---- | -------------- | ------ | ---------- | ----- | --------------------------------------------- |
48+
| 1 | Business Logic | 74,705 | 26.6% | 46 | Badge generation, email logic, authentication |
49+
| 2 | UI Components | 72,743 | 25.9% | 322 | Admin UI and public React components |
50+
| 3 | Storybook | 38,040 | 13.5% | 179 | Component stories for design system |
51+
| 4 | Tests | 20,796 | 7.4% | 86 | Unit and integration tests |
52+
| 5 | Utilities | 18,457 | 6.6% | 151 | Helper functions and shared utilities |
53+
| 6 | API | 12,106 | 4.3% | 47 | tRPC routers and REST endpoints |
54+
| 7 | UI Pages | 11,453 | 4.1% | 70 | Next.js App Router pages and layouts |
55+
| 8 | Documentation | 6,668 | 2.4% | 24 | Markdown documentation files |
56+
| 9 | Other | 5,458 | 1.9% | 64 | Miscellaneous files |
57+
| 10 | Data Schemas | 5,446 | 1.9% | 40 | Sanity schemas and validation |
5858

5959
### Visual Distribution
6060

@@ -89,11 +89,13 @@ Types █ 0.0%
8989
The business logic category is dominated by the OpenBadges implementation, which includes the full specification and credential schemas.
9090

9191
**Subcategories:**
92+
9293
- **Badge Generation** (71,741 lines - 96.0%): OpenBadges specification, schemas, and badge generation logic
9394
- **Email Logic** (2,179 lines - 2.9%): Email templates and sending functionality
9495
- **Authentication** (785 lines - 1.1%): NextAuth.js configuration and helpers
9596

9697
**Largest Files:**
98+
9799
- `src/lib/openbadges/spec/spec-e-schema.md` - 61,042 lines (OpenBadges specification)
98100
- `src/lib/openbadges/schema/json/ob_v3p0_achievementcredential_schema.json` - 3,564 lines
99101
- `src/lib/openbadges/spec/spec-d-examples.md` - 1,713 lines
@@ -107,11 +109,13 @@ The business logic category is dominated by the OpenBadges implementation, which
107109
React components for both the admin interface and public-facing pages.
108110

109111
**Subcategories:**
112+
110113
- **Admin UI** (42,362 lines - 58.2%): Admin dashboard, proposal management, schedule editor, sponsor management, CRM pipeline
111114
- **React Components** (29,692 lines - 40.8%): Public-facing UI components, speaker cards, program views
112115
- **UI Utilities** (689 lines - 0.9%): Shared component helpers
113116

114117
**Largest Files:**
118+
115119
- `src/components/admin/MemeGenerator.tsx` - 1,105 lines
116120
- `src/components/admin/schedule/DroppableTrack.tsx` - 1,041 lines
117121
- `src/components/travel-support/TravelSupportAdminPage.tsx` - 974 lines
@@ -125,9 +129,11 @@ React components for both the admin interface and public-facing pages.
125129
Storybook component stories for design system documentation and component development.
126130

127131
**Subcategories:**
132+
128133
- **Component Stories** (38,040 lines - 100%): Interactive component documentation and examples
129134

130135
**Largest Files:**
136+
131137
- `src/docs/SponsorSystem.stories.tsx` - 1,062 lines
132138
- `src/docs/design-system/examples/ConferenceLandingPage.stories.tsx` - 883 lines
133139
- `src/docs/design-system/examples/AdminPages.stories.tsx` - 747 lines
@@ -143,6 +149,7 @@ Storybook component stories for design system documentation and component develo
143149
Helper functions, shared logic, and utility modules used throughout the application.
144150

145151
**Largest Files:**
152+
146153
- `src/lib/dashboard/widget-registry.ts` - 812 lines
147154
- `src/lib/sponsor-crm/contract-pdf.tsx` - 569 lines
148155
- `src/lib/slack/weeklyUpdate.ts` - 414 lines
@@ -156,9 +163,11 @@ Helper functions, shared logic, and utility modules used throughout the applicat
156163
Unit and integration tests using Jest and Testing Library.
157164

158165
**Subcategories:**
166+
159167
- **Unit Tests** (20,796 lines - 100%): All test files
160168

161169
**Largest Test Files:**
170+
162171
- `__tests__/lib/dashboard/actions.test.ts` - 889 lines
163172
- `__tests__/lib/openbadges/openbadges.test.ts` - 855 lines
164173
- `__tests__/lib/slack/weeklyUpdate.test.ts` - 662 lines
@@ -174,6 +183,7 @@ Unit and integration tests using Jest and Testing Library.
174183
Helper functions, shared logic, and utility modules used throughout the application.
175184

176185
**Largest Files:**
186+
177187
- `src/lib/dashboard/widget-registry.ts` - 812 lines
178188
- `src/lib/sponsor-crm/contract-pdf.tsx` - 569 lines
179189
- `src/lib/slack/weeklyUpdate.ts` - 414 lines
@@ -187,10 +197,12 @@ Helper functions, shared logic, and utility modules used throughout the applicat
187197
API layer built with tRPC and Next.js API routes.
188198

189199
**Subcategories:**
200+
190201
- **tRPC Routers** (8,386 lines - 69.3%): Type-safe API with React Query integration
191202
- **REST Endpoints** (3,720 lines - 30.7%): Next.js API routes
192203

193204
**Largest Files:**
205+
194206
- `src/server/routers/sponsor.ts` - 2,180 lines
195207
- `src/server/routers/proposal.ts` - 1,279 lines
196208
- `src/server/routers/badge.ts` - 783 lines
@@ -203,9 +215,11 @@ API layer built with tRPC and Next.js API routes.
203215
Next.js 15+ App Router pages and layouts.
204216

205217
**Subcategories:**
218+
206219
- **App Router Pages** (11,453 lines - 100%): All page.tsx and layout.tsx files
207220

208221
**Largest Files:**
222+
209223
- `src/app/(main)/privacy/page.tsx` - 1,669 lines
210224
- `src/app/(admin)/admin/tickets/page.tsx` - 659 lines
211225
- `src/app/(admin)/admin/marketing/page.tsx` - 543 lines
@@ -218,6 +232,7 @@ Next.js 15+ App Router pages and layouts.
218232
Markdown documentation files covering various aspects of the system.
219233

220234
**Largest Documentation Files:**
235+
221236
- `docs/SPONSOR_SYSTEM.md` - 849 lines
222237
- `docs/ATTACHMENT_STORAGE.md` - 568 lines
223238
- `docs/EMAIL_SYSTEM.md` - 546 lines
@@ -231,10 +246,12 @@ Markdown documentation files covering various aspects of the system.
231246
Schema definitions for both Sanity CMS and input validation.
232247

233248
**Subcategories:**
249+
234250
- **Sanity Schemas** (4,291 lines - 78.8%): Content models
235251
- **Validation Schemas** (1,155 lines - 21.2%): Zod validation schemas
236252

237253
**Largest Schema Files:**
254+
238255
- `sanity/schemaTypes/conference.ts` - 872 lines
239256
- `sanity/schemaTypes/sponsorForConference.ts` - 477 lines
240257
- `sanity/schemaTypes/talk.ts` - 268 lines
@@ -247,9 +264,11 @@ Schema definitions for both Sanity CMS and input validation.
247264
Sanity CMS queries and data fetching logic.
248265

249266
**Subcategories:**
267+
250268
- **CMS Queries** (5,139 lines - 100%): Sanity GROQ queries
251269

252270
**Largest Files:**
271+
253272
- `src/lib/sponsor-crm/sanity.ts` - 683 lines
254273
- `src/lib/proposal/data/sanity.ts` - 632 lines
255274
- `src/lib/workshop/sanity.ts` - 563 lines
@@ -260,10 +279,12 @@ Sanity CMS queries and data fetching logic.
260279
Custom React hooks and context providers.
261280

262281
**Subcategories:**
282+
263283
- **React Hooks** (2,337 lines - 94.9%): Custom hooks for state management
264284
- **React Contexts** (125 lines - 5.1%): Context providers
265285

266286
**Largest Files:**
287+
267288
- `src/hooks/useScheduleEditor.ts` - 467 lines
268289
- `src/hooks/useEmailModalStorage.ts` - 290 lines
269290
- `src/hooks/useProgramFilter.ts` - 289 lines
@@ -292,6 +313,7 @@ Custom React hooks and context providers.
292313
### Complexity Analysis
293314

294315
**Large Files (>1000 lines):**
316+
295317
- 3 Storybook story files (SponsorSystem, ConferenceLandingPage examples)
296318
- 2 component files (MemeGenerator, DroppableTrack)
297319
- 1 page file (privacy page)
@@ -309,6 +331,7 @@ Custom React hooks and context providers.
309331
49 migration files covering schema updates, data migrations, and seeding operations.
310332

311333
**Recent Migrations:**
334+
312335
- Conference-scoped entities (talks, sponsors, reviews)
313336
- CamelCase field names standardization
314337
- Sponsor contact and billing data restructuring
@@ -321,17 +344,20 @@ Custom React hooks and context providers.
321344
## 📦 Supporting Files
322345

323346
### Configuration (529 lines - 0.2%)
347+
324348
- Next.js, TypeScript, ESLint, Prettier, Tailwind, Sanity configurations
325349
- Package management (package.json)
326350

327351
### Scripts (1,429 lines - 0.5%)
352+
328353
- Code analysis utilities
329354
- File management utilities
330355
- Data cleanup scripts
331356
- PDF generation tools
332357
- Development tools
333358

334359
### Styles (1,161 lines - 0.4%)
360+
335361
- Single Tailwind CSS file with custom styles
336362

337363
---
@@ -361,10 +387,11 @@ The Cloud Native Days Norway website is a well-structured Next.js application wi
361387
The codebase reflects a mature application with a focus on badge generation and conference management, featuring both a public-facing website and a sophisticated admin interface with integrated sponsor CRM.
362388

363389
**Recent Growth (since Feb 10, 2026):**
390+
364391
- **+56,474 lines** (25% increase)
365392
- **+317 files** (37% increase)
366393
- Major additions: Sponsor CRM system, digital contract signing, enhanced Storybook documentation (179 stories)
367394

368395
---
369396

370-
*This analysis was generated automatically by analyzing all TypeScript, JavaScript, JSON, CSS, and Markdown files in the repository.*
397+
_This analysis was generated automatically by analyzing all TypeScript, JavaScript, JSON, CSS, and Markdown files in the repository._

scripts/analyze-code-lines.ts

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,10 @@ const EXCLUDE_FILES = new Set([
5151
/**
5252
* Categorize a file based on its path and name
5353
*/
54-
function categorizeFile(
55-
filePath: string,
56-
): { category: string; subcategory?: string } {
54+
function categorizeFile(filePath: string): {
55+
category: string
56+
subcategory?: string
57+
} {
5758
const normalizedPath = filePath.toLowerCase()
5859
const fileName = path.basename(filePath)
5960

@@ -243,7 +244,17 @@ function walkDirectory(dir: string, stats: Map<string, FileStats[]>) {
243244
// Only count code files
244245
const ext = path.extname(entry.name)
245246
if (
246-
['.ts', '.tsx', '.js', '.jsx', '.json', '.md', '.mdx', '.css', '.scss'].includes(ext)
247+
[
248+
'.ts',
249+
'.tsx',
250+
'.js',
251+
'.jsx',
252+
'.json',
253+
'.md',
254+
'.mdx',
255+
'.css',
256+
'.scss',
257+
].includes(ext)
247258
) {
248259
const lines = countLines(fullPath)
249260
const { category, subcategory } = categorizeFile(fullPath)

src/components/program/TalkCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ export function TalkCard({
445445
<h4 className="text-sm font-semibold text-blue-900 dark:text-blue-200">
446446
Prerequisites
447447
</h4>
448-
<p className="mt-1 whitespace-pre-wrap text-sm text-blue-800 dark:text-blue-300">
448+
<p className="mt-1 text-sm whitespace-pre-wrap text-blue-800 dark:text-blue-300">
449449
{talkData.prerequisites}
450450
</p>
451451
</div>

0 commit comments

Comments
 (0)