├── .gitignore ├── README.md ├── bun.lockb ├── components.json ├── eslint.config.js ├── index.html ├── package-lock.json ├── package.json ├── postcss.config.js ├── public ├── favicon.ico ├── placeholder.svg └── robots.txt ├── src ├── App.css ├── App.tsx ├── components │ ├── AnimatedTransition.tsx │ ├── Navbar.tsx │ ├── PlatformCard.tsx │ ├── platform │ │ ├── AddProblemForm.tsx │ │ ├── CommentSection.tsx │ │ ├── ProblemList.tsx │ │ └── SolutionView.tsx │ └── ui │ │ ├── accordion.tsx │ │ ├── alert-dialog.tsx │ │ ├── alert.tsx │ │ ├── aspect-ratio.tsx │ │ ├── avatar.tsx │ │ ├── badge.tsx │ │ ├── breadcrumb.tsx │ │ ├── button.tsx │ │ ├── calendar.tsx │ │ ├── card.tsx │ │ ├── carousel.tsx │ │ ├── chart.tsx │ │ ├── checkbox.tsx │ │ ├── collapsible.tsx │ │ ├── command.tsx │ │ ├── context-menu.tsx │ │ ├── dialog.tsx │ │ ├── drawer.tsx │ │ ├── dropdown-menu.tsx │ │ ├── form.tsx │ │ ├── hover-card.tsx │ │ ├── input-otp.tsx │ │ ├── input.tsx │ │ ├── label.tsx │ │ ├── menubar.tsx │ │ ├── navigation-menu.tsx │ │ ├── pagination.tsx │ │ ├── popover.tsx │ │ ├── progress.tsx │ │ ├── radio-group.tsx │ │ ├── resizable.tsx │ │ ├── scroll-area.tsx │ │ ├── select.tsx │ │ ├── separator.tsx │ │ ├── sheet.tsx │ │ ├── sidebar.tsx │ │ ├── skeleton.tsx │ │ ├── slider.tsx │ │ ├── sonner.tsx │ │ ├── switch.tsx │ │ ├── table.tsx │ │ ├── tabs.tsx │ │ ├── textarea.tsx │ │ ├── toast.tsx │ │ ├── toaster.tsx │ │ ├── toggle-group.tsx │ │ ├── toggle.tsx │ │ ├── tooltip.tsx │ │ └── use-toast.ts ├── context │ └── AuthContext.tsx ├── data │ └── mockData.ts ├── hooks │ ├── use-mobile.tsx │ └── use-toast.ts ├── index.css ├── lib │ └── utils.ts ├── main.tsx ├── pages │ ├── Index.tsx │ ├── Login.tsx │ ├── NotFound.tsx │ ├── Notes.tsx │ ├── Platform.tsx │ ├── Signup.tsx │ └── Social.tsx └── vite-env.d.ts ├── tailwind.config.ts ├── tsconfig.app.json ├── tsconfig.json ├── tsconfig.node.json └── vite.config.ts /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Welcome to your Lovable project 2 | 3 | ## Project info 4 | 5 | **URL**: https://lovable.dev/projects/3ad43e67-3d6a-4b8b-8a4c-2554d76f6aba 6 | 7 | ## How can I edit this code? 8 | 9 | There are several ways of editing your application. 10 | 11 | **Use Lovable** 12 | 13 | Simply visit the [Lovable Project](https://lovable.dev/projects/3ad43e67-3d6a-4b8b-8a4c-2554d76f6aba) and start prompting. 14 | 15 | Changes made via Lovable will be committed automatically to this repo. 16 | 17 | **Use your preferred IDE** 18 | 19 | If you want to work locally using your own IDE, you can clone this repo and push changes. Pushed changes will also be reflected in Lovable. 20 | 21 | The only requirement is having Node.js & npm installed - [install with nvm](https://github.com/nvm-sh/nvm#installing-and-updating) 22 | 23 | Follow these steps: 24 | 25 | ```sh 26 | # Step 1: Clone the repository using the project's Git URL. 27 | git clone 28 | 29 | # Step 2: Navigate to the project directory. 30 | cd 31 | 32 | # Step 3: Install the necessary dependencies. 33 | npm i 34 | 35 | # Step 4: Start the development server with auto-reloading and an instant preview. 36 | npm run dev 37 | ``` 38 | 39 | **Edit a file directly in GitHub** 40 | 41 | - Navigate to the desired file(s). 42 | - Click the "Edit" button (pencil icon) at the top right of the file view. 43 | - Make your changes and commit the changes. 44 | 45 | **Use GitHub Codespaces** 46 | 47 | - Navigate to the main page of your repository. 48 | - Click on the "Code" button (green button) near the top right. 49 | - Select the "Codespaces" tab. 50 | - Click on "New codespace" to launch a new Codespace environment. 51 | - Edit files directly within the Codespace and commit and push your changes once you're done. 52 | 53 | ## What technologies are used for this project? 54 | 55 | This project is built with . 56 | 57 | - Vite 58 | - TypeScript 59 | - React 60 | - shadcn-ui 61 | - Tailwind CSS 62 | 63 | ## How can I deploy this project? 64 | 65 | Simply open [Lovable](https://lovable.dev/projects/3ad43e67-3d6a-4b8b-8a4c-2554d76f6aba) and click on Share -> Publish. 66 | 67 | ## I want to use a custom domain - is that possible? 68 | 69 | We don't support custom domains (yet). If you want to deploy your project under your own domain then we recommend using Netlify. Visit our docs for more details: [Custom domains](https://docs.lovable.dev/tips-tricks/custom-domain/) 70 | -------------------------------------------------------------------------------- /bun.lockb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PRIYESHSINGH24/SMART_DSA_NOTEBOOK/7622a4bfff9bdc865dd2c17b318d4ad6b1f8fcb3/bun.lockb -------------------------------------------------------------------------------- /components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "default", 4 | "rsc": false, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.ts", 8 | "css": "src/index.css", 9 | "baseColor": "slate", 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 | } -------------------------------------------------------------------------------- /eslint.config.js: -------------------------------------------------------------------------------- 1 | import js from "@eslint/js"; 2 | import globals from "globals"; 3 | import reactHooks from "eslint-plugin-react-hooks"; 4 | import reactRefresh from "eslint-plugin-react-refresh"; 5 | import tseslint from "typescript-eslint"; 6 | 7 | export default tseslint.config( 8 | { ignores: ["dist"] }, 9 | { 10 | extends: [js.configs.recommended, ...tseslint.configs.recommended], 11 | files: ["**/*.{ts,tsx}"], 12 | languageOptions: { 13 | ecmaVersion: 2020, 14 | globals: globals.browser, 15 | }, 16 | plugins: { 17 | "react-hooks": reactHooks, 18 | "react-refresh": reactRefresh, 19 | }, 20 | rules: { 21 | ...reactHooks.configs.recommended.rules, 22 | "react-refresh/only-export-components": [ 23 | "warn", 24 | { allowConstantExport: true }, 25 | ], 26 | "@typescript-eslint/no-unused-vars": "off", 27 | }, 28 | } 29 | ); 30 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | cozy-dsa-haven 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vite_react_shadcn_ts", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "vite build", 9 | "build:dev": "vite build --mode development", 10 | "lint": "eslint .", 11 | "preview": "vite preview" 12 | }, 13 | "dependencies": { 14 | "@hookform/resolvers": "^3.9.0", 15 | "@radix-ui/react-accordion": "^1.2.0", 16 | "@radix-ui/react-alert-dialog": "^1.1.1", 17 | "@radix-ui/react-aspect-ratio": "^1.1.0", 18 | "@radix-ui/react-avatar": "^1.1.0", 19 | "@radix-ui/react-checkbox": "^1.1.1", 20 | "@radix-ui/react-collapsible": "^1.1.0", 21 | "@radix-ui/react-context-menu": "^2.2.1", 22 | "@radix-ui/react-dialog": "^1.1.2", 23 | "@radix-ui/react-dropdown-menu": "^2.1.1", 24 | "@radix-ui/react-hover-card": "^1.1.1", 25 | "@radix-ui/react-label": "^2.1.0", 26 | "@radix-ui/react-menubar": "^1.1.1", 27 | "@radix-ui/react-navigation-menu": "^1.2.0", 28 | "@radix-ui/react-popover": "^1.1.1", 29 | "@radix-ui/react-progress": "^1.1.0", 30 | "@radix-ui/react-radio-group": "^1.2.0", 31 | "@radix-ui/react-scroll-area": "^1.1.0", 32 | "@radix-ui/react-select": "^2.1.1", 33 | "@radix-ui/react-separator": "^1.1.0", 34 | "@radix-ui/react-slider": "^1.2.0", 35 | "@radix-ui/react-slot": "^1.1.0", 36 | "@radix-ui/react-switch": "^1.1.0", 37 | "@radix-ui/react-tabs": "^1.1.0", 38 | "@radix-ui/react-toast": "^1.2.1", 39 | "@radix-ui/react-toggle": "^1.1.0", 40 | "@radix-ui/react-toggle-group": "^1.1.0", 41 | "@radix-ui/react-tooltip": "^1.1.4", 42 | "@tanstack/react-query": "^5.56.2", 43 | "class-variance-authority": "^0.7.1", 44 | "clsx": "^2.1.1", 45 | "cmdk": "^1.0.0", 46 | "date-fns": "^3.6.0", 47 | "embla-carousel-react": "^8.3.0", 48 | "framer-motion": "^12.6.0", 49 | "input-otp": "^1.2.4", 50 | "lucide-react": "^0.462.0", 51 | "next-themes": "^0.3.0", 52 | "react": "^18.3.1", 53 | "react-day-picker": "^8.10.1", 54 | "react-dom": "^18.3.1", 55 | "react-hook-form": "^7.53.0", 56 | "react-resizable-panels": "^2.1.3", 57 | "react-router-dom": "^6.26.2", 58 | "recharts": "^2.12.7", 59 | "sonner": "^1.5.0", 60 | "tailwind-merge": "^2.5.2", 61 | "tailwindcss-animate": "^1.0.7", 62 | "vaul": "^0.9.3", 63 | "zod": "^3.23.8" 64 | }, 65 | "devDependencies": { 66 | "@eslint/js": "^9.9.0", 67 | "@tailwindcss/typography": "^0.5.15", 68 | "@types/node": "^22.5.5", 69 | "@types/react": "^18.3.3", 70 | "@types/react-dom": "^18.3.0", 71 | "@vitejs/plugin-react-swc": "^3.5.0", 72 | "autoprefixer": "^10.4.20", 73 | "eslint": "^9.9.0", 74 | "eslint-plugin-react-hooks": "^5.1.0-rc.0", 75 | "eslint-plugin-react-refresh": "^0.4.9", 76 | "globals": "^15.9.0", 77 | "lovable-tagger": "^1.1.7", 78 | "postcss": "^8.4.47", 79 | "tailwindcss": "^3.4.11", 80 | "typescript": "^5.5.3", 81 | "typescript-eslint": "^8.0.1", 82 | "vite": "^5.4.1" 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PRIYESHSINGH24/SMART_DSA_NOTEBOOK/7622a4bfff9bdc865dd2c17b318d4ad6b1f8fcb3/public/favicon.ico -------------------------------------------------------------------------------- /public/placeholder.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: Googlebot 2 | Allow: / 3 | 4 | User-agent: Bingbot 5 | Allow: / 6 | 7 | User-agent: Twitterbot 8 | Allow: / 9 | 10 | User-agent: facebookexternalhit 11 | Allow: / 12 | 13 | User-agent: * 14 | Allow: / 15 | -------------------------------------------------------------------------------- /src/App.css: -------------------------------------------------------------------------------- 1 | #root { 2 | max-width: 1280px; 3 | margin: 0 auto; 4 | padding: 2rem; 5 | text-align: center; 6 | } 7 | 8 | .logo { 9 | height: 6em; 10 | padding: 1.5em; 11 | will-change: filter; 12 | transition: filter 300ms; 13 | } 14 | .logo:hover { 15 | filter: drop-shadow(0 0 2em #646cffaa); 16 | } 17 | .logo.react:hover { 18 | filter: drop-shadow(0 0 2em #61dafbaa); 19 | } 20 | 21 | @keyframes logo-spin { 22 | from { 23 | transform: rotate(0deg); 24 | } 25 | to { 26 | transform: rotate(360deg); 27 | } 28 | } 29 | 30 | @media (prefers-reduced-motion: no-preference) { 31 | a:nth-of-type(2) .logo { 32 | animation: logo-spin infinite 20s linear; 33 | } 34 | } 35 | 36 | .card { 37 | padding: 2em; 38 | } 39 | 40 | .read-the-docs { 41 | color: #888; 42 | } 43 | -------------------------------------------------------------------------------- /src/App.tsx: -------------------------------------------------------------------------------- 1 | 2 | import { Toaster } from "@/components/ui/toaster"; 3 | import { Toaster as Sonner } from "@/components/ui/sonner"; 4 | import { TooltipProvider } from "@/components/ui/tooltip"; 5 | import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; 6 | import { BrowserRouter, Routes, Route } from "react-router-dom"; 7 | import { AuthProvider } from "./context/AuthContext"; 8 | import { AnimatePresence } from "framer-motion"; 9 | import Index from "./pages/Index"; 10 | import Login from "./pages/Login"; 11 | import Signup from "./pages/Signup"; 12 | import NotFound from "./pages/NotFound"; 13 | import Platform from "./pages/Platform"; 14 | import Social from "./pages/Social"; 15 | import Notes from "./pages/Notes"; 16 | 17 | const queryClient = new QueryClient(); 18 | 19 | const App = () => { 20 | return ( 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | } /> 30 | } /> 31 | } /> 32 | } /> 33 | } /> 34 | } /> 35 | } /> 36 | 37 | 38 | 39 | 40 | 41 | 42 | ); 43 | }; 44 | 45 | export default App; 46 | -------------------------------------------------------------------------------- /src/components/AnimatedTransition.tsx: -------------------------------------------------------------------------------- 1 | 2 | import React from "react"; 3 | import { motion } from "framer-motion"; 4 | 5 | interface AnimatedTransitionProps { 6 | children: React.ReactNode; 7 | className?: string; 8 | } 9 | 10 | export const pageVariants = { 11 | initial: { 12 | opacity: 0, 13 | y: 10, 14 | scale: 0.98, 15 | }, 16 | in: { 17 | opacity: 1, 18 | y: 0, 19 | scale: 1, 20 | }, 21 | out: { 22 | opacity: 0, 23 | y: -10, 24 | scale: 0.98, 25 | }, 26 | }; 27 | 28 | export const pageTransition = { 29 | type: "spring", 30 | stiffness: 100, 31 | damping: 20, 32 | duration: 0.4, 33 | }; 34 | 35 | export const AnimatedTransition: React.FC = ({ 36 | children, 37 | className = "" 38 | }) => { 39 | return ( 40 | 48 | {children} 49 | 50 | ); 51 | }; 52 | 53 | export default AnimatedTransition; 54 | -------------------------------------------------------------------------------- /src/components/PlatformCard.tsx: -------------------------------------------------------------------------------- 1 | 2 | import React from "react"; 3 | import { motion } from "framer-motion"; 4 | import { cn } from "@/lib/utils"; 5 | import { ChevronRight, Zap } from "lucide-react"; 6 | 7 | interface PlatformCardProps { 8 | name: string; 9 | icon: string; 10 | description: string; 11 | problemCount: number; 12 | className?: string; 13 | onClick?: () => void; 14 | } 15 | 16 | const PlatformCard: React.FC = ({ 17 | name, 18 | icon, 19 | description, 20 | problemCount, 21 | className, 22 | onClick 23 | }) => { 24 | return ( 25 | 37 |
38 |
39 | {name} 40 |
41 |
42 |

