Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

233 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Viscalyx Website

The official website for Viscalyx, built with Next.js 16 and deployed to Cloudflare Workers via OpenNext.

Features

  • 🌐 Multi-language support (English/Swedish) via next-intl
  • πŸ“± Responsive design with Tailwind CSS 4 (mobile-first, dark mode)
  • πŸ“ Blog with Markdown content (remark/rehype pipeline with GFM support)
  • 🎨 Code syntax highlighting via Shiki with copy-to-clipboard
  • πŸ“Š Mermaid diagram rendering (lazy-loaded, DOMPurify-sanitized)
  • πŸ“– Table of contents with active heading tracking
  • πŸ“ˆ Reading progress indicator for blog posts
  • πŸ‘₯ Team member profiles
  • πŸ’» Open-source contributions showcase
  • πŸŒ™ Dark/light/system theme toggle with Framer Motion animations
  • πŸ–ΌοΈ Image lightbox with zoom
  • πŸͺ GDPR-compliant cookie consent with granular controls
  • πŸ”’ Privacy-first analytics with Cloudflare Analytics Engine
  • πŸ›‘οΈ Security headers (CSP, HSTS, X-Frame-Options, Permissions-Policy)
  • πŸ§ͺ Comprehensive testing with Vitest and Playwright

Privacy & Analytics

Our website respects user privacy and complies with GDPR cookie consent requirements:

  • Cookie Consent Banner: Appears on first visit to allow users to choose their cookie preferences
  • Granular Control: Users can accept/reject different categories of cookies:
    • Strictly Necessary: Required for website functionality (always enabled)
    • Preferences: Remember user settings like theme and language preferences
    • Analytics: Track website usage through Cloudflare Analytics Engine
  • Privacy-First Analytics: We collect minimal data for website improvement:
    • Reading progress and time spent on blog posts
    • Geographic location (country-level) via Cloudflare
    • Referrer information and basic browser data
    • No client-side tracking cookies β€” all processing happens server-side
  • User Rights: Users can change preferences, export data, or reset consent at any time

Legal Compliance

GDPR Requirements Met

  1. βœ… Explicit Consent: Clear opt-in required for non-essential cookies
  2. βœ… Granular Choice: Users can select specific cookie categories
  3. βœ… Easy Withdrawal: Users can change preferences anytime
  4. βœ… Clear Information: Detailed cookie descriptions provided
  5. βœ… Record Keeping: Consent timestamp and settings stored
  6. βœ… No Pre-checked Boxes: All non-essential cookies disabled by default

Tech Stack

Project Structure

app/[locale]/             β†’ Pages (blog, team, cookies, privacy, terms)
app/api/analytics/        β†’ Blog read tracking API endpoint
components/               β†’ React components (client islands + shared UI)
content/blog/             β†’ Blog posts in Markdown with frontmatter
lib/                      β†’ Utilities (blog, analytics, cookies, dates, i18n)
messages/{en,sv}.json     β†’ Translation files
public/                   β†’ Static assets, blog images, generated content
scripts/                  β†’ Build scripts (blog data, page dates, OG images, bundle analysis)
tests/integration/        β†’ Playwright integration tests

Development

See CONTRIBUTING.md for full setup instructions, development workflow, and environment configuration.

Quick start:

nvm install
nvm use
npm install
npm run dev

HTTPS Development

Run npm run dev:https to start the dev server over HTTPS on port 4443. Next.js generates a self-signed certificate automatically. In a devcontainer the host browser will show a "Not Secure" warning β€” click Advanced β†’ Proceed to continue. For a trusted certificate on bare-metal, install mkcert on the host and run mkcert -install before starting the dev server.

Scripts

# Development
npm run dev                          # Start development server (http://localhost:3000)
npm run dev:https                    # Start development server with HTTPS (https://localhost:4443)
npm run build                        # Production build (runs prebuild automatically)
npm run preview                      # Build and preview via Cloudflare Workers locally

# Quality Assurance
npm run check                        # Run all checks (type-check, format, spell, lint, test, security)
npm run test                         # Run unit tests (Vitest)
npm run test:watch                   # Watch mode testing
npm run test:coverage                # Coverage report
npm run test:ui                      # Vitest UI
npm run test:security                # Security audit (sanitization tests)
npm run test:integration             # Playwright integration tests (dev server)
npm run test:integration:preview     # Playwright integration tests (preview server)
npm run lint                         # Biome linter (code)
npm run lint:md                      # markdownlint (Markdown)
npm run type-check                   # TypeScript checking
npm run format                       # Biome formatting
npm run spell                        # Spell checking (cspell)

# Build & Analysis
npm run build:sitedata               # Rebuild blog data and page dates
npm run bundle:analyze               # Analyze Cloudflare Worker bundle size
npm run clean:all                    # Remove .next, out, .open-next, .wrangler

# Deployment
npm run deploy                       # Build and deploy to Cloudflare Workers

License

This project's source code is licensed under the MIT License β€” see the LICENSE file for details.

Specific assets such as logos and photographs of identifiable individuals are subject to different licensing terms. Please refer to the LICENSE-ASSETS.md file for details on the licensing of these assets.

Content Usage

  • Blog posts and articles: Free to use, share, and adapt under the MIT License (see LICENSE).
  • Source code: Open source under the MIT License (see LICENSE).
  • Logos and Profile Photos: All Rights Reserved. See LICENSE-ASSETS.md for details.
  • Other Assets in public/ directory: All Rights Reserved, unless otherwise specified. See LICENSE-ASSETS.md.
  • Personal/team information: Please respect privacy when reusing content.

The MIT License allows you to freely use the blog content and website source code while ensuring proper attribution to Viscalyx. Other assets are subject to the terms outlined in LICENSE-ASSETS.md.

Contributing

Contributions are welcome! Please feel free to submit issues and pull requests.

See CONTRIBUTING.md for details on how to set up your environment and contribute to the project.

About

The official website for Viscalyx, built with Next.js.

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages