From 419ef9193e44f65808a3dda15cbdf8dd5503a03d Mon Sep 17 00:00:00 2001 From: ayan <257694403+scantx@users.noreply.github.com> Date: Sun, 8 Feb 2026 11:51:07 -0600 Subject: [PATCH] feat: Centralize event data + enhance SEO/performance/security - Events metadata should be centralized in a source of truth file, e.g. events.js - Auto-generate homepage cards, navbar, sponsors page from data Add per-event SEO overrides and JSON-LD structured data - Build warnings, duplicate meta tags and sitemap trailing slashes fixed. Security: feature CSP media-src, SRI hashes, security.txt - Improve performance by adding the following attributes to the video poster: image dimensions, decoding=async - Add accessibility: skip links, focus indicators, reduced motion support - Clean up dead CSS and unused variables --- .github/workflows/deploy.yml | 2 +- README.md | 203 ++++++------ package-lock.json | 150 +++++---- src/app.css | 55 ++-- src/app.html | 44 +-- src/lib/components/EventPage.svelte | 112 ++++++- src/lib/components/Footer.svelte | 12 +- src/lib/components/Navbar.svelte | 75 +++-- src/lib/data/events.js | 481 ++++++++++++++++++++++++++++ src/routes/+error.svelte | 53 +++ src/routes/+layout.svelte | 156 ++++----- src/routes/+page.svelte | 329 ++++++------------- src/routes/cigarsec/+page.svelte | 22 +- src/routes/east/+page.svelte | 95 +----- src/routes/galway/+page.svelte | 24 +- src/routes/lasvegas/+page.svelte | 107 +------ src/routes/minneapolis/+page.svelte | 101 +----- src/routes/north/+page.svelte | 23 +- src/routes/northwest/+page.svelte | 23 +- src/routes/prime/+page.svelte | 23 +- src/routes/south/+page.svelte | 23 +- src/routes/southeast/+page.svelte | 25 +- src/routes/sponsors/+page.svelte | 202 +++--------- src/routes/west/+page.svelte | 23 +- static/.well-known/security.txt | 10 + static/robots.txt | 2 +- static/sitemap.xml | 58 ++-- svelte.config.js | 2 +- 28 files changed, 1276 insertions(+), 1159 deletions(-) create mode 100644 src/lib/data/events.js create mode 100644 src/routes/+error.svelte create mode 100644 static/.well-known/security.txt diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 01a3212..6d44012 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -27,7 +27,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: '18' + node-version: '22' cache: 'npm' - name: Install dependencies diff --git a/README.md b/README.md index 499f514..91e521b 100644 --- a/README.md +++ b/README.md @@ -6,35 +6,26 @@ A SvelteKit website for BurbSec information security meetups and events. BurbSec is an information security meetup network hosting events across multiple locations including the greater Chicagoland area, Las Vegas, Galway (Ireland), Minneapolis, and more. This site provides information about upcoming events, locations, and sponsors. -## Project Structure - -This is a SvelteKit application with the following structure: - -- **Chicagoland Event Pages**: BurbSec locations across the Chicago metropolitan area - - Prime - Schaumburg (`/prime`) - - North - Wheeling (`/north`) - - South - Hickory Hills (`/south`) - - East - Chicago (`/east`) - - West - Naperville (`/west`) - - Northwest - Crystal Lake (`/northwest`) - - Southeast - South Bend, IN (`/southeast`) - -- **Elsewhere Event Pages**: BurbSec locations outside the Chicagoland area - - Galway, Ireland (`/galway`) - - Las Vegas, NV (`/lasvegas`) - - Minneapolis, MN (`/minneapolis`) - -- **Special Interest Groups** - - CigarSec (`/cigarsec`) - -- **Other Pages** - - Sponsors (`/sponsors`) +## Architecture + +This project uses a **data-driven architecture** where all event metadata lives in a single source of truth — `src/lib/data/events.js`. The homepage cards, navigation dropdowns, sponsors page, SEO meta tags, and structured data (JSON-LD) are all **auto-generated** from this file. Individual route pages only contain unique prose content. + +### Event Categories + +- **Chicagoland** — Chicago, Wheeling, Hickory Hills, Schaumburg, Crystal Lake, Naperville, South Bend +- **Elsewhere** — Minneapolis, Las Vegas, Galway (Ireland) +- **Special Interest** — CigarSec + +### Other Pages + +- **Sponsors** (`/sponsors`) — auto-generated cards from events with sponsor data +- **Error** (`+error.svelte`) — branded 404 / error page ## Development ### Prerequisites -- Node.js (version 16 or higher) +- Node.js 22 LTS (or higher) - npm ### Getting Started @@ -44,98 +35,130 @@ This is a SvelteKit application with the following structure: ```bash npm install ``` - 3. Start the development server: ```bash npm run dev ``` - 4. Open your browser and navigate to `http://localhost:5173` ### Building for Production -To build the application for production: - ```bash -npm run build +npm run build # Outputs to build/ with Brotli + Gzip precompression +npm run preview # Preview the production build locally ``` -To preview the production build: +## Technology Stack -```bash -npm run preview -``` +- **Framework**: SvelteKit 2 + Svelte 4 +- **Build Tool**: Vite 5 +- **Styling**: Bootstrap 5.3.8 (CDN with SRI) + Custom CSS +- **Icons**: Font Awesome 6.5.1 (CDN with SRI) +- **Deployment**: Static site generation → GitHub Pages (Node 22) +- **Domain**: `burbsec.com` (via CNAME) -## Technology Stack +### Security Features -- **Framework**: SvelteKit -- **Build Tool**: Vite -- **Styling**: Bootstrap 5 + Custom CSS -- **Icons**: Font Awesome 6 -- **Deployment**: Static site generation (GitHub Pages) +- **Subresource Integrity (SRI)** hashes on all CDN resources +- **Content Security Policy (CSP)** meta tag +- **Referrer Policy** (`strict-origin-when-cross-origin`) +- **`security.txt`** at `/.well-known/security.txt` +- Consistent `rel="noopener noreferrer"` on all external links + +### Accessibility + +- Skip-to-content link for keyboard/screen-reader navigation +- Visible `:focus-visible` indicators on all interactive elements +- `prefers-reduced-motion` support (disables animations) +- Semantic HTML landmarks (`