├── .modified ├── src ├── ai │ ├── dev.ts │ └── ai-instance.ts ├── app │ ├── favicon.ico │ ├── layout.tsx │ ├── page.tsx │ ├── globals.css │ └── [shortCode] │ │ └── page.tsx ├── lib │ ├── utils.ts │ └── firebase │ │ ├── config.ts │ │ └── admin.ts ├── components │ ├── ui │ │ ├── skeleton.tsx │ │ ├── textarea.tsx │ │ ├── label.tsx │ │ ├── input.tsx │ │ ├── separator.tsx │ │ ├── progress.tsx │ │ ├── toaster.tsx │ │ ├── checkbox.tsx │ │ ├── slider.tsx │ │ ├── switch.tsx │ │ ├── badge.tsx │ │ ├── tooltip.tsx │ │ ├── popover.tsx │ │ ├── avatar.tsx │ │ ├── radio-group.tsx │ │ ├── alert.tsx │ │ ├── scroll-area.tsx │ │ ├── button.tsx │ │ ├── tabs.tsx │ │ ├── card.tsx │ │ ├── accordion.tsx │ │ ├── calendar.tsx │ │ ├── table.tsx │ │ ├── dialog.tsx │ │ ├── sheet.tsx │ │ ├── form.tsx │ │ ├── alert-dialog.tsx │ │ ├── toast.tsx │ │ ├── select.tsx │ │ ├── dropdown-menu.tsx │ │ ├── menubar.tsx │ │ ├── chart.tsx │ │ └── sidebar.tsx │ ├── header.tsx │ ├── qr-code-generator-form.tsx │ └── url-shortener-with-qrcode.tsx ├── hooks │ ├── use-mobile.tsx │ └── use-toast.ts ├── services │ └── qr-code.ts └── actions │ └── shorten-url.ts ├── .vscode └── settings.json ├── postcss.config.mjs ├── next-env.d.ts ├── firebase.json ├── components.json ├── .gitignore ├── .env.local.example ├── next.config.ts ├── tsconfig.json ├── docs └── blueprint.md ├── .idx └── dev.nix ├── package.json ├── .github └── workflows │ └── deploy.yml ├── tailwind.config.ts └── README.md /.modified: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/ai/dev.ts: -------------------------------------------------------------------------------- 1 | // Flows will be imported for their side effects in this file. 2 | -------------------------------------------------------------------------------- /src/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sidagarwal04/linkmagic/master/src/app/favicon.ico -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "IDX.aI.enableInlineCompletion": true, 3 | "IDX.aI.enableCodebaseIndexing": true 4 | } -------------------------------------------------------------------------------- /postcss.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('postcss-load-config').Config} */ 2 | const config = { 3 | plugins: { 4 | tailwindcss: {}, 5 | }, 6 | }; 7 | 8 | export default config; 9 | -------------------------------------------------------------------------------- /src/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { clsx, type ClassValue } from "clsx" 2 | import { twMerge } from "tailwind-merge" 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)) 6 | } 7 | -------------------------------------------------------------------------------- /next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // NOTE: This file should not be edited 5 | // see https://nextjs.org/docs/app/api-reference/config/typescript for more information. 6 | -------------------------------------------------------------------------------- /firebase.json: -------------------------------------------------------------------------------- 1 | { 2 | "hosting": { 3 | "source": ".", 4 | "ignore": [ 5 | "firebase.json", 6 | "**/.*", 7 | "**/node_modules/**" 8 | ], 9 | "frameworksBackend": { 10 | "region": "us-central1" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/ai/ai-instance.ts: -------------------------------------------------------------------------------- 1 | import {genkit} from 'genkit'; 2 | import {googleAI} from '@genkit-ai/googleai'; 3 | 4 | export const ai = genkit({ 5 | promptDir: './prompts', 6 | plugins: [ 7 | googleAI({ 8 | apiKey: process.env.GOOGLE_GENAI_API_KEY, 9 | }), 10 | ], 11 | model: 'googleai/gemini-2.0-flash', 12 | }); 13 | -------------------------------------------------------------------------------- /src/components/ui/skeleton.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from "@/lib/utils" 2 | 3 | function Skeleton({ 4 | className, 5 | ...props 6 | }: React.HTMLAttributes) { 7 | return ( 8 |
12 | ) 13 | } 14 | 15 | export { Skeleton } 16 | -------------------------------------------------------------------------------- /components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "default", 4 | "rsc": true, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.ts", 8 | "css": "src/app/globals.css", 9 | "baseColor": "neutral", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils", 16 | "ui": "@/components/ui", 17 | "lib": "@/lib", 18 | "hooks": "@/hooks" 19 | }, 20 | "iconLibrary": "lucide" 21 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | .yarn/install-state.gz 8 | 9 | # testing 10 | /coverage 11 | 12 | # next.js 13 | /.next/ 14 | /out/ 15 | 16 | # production 17 | /build 18 | 19 | # misc 20 | .DS_Store 21 | *.pem 22 | 23 | # debug 24 | npm-debug.log* 25 | yarn-debug.log* 26 | yarn-error.log* 27 | pnpm-debug.log* 28 | 29 | # local env files 30 | .env*.local 31 | 32 | # vercel 33 | .vercel 34 | 35 | # typescript 36 | *.tsbuildinfo 37 | next-env.d.ts 38 | -------------------------------------------------------------------------------- /.env.local.example: -------------------------------------------------------------------------------- 1 | # Firebase Configuration (Required for Authentication & Deployment) 2 | NEXT_PUBLIC_FIREBASE_API_KEY=YOUR_API_KEY 3 | NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=YOUR_PROJECT_ID.firebaseapp.com 4 | NEXT_PUBLIC_FIREBASE_PROJECT_ID=YOUR_PROJECT_ID 5 | NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=YOUR_PROJECT_ID.appspot.com 6 | NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=YOUR_SENDER_ID 7 | NEXT_PUBLIC_FIREBASE_APP_ID=YOUR_APP_ID 8 | # NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID=YOUR_MEASUREMENT_ID # Optional, for Analytics 9 | 10 | # Google Generative AI API Key (Optional, if using Genkit features) 11 | # GOOGLE_GENAI_API_KEY=YOUR_GOOGLE_AI_API_KEY 12 | -------------------------------------------------------------------------------- /src/hooks/use-mobile.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | 3 | const MOBILE_BREAKPOINT = 768 4 | 5 | export function useIsMobile() { 6 | const [isMobile, setIsMobile] = React.useState(undefined) 7 | 8 | React.useEffect(() => { 9 | const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`) 10 | const onChange = () => { 11 | setIsMobile(window.innerWidth < MOBILE_BREAKPOINT) 12 | } 13 | mql.addEventListener("change", onChange) 14 | setIsMobile(window.innerWidth < MOBILE_BREAKPOINT) 15 | return () => mql.removeEventListener("change", onChange) 16 | }, []) 17 | 18 | return !!isMobile 19 | } 20 | -------------------------------------------------------------------------------- /src/components/header.tsx: -------------------------------------------------------------------------------- 1 | 2 | // src/components/header.tsx 3 | 'use client'; // Keep as client component if needed for other interactivity later 4 | 5 | import { LinkIcon } from "lucide-react"; 6 | // Removed AuthButton import 7 | 8 | export function Header() { 9 | return ( 10 |
11 |
12 |
13 | 14 |