{name}

43 |

44 | 45 | {problemCount} problems 46 |

47 |
48 | 49 |
50 |

{description}

51 | 52 | {/* Enhanced futuristic hover effects */} 53 |
54 |
55 |
56 | 57 | {/* Digital circuit pattern overlay */} 58 |
59 | 60 | {/* Scan line effect */} 61 |
62 |
63 |
64 | 65 | {/* Digital counter effect */} 66 |
67 | ID::{name.charCodeAt(0)}{name.length}{problemCount} 68 |
69 | 70 | ); 71 | }; 72 | 73 | export default PlatformCard; 74 | -------------------------------------------------------------------------------- /src/components/platform/AddProblemForm.tsx: -------------------------------------------------------------------------------- 1 | 2 | import React, { useState } from "react"; 3 | import { Button } from "@/components/ui/button"; 4 | import { Card, CardHeader, CardTitle, CardContent } from "@/components/ui/card"; 5 | import { Input } from "@/components/ui/input"; 6 | import { Textarea } from "@/components/ui/textarea"; 7 | import { Plus } from "lucide-react"; 8 | import { toast } from "sonner"; 9 | 10 | interface AddProblemFormProps { 11 | setSelectedTab: (tab: string) => void; 12 | } 13 | 14 | const AddProblemForm: React.FC = ({ setSelectedTab }) => { 15 | const [newProblem, setNewProblem] = useState({ 16 | title: "", 17 | difficulty: "Easy", 18 | tags: "", 19 | problem: "", 20 | solution: "" 21 | }); 22 | 23 | const handleAddProblem = () => { 24 | if (!newProblem.title || !newProblem.problem || !newProblem.solution) { 25 | toast.error("Please fill in all required fields"); 26 | return; 27 | } 28 | 29 | toast.success("Problem added successfully!"); 30 | setSelectedTab("problems"); 31 | setNewProblem({ title: "", difficulty: "Easy", tags: "", problem: "", solution: "" }); 32 | // In a real app, you would add the problem to the database here 33 | }; 34 | 35 | return ( 36 | 37 | 38 | 39 | 40 | Add New Problem 41 | 42 | 43 | 44 |
45 |
46 | 47 | setNewProblem({...newProblem, title: e.target.value})} 51 | className="bg-background/50 border-border/50 focus-visible:ring-primary" 52 | /> 53 |
54 | 55 |
56 |
57 | 58 | 67 |
68 | 69 |
70 | 71 | setNewProblem({...newProblem, tags: e.target.value})} 75 | className="bg-background/50 border-border/50 focus-visible:ring-primary" 76 | /> 77 |
78 |
79 |
80 | 81 |
82 | 83 |