-
Notifications
You must be signed in to change notification settings - Fork 0
⚡ Bolt: Fix hydration mismatch in Countdown component #49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
91ea4e6
7a912e7
6fb2a33
f947166
7a8a17c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| * @anyulled | ||
|
|
||
| # Documentation and Architecture | ||
| /ARCHITECTURE.md @anyulled | ||
| /SECURITY.md @anyulled | ||
| /docs/ @anyulled | ||
|
|
||
| # Core Configuration | ||
| /package.json @anyulled | ||
| /.github/workflows/ @anyulled |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| ## Description | ||
|
|
||
| Please describe the changes in this PR. Include motivation, problem addressed, and details of the solution. | ||
|
|
||
| ## Checklist | ||
|
|
||
| - [ ] Tests pass (Unit and E2E) | ||
| - [ ] Linter & Formatter pass (`npm run lint`, `npm run format:check`) | ||
| - [ ] SonarQube findings have been addressed | ||
| - [ ] No unhandled Promise rejections, `any` types eradicated | ||
| - [ ] Small Batch: This PR is focused and logically independent. | ||
|
|
||
| ## Testing Performed | ||
|
|
||
| Please provide a brief output or description of the tests run to verify the change. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| name: AI Harness Scorecard | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| schedule: | ||
| - cron: "0 6 * * 1" | ||
|
|
||
| jobs: | ||
| scorecard: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - uses: markmishaev76/ai-harness-scorecard@v1 | ||
| id: scorecard | ||
| - name: Commit badge and report | ||
| run: | | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "github-actions[bot]@users.noreply.github.com" | ||
| git add scorecard-badge.json scorecard-report.md | ||
| git diff --cached --quiet || git commit -m "chore: update scorecard badge and report" | ||
| git push |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| #!/usr/bin/env sh | ||
| . "$(dirname -- "$0")/_/husky.sh" | ||
|
|
||
| npx --no -- commitlint --edit ${1} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| export NVM_DIR="$HOME/.nvm" | ||
| [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" | ||
|
|
||
| npm test | ||
| npm run test:coverage | ||
| npm run build |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # AI Agent Instructions | ||
|
|
||
| This document provides system instructions for AI coding assistants working on the DevBcn project. | ||
|
|
||
| ## Code Style & Constraints | ||
|
|
||
| - **Architectural Boundaries**: React Components must not import from `app/`. Data must flow down via props. | ||
| - **Typing**: Use strict TypeScript. Avoid `any` at all costs. | ||
| - **Error Handling Policy**: Avoid unhandled promise rejections. Do not use generic catch-all statements without logging or handling the error properly. | ||
| - **Comments**: Code must be self-documenting. DO NOT add inline comments explaining _what_ code does. Only explain _why_ non-obvious decisions were made. | ||
| - **Styling**: SCSS must be used. No Tailwind or CSS Modules. | ||
|
|
||
| ## AI Usage Norms | ||
|
|
||
| - No unchecked AI-generated code should be pushed to main. All code must pass the test suite. | ||
| - Ensure code changes are manually reviewed as per branch protection rules. | ||
| - Agents must never bypass `pre-commit`, `commit-msg`, or `pre-push` Git hooks. | ||
| - Do not disable eslint rules. | ||
| - Check the build and tests always pass before completing a task. | ||
| - Check SonarQube findings and resolve them before claiming any task is done. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,155 @@ | ||
| # Architecture | ||
|
|
||
| This document describes the high-level architecture of the DevBcn website. | ||
| If you want to familiarize yourself with the codebase, this is a good place to start. | ||
|
|
||
| ## Bird's Eye View | ||
|
|
||
| A Next.js 16 App Router application serving the DevBcn conference website. | ||
| Static and multi-year: every past and current edition lives under `/{year}`. | ||
| Speaker, talk, and schedule data come from the **Sessionize API** at runtime. | ||
| Edition-specific configuration (dates, feature flags, sponsors) is defined in code. | ||
| Deployed to Vercel with PWA support via `@ducanh2912/next-pwa`. | ||
|
|
||
| ``` | ||
| Sessionize API ──► hooks/ ──► app/[year]/ pages | ||
| ▲ | ||
| config/editions/ ─────────────────┘ | ||
| ``` | ||
|
Comment on lines
+14
to
+18
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add a language to the fenced code block. Line 14 opens a fenced block without a language, which trips markdown linting (MD040). Suggested fix-```
+```text
Sessionize API ──► hooks/ ──► app/[year]/ pages
▲
config/editions/ ─────────────────┘Verify each finding against the current code and only fix it if needed. In |
||
|
|
||
| ## Module Map | ||
|
|
||
| ### `app/` | ||
|
|
||
| Next.js App Router routes. Two routing layers: | ||
|
|
||
| - **Top-level** (`app/(global)/`, `app/about/`, `app/blog/`, …): year-independent pages. | ||
| - **`app/[year]/`**: year-scoped pages (speakers, talks, schedule, sponsors, etc.). | ||
| Contains its own `layout.tsx` that resolves the edition config from the URL param. | ||
|
|
||
| The `app/[year]/@modal/` directory uses Next.js parallel routes for modal intercepts. | ||
|
|
||
| `app/layout.tsx` is the root layout: fonts, global CSS imports, analytics, PWA meta. | ||
|
|
||
| ### `config/` | ||
|
|
||
| Static, compile-time configuration. Three sub-modules: | ||
|
|
||
| - **`config/editions/`**: Per-year config files (`2023.ts` … `2026.ts`) implementing | ||
| `EditionConfig`. Controls feature flags, dates, sponsor data, Sessionize URLs. | ||
| `CURRENT_EDITION` constant determines the default year. | ||
| - **`config/navigation/`**: Centralized nav links consumed by header and mobile menu. | ||
| - **`config/job-offers/`**: Job listing data. | ||
|
|
||
| **Constraint**: `config/` must remain pure data — no React, no side effects, no fetching. | ||
|
|
||
| ### `hooks/` | ||
|
|
||
| Server-side data-fetching functions (despite the directory name, these are **not** | ||
| React hooks). Each wraps a Sessionize API endpoint with `react.cache()`: | ||
|
|
||
| - `useSpeakers.ts` → `/view/Speakers` | ||
| - `useTalks.ts` → `/view/Sessions` | ||
| - `useSchedule.ts` → `/view/GridSmart` | ||
|
|
||
| Types for Sessionize responses live in `hooks/types.ts`. | ||
|
|
||
| **Constraint**: these functions are designed for Server Components only. They use | ||
| `fetch` with `next: { revalidate: 3600 }` — do not call them from Client Components. | ||
|
|
||
| ### `components/` | ||
|
|
||
| React components, organized by purpose: | ||
|
|
||
| - **`layout/`**: Shell components — header, footer, mobile menu, breadcrumb, speaker/talk | ||
| cards, filter bars. Most are Client Components (`'use client'`). | ||
| - **`elements/`**: Small interactive widgets — countdown, back-to-top, theme switch, | ||
| video player, track badges. | ||
| - **`sections/`**: Full page sections composed for home page variants (`home1/` … `home10/`), | ||
| FAQ, and venue. | ||
| - **`ui/`**: Generic UI primitives (Modal). | ||
| - **`speakers/`**, **`talks/`**, **`schedule/`**, **`slider/`**, **`skeletons/`**: Domain-specific | ||
| component groups. | ||
|
|
||
| **Constraint**: components must not import from `app/`. Data flows down from route | ||
| pages through props. | ||
|
|
||
| ### `context/` | ||
|
|
||
| Client-side React Context. Currently only `ScheduleContext` — manages saved sessions | ||
| via `localStorage`. Provided by `ClientLayout` at the root. | ||
|
|
||
| **Constraint**: contexts are always Client Components. Keep them minimal to avoid | ||
| unnecessary re-renders. | ||
|
|
||
| ### `lib/shared/` | ||
|
|
||
| Pure utility functions: markdown rendering, JSON-LD generation, analytics helpers, | ||
| slugification, speaker/talk filter logic. | ||
|
|
||
| **Constraint**: no React imports, no state, no side effects. Must be importable from | ||
| both server and client code. | ||
|
|
||
| ### `styles/` | ||
|
|
||
| SCSS-based styling system: | ||
|
|
||
| - `main.scss`: entry point. | ||
| - `theme/`: design tokens and variables. | ||
| - `components/`: component-specific styles. | ||
| - `layout/`: structural layout styles. | ||
| - `utils/`: mixins and helpers. | ||
| - `vendor/`: third-party CSS (Bootstrap, AOS, Slick, etc.). | ||
|
|
||
| **Constraint**: no CSS Modules, no Tailwind. All styles flow through the SCSS pipeline. | ||
|
|
||
| ### `types/` | ||
|
|
||
| Shared TypeScript interfaces for component props (`HeaderProps`, `BreadcrumbProps`, | ||
| `BackToTopProps`). Sessionize domain types live in `hooks/types.ts` instead. | ||
|
|
||
| ### `team/` | ||
|
|
||
| Static team member data (`TeamMembers.ts`). | ||
|
|
||
| ### `__tests__/` | ||
|
|
||
| Jest unit tests mirroring the source tree structure. | ||
| Cypress E2E tests live in `cypress/`. | ||
|
|
||
| ## Cross-Cutting Concerns | ||
|
|
||
| ### Multi-Year Support | ||
|
|
||
| The `[year]` dynamic segment is the backbone of the site. Each year's page resolves | ||
| its `EditionConfig` via `getEditionConfig(year)` and passes it (or derived data) | ||
| down through props. Navigation links are prefixed with the active year. | ||
|
|
||
| ### External Data | ||
|
|
||
| All speaker, talk, and schedule data comes from Sessionize. The API URL is stored | ||
| per-edition in `config/editions/`. Data is cached at the `fetch` level | ||
| (`revalidate: 3600`) and at the React level (`cache()`). | ||
|
|
||
| ### Quality Tooling | ||
|
|
||
| - **ESLint** (flat config) + **Prettier** + **Stylelint** enforced via Husky pre-commit hooks. | ||
| - **lint-staged** runs formatters and linters on staged files. | ||
| - Git hooks must never be bypassed. | ||
|
|
||
| ## Invariants | ||
|
|
||
| 1. `config/` is pure data — no React, no fetching, no side effects. | ||
| 2. `hooks/` fetch functions are server-only — never call from Client Components. | ||
| 3. Components never import from `app/` — data flows down via props. | ||
| 4. Styles use SCSS exclusively — no CSS Modules, no Tailwind. | ||
| 5. Every edition must implement the full `EditionConfig` interface. | ||
| 6. Git hooks (pre-commit, commit-msg, pre-push) are never bypassed. | ||
|
|
||
| ## Module Boundaries | ||
|
|
||
| - `components/` never depends on `app/`. | ||
| - `hooks/` never depends on `components/` or `app/`. | ||
| - `config/` never depends on any other workspace module. | ||
| - `styles/` never depends on any other workspace module. | ||
| - `lib/` never depends on `app/` or `components/`. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # Contributing | ||
|
|
||
| Thank you for contributing to DevBcn! | ||
|
|
||
| ## Small Batch Enforcement | ||
|
|
||
| Please submit Pull Requests in small, cohesive batches. Do not submit monolithic PRs containing thousands of lines of changes, especially when AI coding assistants are used. Small PRs are easier to review and less likely to introduce subtle regressions. | ||
|
|
||
| ## Git Hooks | ||
|
|
||
| Zero Tolerance: Never bypass git hooks (`--no-verify`). We focus on quality over speed. | ||
| All commits must successfully pass the pre-commit linters and tests. | ||
|
|
||
| ## Code Standards | ||
|
|
||
| - Ensure 90% test coverage. | ||
| - Apply SOLID, DRY, KISS, and YAGNI principles. | ||
| - Follow the Law of Demeter and "Tell, Don't Ask" pattern. | ||
| - Fix any and all SonarQube issues before opening a PR. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| # eventify nextjs | ||
| # Devbcn | ||
|
|
||
| # made by alithemes.com | ||
| [](scorecard-report.md) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make the security audit step actually gate high vulnerabilities.
Line 26 always exits successfully because of
|| true, so high-severity findings won’t block merges.🔧 Suggested fix
📝 Committable suggestion
🤖 Prompt for AI Agents