LinkMagic

15 |
16 | {/* Removed AuthButton */} 17 |
18 |
19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /next.config.ts: -------------------------------------------------------------------------------- 1 | 2 | import type {NextConfig} from 'next'; 3 | 4 | const nextConfig: NextConfig = { 5 | /* config options here */ 6 | typescript: { 7 | ignoreBuildErrors: true, 8 | }, 9 | eslint: { 10 | ignoreDuringBuilds: true, 11 | }, 12 | images: { 13 | remotePatterns: [ 14 | { 15 | protocol: 'https', 16 | hostname: 'picsum.photos', 17 | port: '', 18 | pathname: '/**', 19 | }, 20 | { // Add this entry for api.qrserver.com 21 | protocol: 'https', 22 | hostname: 'api.qrserver.com', 23 | port: '', 24 | pathname: '/v1/create-qr-code/**', 25 | }, 26 | ], 27 | }, 28 | }; 29 | 30 | export default nextConfig; 31 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2017", 4 | "lib": ["dom", "dom.iterable", "esnext"], 5 | "allowJs": true, 6 | "skipLibCheck": true, 7 | "strict": true, 8 | "noEmit": true, 9 | "esModuleInterop": true, 10 | "module": "esnext", 11 | "moduleResolution": "bundler", 12 | "resolveJsonModule": true, 13 | "isolatedModules": true, 14 | "jsx": "preserve", 15 | "incremental": true, 16 | "plugins": [ 17 | { 18 | "name": "next" 19 | } 20 | ], 21 | "paths": { 22 | "@/*": ["./src/*"] 23 | } 24 | }, 25 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], 26 | "exclude": ["node_modules"] 27 | } 28 | -------------------------------------------------------------------------------- /src/components/ui/textarea.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | 3 | import {cn} from '@/lib/utils'; 4 | 5 | const Textarea = React.forwardRef>( 6 | ({className, ...props}, ref) => { 7 | return ( 8 |