Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 0 additions & 67 deletions frontend/next.config.js
Original file line number Diff line number Diff line change
@@ -1,35 +1,5 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
// PWA support
pwa: {
dest: "public",
register: true,
skipWaiting: true,
disable: process.env.NODE_ENV === "development",
},

// Image optimization for mobile
images: {
formats: ["image/avif", "image/webp"],
deviceSizes: [320, 420, 768, 1024, 1200, 1920, 2048],
imageSizes: [16, 32, 48, 64, 96, 128, 256, 384],
minimumCacheTTL: 60 * 60 * 24 * 30, // 30 days
dangerouslyAllowSVG: true,
contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;",
},

// Enable compression
compress: true,

// Reduce bundle size by splitting code
swcMinify: true,

// Experimental features for better mobile performance
experimental: {
optimizeCss: true,
optimizePackageImports: ["lucide-react", "framer-motion"],
},

async rewrites() {
const apiUrl = process.env.NEXT_PUBLIC_API_URL;
if (apiUrl) {
Expand All @@ -42,43 +12,6 @@ const nextConfig = {
}
return [];
},

// Headers for mobile optimization
async headers() {
return [
{
source: "/:path*",
headers: [
{
key: "Cache-Control",
value: "public, max-age=3600, stale-while-revalidate=86400",
},
{
key: "X-Device-Type",
value: "desktop", // Updated by middleware based on User-Agent
},
],
},
{
source: "/icons/:path*",
headers: [
{
key: "Cache-Control",
value: "public, max-age=2592000, immutable",
},
],
},
{
source: "/_next/static/:path*",
headers: [
{
key: "Cache-Control",
value: "public, max-age=31536000, immutable",
},
],
},
];
},
};

module.exports = nextConfig;
180 changes: 0 additions & 180 deletions frontend/src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -74,183 +74,3 @@
@apply bg-background text-foreground;
}
}

/* Mobile-first responsive utilities */
@layer utilities {
/* Safe area insets for notched devices */
.safe-area-t {
padding-top: env(safe-area-inset-top);
}
.safe-area-b {
padding-bottom: env(safe-area-inset-bottom);
}
.safe-area-l {
padding-left: env(safe-area-inset-left);
}
.safe-area-r {
padding-right: env(safe-area-inset-right);
}
.safe-area-p {
padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

/* Touch-friendly tap targets */
.tap-target {
min-height: 44px;
min-width: 44px;
}
.tap-target-lg {
min-height: 48px;
min-width: 48px;
}
.tap-target-xl {
min-height: 56px;
min-width: 56px;
}

/* Hide scrollbar but keep functionality */
.scrollbar-hide {
-ms-overflow-style: none;
scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
display: none;
}

/* Smooth scrolling */
.smooth-scroll {
-webkit-overflow-scrolling: touch;
scroll-behavior: smooth;
}

/* Prevent text selection on UI elements */
.no-select {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}

/* Touch action modifiers */
.touch-none {
touch-action: none;
}
.touch-manipulation {
touch-action: manipulation;
}

/* Responsive text sizes */
.text-xs-mobile {
@apply text-xs;
}
.text-sm-mobile {
@apply text-sm;
}
.text-base-mobile {
@apply text-base;
}
.text-lg-mobile {
@apply text-lg;
}
.text-xl-mobile {
@apply text-xl;
}

/* Mobile-specific visibility */
@media (max-width: 767px) {
.hide-mobile {
display: none !important;
}
}

@media (min-width: 768px) {
.show-mobile-only {
display: none !important;
}
}

/* Responsive spacing */
.p-mobile {
@apply p-4;
}
.px-mobile {
@apply px-4;
}
.py-mobile {
@apply py-4;
}

/* Mobile-optimized forms */
.mobile-input {
@apply text-base;
font-size: 16px; /* Prevents iOS zoom on focus */
}

/* Hardware acceleration hints */
.gpu-accelerated {
transform: translateZ(0);
will-change: transform;
backface-visibility: hidden;
}

/* Prevent pull-to-refresh on mobile */
.no-pull-refresh {
overscroll-behavior-y: contain;
}
}

/* Mobile-specific base styles */
@layer base {
/* iOS-specific fixes */
@supports (-webkit-touch-callout: none) {
body {
min-height: -webkit-fill-available;
}

input, textarea, select {
font-size: 16px; /* Prevents iOS zoom */
}

/* Smooth scrolling on iOS */
html {
-webkit-overflow-scrolling: touch;
}
}

/* Android-specific fixes */
@supports not (-webkit-touch-callout: none) {
/* Android specific */
}

/* Responsive typography */
html {
font-size: 16px;
}

@media (min-width: 768px) {
html {
font-size: 16px;
}
}

@media (min-width: 1024px) {
html {
font-size: 16px;
}
}

/* Focus styles for touch */
:focus-visible {
@apply outline-2 outline-ring outline-offset-2;
}

/* Remove tap highlight on mobile */
* {
-webkit-tap-highlight-color: transparent;
}

/* Better touch handling */
button, a, input, select, textarea {
touch-action: manipulation;
}
}
Loading
Loading