feat: implement security headers (#84) and overhaul UI/UX#115
Open
vikas-6 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements mandatory HTTP security headers (CSP, X-Content-Type-Options, Referrer-Policy, etc.) to resolve the security vulnerabilities identified in issue #84. Additionally, it provides a comprehensive UI/UX overhaul, transforming the application into a premium, state-of-the-art developer profile platform using modern design principles like glassmorphism and smooth animations.
Closes #84
Type of Change
What Changed
apps/backend/src/app.ts: Enabled and hardenedhelmetmiddleware with a strict Content-Security-Policy (CSP) that supports Google Fonts while blocking unauthorized injections.apps/web/src/hooks.server.ts: [NEW] Created a SvelteKit server hook to inject critical security headers (X-Frame-Options,Referrer-Policy, etc.) into every web response.apps/web/svelte.config.js: Integrated native SvelteKit CSP configuration for robust frontend protection.apps/web/src/app.css: Completely overhauled the design system with premium tokens, "Outfit" & "Inter" typography, and glassmorphism utilities.apps/web/src/routes/+page.svelte: Redesigned the landing page with a high-impact hero section and modern feature cards.apps/web/src/routes/u/[username]/+page.svelte: Redesigned the profile page with a premium "glass" card, morphing avatar shapes, and entry animations.How to Test
pnpm dev.http://localhost:5173/u/devcard-demo).content-security-policy(present and strict)x-content-type-options: nosniffreferrer-policy: no-referrerx-frame-options: DENYChecklist
pnpm -r run lintpasses).pnpm -r run typecheck).pnpm -r run test).console.logor debug statements left in the code.Additional Context
During local development, I utilized a temporary SQLite configuration to verify the end-to-end data flow (profiles + headers) without requiring Docker. However, I have reverted the
prisma/schema.prismafile to PostgreSQL to ensure full compatibility with the existing project infrastructure before submitting this PR.