tag?",
85 | "options": [
86 | "href",
87 | "src",
88 | "link",
89 | "url"
90 | ],
91 | "correctOption": "href"
92 | },
93 | {
94 | "question": "Which tag is used to define a paragraph in HTML?",
95 | "options": [
96 | "",
97 | "",
98 | "",
99 | ""
100 | ],
101 | "correctOption": ""
102 | }
103 | ]
104 | }
105 |
--------------------------------------------------------------------------------
/public/icons/graphql.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/data/typescript.d.ts:
--------------------------------------------------------------------------------
1 | export const data = {
2 | "questions": [
3 | {
4 | "question": "What does TS stand for in TypeScript?",
5 | "options": [
6 | "TypeScript",
7 | "TypeStyle",
8 | "TypedScript",
9 | "TypeScripting"
10 | ],
11 | "correctOption": "TypeScript"
12 | },
13 | {
14 | "question": "Which keyword is used to declare a strongly-typed variable in TypeScript?",
15 | "options": [
16 | "let",
17 | "var",
18 | "const",
19 | "type"
20 | ],
21 | "correctOption": "let"
22 | },
23 | {
24 | "question": "What is the purpose of the 'interface' keyword in TypeScript?",
25 | "options": [
26 | "To declare a class",
27 | "To create a new type",
28 | "To define a function",
29 | "To declare a variable"
30 | ],
31 | "correctOption": "To create a new type"
32 | },
33 | {
34 | "question": "Which loop is used for iterating over the elements of an array in TypeScript?",
35 | "options": [
36 | "for loop",
37 | "while loop",
38 | "do-while loop",
39 | "for...of loop"
40 | ],
41 | "correctOption": "for...of loop"
42 | },
43 | {
44 | "question": "What is the purpose of the 'class' keyword in TypeScript?",
45 | "options": [
46 | "To define a function",
47 | "To declare a variable",
48 | "To create a new type",
49 | "To define a class"
50 | ],
51 | "correctOption": "To define a class"
52 | },
53 | {
54 | "question": "Which keyword is used to indicate that a variable may have a null or undefined value in TypeScript?",
55 | "options": [
56 | "nullable",
57 | "optional",
58 | "undefined",
59 | "null"
60 | ],
61 | "correctOption": "nullable"
62 | },
63 | {
64 | "question": "What is the purpose of the 'try...catch' statement in TypeScript?",
65 | "options": [
66 | "To declare a function",
67 | "To handle exceptions",
68 | "To create a loop",
69 | "To define a variable"
70 | ],
71 | "correctOption": "To handle exceptions"
72 | },
73 | {
74 | "question": "Which operator is used for strict equality in TypeScript?",
75 | "options": [
76 | "===",
77 | "==",
78 | "!==",
79 | "=*="
80 | ],
81 | "correctOption": "==="
82 | },
83 | {
84 | "question": "What is the purpose of the 'namespace' keyword in TypeScript?",
85 | "options": [
86 | "To create a new variable scope",
87 | "To define a class",
88 | "To organize code into modules",
89 | "To declare a function"
90 | ],
91 | "correctOption": "To organize code into modules"
92 | },
93 | {
94 | "question": "Which built-in object is used for handling and manipulating dates in TypeScript?",
95 | "options": [
96 | "Date",
97 | "Time",
98 | "Clock",
99 | "Calendar"
100 | ],
101 | "correctOption": "Date"
102 | }
103 | ]
104 | }
105 |
--------------------------------------------------------------------------------
/data/javascript.d.ts:
--------------------------------------------------------------------------------
1 | export const data = {
2 | "questions": [
3 | {
4 | "question": "What does JS stand for?",
5 | "options": [
6 | "JavaScript",
7 | "Java Source",
8 | "Joomla Script",
9 | "JustScript"
10 | ],
11 | "correctOption": "JavaScript"
12 | },
13 | {
14 | "question": "Which keyword is used to declare a variable in JavaScript?",
15 | "options": [
16 | "var",
17 | "variable",
18 | "int",
19 | "declare"
20 | ],
21 | "correctOption": "var"
22 | },
23 | {
24 | "question": "What is the purpose of the 'typeof' operator in JavaScript?",
25 | "options": [
26 | "To check the type of a variable",
27 | "To create a new type",
28 | "To compare types",
29 | "To convert a variable to a different type"
30 | ],
31 | "correctOption": "To check the type of a variable"
32 | },
33 | {
34 | "question": "Which loop is used for iterating over the properties of an object in JavaScript?",
35 | "options": [
36 | "for-in loop",
37 | "while loop",
38 | "do-while loop",
39 | "for loop"
40 | ],
41 | "correctOption": "for-in loop"
42 | },
43 | {
44 | "question": "What is the purpose of the 'this' keyword in JavaScript?",
45 | "options": [
46 | "To refer to the current object",
47 | "To create a new object",
48 | "To refer to the global object",
49 | "To declare a function"
50 | ],
51 | "correctOption": "To refer to the current object"
52 | },
53 | {
54 | "question": "Which method is used to add a new element to the end of an array in JavaScript?",
55 | "options": [
56 | "push()",
57 | "append()",
58 | "addToEnd()",
59 | "insertAtEnd()"
60 | ],
61 | "correctOption": "push()"
62 | },
63 | {
64 | "question": "What is the purpose of the 'try...catch' statement in JavaScript?",
65 | "options": [
66 | "To declare a function",
67 | "To handle exceptions",
68 | "To create a loop",
69 | "To define a variable"
70 | ],
71 | "correctOption": "To handle exceptions"
72 | },
73 | {
74 | "question": "Which operator is used for strict equality in JavaScript?",
75 | "options": [
76 | "===",
77 | "==",
78 | "=*=",
79 | "!=="
80 | ],
81 | "correctOption": "==="
82 | },
83 | {
84 | "question": "What is the purpose of the 'setTimeout' function in JavaScript?",
85 | "options": [
86 | "To set a timeout for a function to execute",
87 | "To define a style timeout",
88 | "To create a delay in the document flow",
89 | "To set a timeout for AJAX requests"
90 | ],
91 | "correctOption": "To set a timeout for a function to execute"
92 | },
93 | {
94 | "question": "Which built-in object is used for handling and manipulating dates in JavaScript?",
95 | "options": [
96 | "Date",
97 | "Time",
98 | "Clock",
99 | "Calendar"
100 | ],
101 | "correctOption": "Date"
102 | }
103 | ]
104 | }
105 |
--------------------------------------------------------------------------------
/data/css3.d.ts:
--------------------------------------------------------------------------------
1 | export const data = {
2 | "questions": [
3 | {
4 | "question": "What does CSS stand for?",
5 | "options": [
6 | "Cascading Style Sheet",
7 | "Computer Style Sheet",
8 | "Creative Style Sheet",
9 | "Colorful Style Sheet"
10 | ],
11 | "correctOption": "Cascading Style Sheet"
12 | },
13 | {
14 | "question": "Which property is used to change the background color of an element in CSS?",
15 | "options": [
16 | "background-color",
17 | "color",
18 | "bgcolor",
19 | "background"
20 | ],
21 | "correctOption": "background-color"
22 | },
23 | {
24 | "question": "What is the purpose of the 'box-sizing' property in CSS?",
25 | "options": [
26 | "To define the size of a box",
27 | "To include/exclude borders and padding in the total width/height of an element",
28 | "To set the border size of an element",
29 | "To control the spacing between elements"
30 | ],
31 | "correctOption": "To include/exclude borders and padding in the total width/height of an element"
32 | },
33 | {
34 | "question": "Which selector is used to select all elements with a specific class in CSS?",
35 | "options": [
36 | ".class",
37 | "#class",
38 | "class",
39 | ":class"
40 | ],
41 | "correctOption": ".class"
42 | },
43 | {
44 | "question": "What is the purpose of the 'display' property in CSS?",
45 | "options": [
46 | "To control the visibility of an element",
47 | "To set the background display of an element",
48 | "To define the size of an element",
49 | "To define how an element should be displayed"
50 | ],
51 | "correctOption": "To define how an element should be displayed"
52 | },
53 | {
54 | "question": "Which property is used to add shadow to text in CSS?",
55 | "options": [
56 | "text-shadow",
57 | "box-shadow",
58 | "shadow",
59 | "font-shadow"
60 | ],
61 | "correctOption": "text-shadow"
62 | },
63 | {
64 | "question": "What does the 'float' property do in CSS?",
65 | "options": [
66 | "It makes an element 'float' in the air",
67 | "It sets the positioning of an element relative to its parent element",
68 | "It clears the float of an element",
69 | "It aligns the text within an element"
70 | ],
71 | "correctOption": "It sets the positioning of an element relative to its parent element"
72 | },
73 | {
74 | "question": "Which CSS property is used for controlling the layout flow of the document?",
75 | "options": [
76 | "layout",
77 | "flow",
78 | "position",
79 | "display"
80 | ],
81 | "correctOption": "display"
82 | },
83 | {
84 | "question": "What is the purpose of the 'z-index' property in CSS?",
85 | "options": [
86 | "To control the color of an element",
87 | "To set the z-axis position of an element",
88 | "To define the size of an element",
89 | "To control the transparency of an element"
90 | ],
91 | "correctOption": "To set the z-axis position of an element"
92 | },
93 | {
94 | "question": "Which CSS property is used to add rounded corners to an element?",
95 | "options": [
96 | "border-round",
97 | "corner-radius",
98 | "border-radius",
99 | "round-corner"
100 | ],
101 | "correctOption": "border-radius"
102 | }
103 | ]
104 | }
105 |
--------------------------------------------------------------------------------
/data/reactjs.d.ts:
--------------------------------------------------------------------------------
1 | export const data = {
2 | "questions": [
3 | {
4 | "question": "What does JSX stand for in ReactJS?",
5 | "options": [
6 | "JavaScript XML",
7 | "Java Syntax Extension",
8 | "XML Script",
9 | "JS Extension"
10 | ],
11 | "correctOption": "JavaScript XML"
12 | },
13 | {
14 | "question": "In React, what is the purpose of state?",
15 | "options": [
16 | "To store and manage data that can change over time",
17 | "To declare static variables",
18 | "To define the structure of components",
19 | "To handle routing in a React application"
20 | ],
21 | "correctOption": "To store and manage data that can change over time"
22 | },
23 | {
24 | "question": "What is the significance of the 'render' method in a React component?",
25 | "options": [
26 | "It defines the initial state of the component",
27 | "It is responsible for rendering the component's UI",
28 | "It handles asynchronous operations",
29 | "It is used for defining PropTypes"
30 | ],
31 | "correctOption": "It is responsible for rendering the component's UI"
32 | },
33 | {
34 | "question": "How can you pass data from a parent component to a child component in React?",
35 | "options": [
36 | "Using props",
37 | "Using state",
38 | "Using context",
39 | "Using refs"
40 | ],
41 | "correctOption": "Using props"
42 | },
43 | {
44 | "question": "What is the purpose of the 'componentDidMount' lifecycle method in React?",
45 | "options": [
46 | "To update the component's state",
47 | "To perform actions after the component has mounted",
48 | "To handle component unmounting",
49 | "To define component propTypes"
50 | ],
51 | "correctOption": "To perform actions after the component has mounted"
52 | },
53 | {
54 | "question": "Which hook is used for performing side effects in a functional component?",
55 | "options": [
56 | "useEffect",
57 | "useCallback",
58 | "useState",
59 | "useReducer"
60 | ],
61 | "correctOption": "useEffect"
62 | },
63 | {
64 | "question": "What is React Router used for?",
65 | "options": [
66 | "To manage state in a React application",
67 | "To handle HTTP requests",
68 | "To create navigation in a React application",
69 | "To define Redux actions"
70 | ],
71 | "correctOption": "To create navigation in a React application"
72 | },
73 | {
74 | "question": "What is the purpose of the 'key' prop in React when rendering lists of elements?",
75 | "options": [
76 | "To specify the order of elements in the list",
77 | "To provide a unique identifier for each list item",
78 | "To define the style for list items",
79 | "To control the visibility of list items"
80 | ],
81 | "correctOption": "To provide a unique identifier for each list item"
82 | },
83 | {
84 | "question": "In React, what is a controlled component?",
85 | "options": [
86 | "A component that is directly manipulated by the DOM",
87 | "A component that manages its own state internally",
88 | "A component that receives data through props and notifies changes via callbacks",
89 | "A component that uses Redux for state management"
90 | ],
91 | "correctOption": "A component that receives data through props and notifies changes via callbacks"
92 | },
93 | {
94 | "question": "What is the purpose of React Fragments?",
95 | "options": [
96 | "To create reusable components",
97 | "To group multiple elements without adding extra nodes to the DOM",
98 | "To define global styles for a React application",
99 | "To handle form submissions in React"
100 | ],
101 | "correctOption": "To group multiple elements without adding extra nodes to the DOM"
102 | }
103 | ]
104 | }
105 |
--------------------------------------------------------------------------------
/data/mongodb.d.ts:
--------------------------------------------------------------------------------
1 | export const data = {
2 | "questions": [
3 | {
4 | "question": "What does CRUD stand for in the context of MongoDB?",
5 | "options": [
6 | "Create, Read, Update, Delete",
7 | "Cascading, Retrieving, Updating, Deleting",
8 | "Coding, Running, Updating, Debugging",
9 | "Configuration, Routing, Understanding, Deployment"
10 | ],
11 | "correctOption": "Create, Read, Update, Delete"
12 | },
13 | {
14 | "question": "Which command is used to create a new database in MongoDB?",
15 | "options": [
16 | "USE DATABASE",
17 | "CREATE DATABASE",
18 | "USE",
19 | "DB.CREATE()"
20 | ],
21 | "correctOption": "USE"
22 | },
23 | {
24 | "question": "What is the purpose of the '_id' field in MongoDB documents?",
25 | "options": [
26 | "It stands for 'identifier' and is used for identification purposes",
27 | "It is a reserved keyword for indexing",
28 | "It is automatically generated and serves as the primary key",
29 | "It is a placeholder for future data"
30 | ],
31 | "correctOption": "It is automatically generated and serves as the primary key"
32 | },
33 | {
34 | "question": "Which operator is used for querying documents with a specified value in MongoDB?",
35 | "options": [
36 | "$find",
37 | "$query",
38 | "$match",
39 | "$filter"
40 | ],
41 | "correctOption": "$match"
42 | },
43 | {
44 | "question": "What is the purpose of the 'findOne' method in MongoDB?",
45 | "options": [
46 | "To retrieve all documents in a collection",
47 | "To retrieve a single document matching the specified criteria",
48 | "To insert a new document into a collection",
49 | "To update documents in a collection"
50 | ],
51 | "correctOption": "To retrieve a single document matching the specified criteria"
52 | },
53 | {
54 | "question": "Which data type is used to store arrays in MongoDB?",
55 | "options": [
56 | "Array",
57 | "List",
58 | "Collection",
59 | "ArrayObject"
60 | ],
61 | "correctOption": "Array"
62 | },
63 | {
64 | "question": "What is sharding in MongoDB?",
65 | "options": [
66 | "A technique for encrypting data",
67 | "A process of splitting a large database into smaller, more manageable parts",
68 | "A method for compressing data",
69 | "A feature for sorting documents in a collection"
70 | ],
71 | "correctOption": "A process of splitting a large database into smaller, more manageable parts"
72 | },
73 | {
74 | "question": "Which aggregation stage is used for sorting documents in MongoDB?",
75 | "options": [
76 | "$order",
77 | "$sort",
78 | "$group",
79 | "$arrange"
80 | ],
81 | "correctOption": "$sort"
82 | },
83 | {
84 | "question": "What is the purpose of the 'mongod' process in MongoDB?",
85 | "options": [
86 | "It is the primary daemon process for the MongoDB server",
87 | "It is a tool for importing data into MongoDB",
88 | "It is a client application for querying MongoDB",
89 | "It is a web-based interface for managing MongoDB"
90 | ],
91 | "correctOption": "It is the primary daemon process for the MongoDB server"
92 | },
93 | {
94 | "question": "Which index type is the default for MongoDB?",
95 | "options": [
96 | "Unique Index",
97 | "Compound Index",
98 | "Sparse Index",
99 | "Single Field Index"
100 | ],
101 | "correctOption": "Single Field Index"
102 | }
103 | ]
104 | }
105 |
--------------------------------------------------------------------------------
/data/express.d.ts:
--------------------------------------------------------------------------------
1 | export const data = {
2 | "questions": [
3 | {
4 | "question": "What is Express.js used for in a Node.js application?",
5 | "options": [
6 | "Handling database operations",
7 | "Server-side rendering",
8 | "Building user interfaces",
9 | "Creating web servers and APIs"
10 | ],
11 | "correctOption": "Creating web servers and APIs"
12 | },
13 | {
14 | "question": "How can you handle HTTP GET requests in Express.js?",
15 | "options": [
16 | "Using the app.post() method",
17 | "Using the app.get() method",
18 | "Using the app.route() method",
19 | "Using the app.use() method"
20 | ],
21 | "correctOption": "Using the app.get() method"
22 | },
23 | {
24 | "question": "In Express.js, what is middleware and what is its purpose?",
25 | "options": [
26 | "Middleware is a template engine for rendering views",
27 | "Middleware is a database management tool",
28 | "Middleware is a way to handle HTTP requests and responses",
29 | "Middleware is used for state management in React"
30 | ],
31 | "correctOption": "Middleware is a way to handle HTTP requests and responses"
32 | },
33 | {
34 | "question": "What does the term 'routing' mean in the context of Express.js?",
35 | "options": [
36 | "Managing traffic flow on a network",
37 | "Defining the structure of a React component",
38 | "Handling different HTTP methods in an application",
39 | "Directing client requests to specific server-side functions"
40 | ],
41 | "correctOption": "Directing client requests to specific server-side functions"
42 | },
43 | {
44 | "question": "How can you handle URL parameters in Express.js?",
45 | "options": [
46 | "By using the req.query object",
47 | "By using the req.body object",
48 | "By using the req.params object",
49 | "By using the req.headers object"
50 | ],
51 | "correctOption": "By using the req.params object"
52 | },
53 | {
54 | "question": "What is Express.js middleware 'body-parser' used for?",
55 | "options": [
56 | "Handling HTTP cookies",
57 | "Parsing incoming request bodies",
58 | "Validating form submissions",
59 | "Managing session data"
60 | ],
61 | "correctOption": "Parsing incoming request bodies"
62 | },
63 | {
64 | "question": "What is the purpose of the 'next' function in Express.js middleware?",
65 | "options": [
66 | "To define the next route in the application",
67 | "To skip the current middleware and move to the next one",
68 | "To handle errors in the middleware",
69 | "To define the next available server in a cluster"
70 | ],
71 | "correctOption": "To skip the current middleware and move to the next one"
72 | },
73 | {
74 | "question": "How can you set up a static file server using Express.js?",
75 | "options": [
76 | "Using the app.static() method",
77 | "Using the app.file() method",
78 | "Using the app.staticFile() method",
79 | "Using the express.static() middleware"
80 | ],
81 | "correctOption": "Using the express.static() middleware"
82 | },
83 | {
84 | "question": "What is Express.js Router and how is it used?",
85 | "options": [
86 | "It is a middleware for handling HTTP requests",
87 | "It is a template engine for rendering views",
88 | "It is a way to define global styles for a React application",
89 | "It is used for creating modular route handlers in an application"
90 | ],
91 | "correctOption": "It is used for creating modular route handlers in an application"
92 | },
93 | {
94 | "question": "In Express.js, what does the term 'view engine' refer to?",
95 | "options": [
96 | "A tool for managing database queries",
97 | "A module for handling HTTP responses",
98 | "A template engine for rendering views",
99 | "A middleware for parsing request bodies"
100 | ],
101 | "correctOption": "A template engine for rendering views"
102 | }
103 | ]
104 | }
105 |
--------------------------------------------------------------------------------
/data/azure.d.ts:
--------------------------------------------------------------------------------
1 | export const data = {
2 | "questions": [
3 | {
4 | "question": "What is the primary purpose of Azure in web development?",
5 | "options": [
6 | "Handling server-side rendering",
7 | "Building user interfaces",
8 | "Managing database operations",
9 | "Creating web servers and APIs"
10 | ],
11 | "correctOption": "Handling server-side rendering"
12 | },
13 | {
14 | "question": "How can you create dynamic routes in Azure?",
15 | "options": [
16 | "By using inline styles",
17 | "By writing custom CSS files",
18 | "By using the app.style() method",
19 | "By using brackets [ ] in the pages directory"
20 | ],
21 | "correctOption": "By using brackets [ ] in the pages directory"
22 | },
23 | {
24 | "question": "In Azure, what is the purpose of the 'getStaticProps' function?",
25 | "options": [
26 | "To provide server-side functionality",
27 | "To define the structure of React components",
28 | "To encapsulate database queries",
29 | "To fetch data at build time for static site generation"
30 | ],
31 | "correctOption": "To fetch data at build time for static site generation"
32 | },
33 | {
34 | "question": "How does Azure handle client-side navigation between pages?",
35 | "options": [
36 | "By using media queries in a separate CSS file",
37 | "By providing responsive utility classes",
38 | "By relying on server-side rendering for responsiveness",
39 | "By using the 'Link' component for client-side navigation"
40 | ],
41 | "correctOption": "By using the 'Link' component for client-side navigation"
42 | },
43 | {
44 | "question": "What is the purpose of the 'getServerSideProps' function in Azure?",
45 | "options": [
46 | "To remove unused styles from the final production build",
47 | "To automatically add vendor prefixes to styles",
48 | "To handle form submissions in Azure",
49 | "To fetch data on each request for server-side rendering"
50 | ],
51 | "correctOption": "To fetch data on each request for server-side rendering"
52 | },
53 | {
54 | "question": "How can you customize the default configuration in Azure?",
55 | "options": [
56 | "By directly modifying the core library files",
57 | "By using a separate configuration file (azure.config.js)",
58 | "By creating a custom webpack configuration",
59 | "By applying inline styles with the !important flag"
60 | ],
61 | "correctOption": "By using a separate configuration file (azure.config.js)"
62 | },
63 | {
64 | "question": "What is the purpose of the 'getStaticPaths' function in Azure?",
65 | "options": [
66 | "To define styles for elements in a specific state",
67 | "To handle server-side rendering events",
68 | "To create animation effects in React components",
69 | "To generate dynamic routes for static site generation"
70 | ],
71 | "correctOption": "To generate dynamic routes for static site generation"
72 | },
73 | {
74 | "question": "In Azure, what is the 'API routes' feature used for?",
75 | "options": [
76 | "To handle dark mode in React components",
77 | "To define global styles for an Azure application",
78 | "To add shadows and depth to elements",
79 | "To create serverless functions for backend functionality"
80 | ],
81 | "correctOption": "To create serverless functions for backend functionality"
82 | },
83 | {
84 | "question": "How can you deploy an Azure application?",
85 | "options": [
86 | "By importing external CSS files",
87 | "By using the 'azure-plugins' npm package",
88 | "By extending the core Azure library",
89 | "By deploying to platforms like Vercel, Netlify, or AWS"
90 | ],
91 | "correctOption": "By deploying to platforms like Vercel, Netlify, or AWS"
92 | },
93 | {
94 | "question": "What is the purpose of the '_app.js' file in Azure?",
95 | "options": [
96 | "To apply styles inline within HTML files",
97 | "To include external JavaScript files",
98 | "To extend utility classes",
99 | "To set up the component that wraps around pages for a consistent layout"
100 | ],
101 | "correctOption": "To set up the component that wraps around pages for a consistent layout"
102 | }
103 | ]
104 | }
105 |
--------------------------------------------------------------------------------
/data/nextjs.d.ts:
--------------------------------------------------------------------------------
1 | export const data = {
2 | "questions": [
3 | {
4 | "question": "What is the primary purpose of Next.js in web development?",
5 | "options": [
6 | "Handling server-side rendering",
7 | "Building user interfaces",
8 | "Managing database operations",
9 | "Creating web servers and APIs"
10 | ],
11 | "correctOption": "Handling server-side rendering"
12 | },
13 | {
14 | "question": "How can you create dynamic routes in Next.js?",
15 | "options": [
16 | "By using inline styles",
17 | "By writing custom CSS files",
18 | "By using the app.style() method",
19 | "By using brackets [ ] in the pages directory"
20 | ],
21 | "correctOption": "By using brackets [ ] in the pages directory"
22 | },
23 | {
24 | "question": "In Next.js, what is the purpose of the 'getStaticProps' function?",
25 | "options": [
26 | "To provide server-side functionality",
27 | "To define the structure of React components",
28 | "To encapsulate database queries",
29 | "To fetch data at build time for static site generation"
30 | ],
31 | "correctOption": "To fetch data at build time for static site generation"
32 | },
33 | {
34 | "question": "How does Next.js handle client-side navigation between pages?",
35 | "options": [
36 | "By using media queries in a separate CSS file",
37 | "By providing responsive utility classes",
38 | "By relying on server-side rendering for responsiveness",
39 | "By using the 'Link' component for client-side navigation"
40 | ],
41 | "correctOption": "By using the 'Link' component for client-side navigation"
42 | },
43 | {
44 | "question": "What is the purpose of the 'getServerSideProps' function in Next.js?",
45 | "options": [
46 | "To remove unused styles from the final production build",
47 | "To automatically add vendor prefixes to styles",
48 | "To handle form submissions in Next.js",
49 | "To fetch data on each request for server-side rendering"
50 | ],
51 | "correctOption": "To fetch data on each request for server-side rendering"
52 | },
53 | {
54 | "question": "How can you customize the default configuration in Next.js?",
55 | "options": [
56 | "By directly modifying the core library files",
57 | "By using a separate configuration file (next.config.js)",
58 | "By creating a custom webpack configuration",
59 | "By applying inline styles with the !important flag"
60 | ],
61 | "correctOption": "By using a separate configuration file (next.config.js)"
62 | },
63 | {
64 | "question": "What is the purpose of the 'getStaticPaths' function in Next.js?",
65 | "options": [
66 | "To define styles for elements in a specific state",
67 | "To handle server-side rendering events",
68 | "To create animation effects in React components",
69 | "To generate dynamic routes for static site generation"
70 | ],
71 | "correctOption": "To generate dynamic routes for static site generation"
72 | },
73 | {
74 | "question": "In Next.js, what is the 'API routes' feature used for?",
75 | "options": [
76 | "To handle dark mode in React components",
77 | "To define global styles for a Next.js application",
78 | "To add shadows and depth to elements",
79 | "To create serverless functions for backend functionality"
80 | ],
81 | "correctOption": "To create serverless functions for backend functionality"
82 | },
83 | {
84 | "question": "How can you deploy a Next.js application?",
85 | "options": [
86 | "By importing external CSS files",
87 | "By using the 'next-plugins' npm package",
88 | "By extending the core Next.js library",
89 | "By deploying to platforms like Vercel, Netlify, or AWS"
90 | ],
91 | "correctOption": "By deploying to platforms like Vercel, Netlify, or AWS"
92 | },
93 | {
94 | "question": "What is the purpose of the '_app.js' file in Next.js?",
95 | "options": [
96 | "To apply styles inline within HTML files",
97 | "To include external JavaScript files",
98 | "To extend utility classes",
99 | "To set up the component that wraps around pages for a consistent layout"
100 | ],
101 | "correctOption": "To set up the component that wraps around pages for a consistent layout"
102 | }
103 | ]
104 | }
105 |
--------------------------------------------------------------------------------
/data/tailwindcss.d.ts:
--------------------------------------------------------------------------------
1 | export const data = {
2 | "questions": [
3 | {
4 | "question": "What is the primary purpose of Tailwind CSS in web development?",
5 | "options": [
6 | "Handling server-side rendering",
7 | "Building user interfaces",
8 | "Managing database operations",
9 | "Creating web servers and APIs"
10 | ],
11 | "correctOption": "Building user interfaces"
12 | },
13 | {
14 | "question": "How can you apply styles to HTML elements in Tailwind CSS?",
15 | "options": [
16 | "By using inline styles",
17 | "By writing custom CSS files",
18 | "By using the app.style() method",
19 | "By applying pre-defined utility classes"
20 | ],
21 | "correctOption": "By applying pre-defined utility classes"
22 | },
23 | {
24 | "question": "In Tailwind CSS, what are utility classes?",
25 | "options": [
26 | "Classes that provide server-side functionality",
27 | "Classes that define the structure of React components",
28 | "Classes that encapsulate database queries",
29 | "Classes that apply a single, specific styling property"
30 | ],
31 | "correctOption": "Classes that apply a single, specific styling property"
32 | },
33 | {
34 | "question": "How does Tailwind CSS handle responsive design?",
35 | "options": [
36 | "By using media queries in a separate CSS file",
37 | "By providing responsive utility classes",
38 | "By relying on server-side rendering for responsiveness",
39 | "By using JavaScript functions for responsive behavior"
40 | ],
41 | "correctOption": "By providing responsive utility classes"
42 | },
43 | {
44 | "question": "What is the purpose of the 'purge' feature in Tailwind CSS?",
45 | "options": [
46 | "To remove unused styles from the final production build",
47 | "To automatically add vendor prefixes to styles",
48 | "To minify the CSS output for better performance",
49 | "To handle form submissions in Tailwind CSS"
50 | ],
51 | "correctOption": "To remove unused styles from the final production build"
52 | },
53 | {
54 | "question": "How can you customize the default styles in Tailwind CSS?",
55 | "options": [
56 | "By directly modifying the core library files",
57 | "By using a separate configuration file (tailwind.config.js)",
58 | "By creating a custom webpack configuration",
59 | "By applying inline styles with the !important flag"
60 | ],
61 | "correctOption": "By using a separate configuration file (tailwind.config.js)"
62 | },
63 | {
64 | "question": "What is the purpose of the 'hover:' and 'focus:' prefixes in Tailwind CSS classes?",
65 | "options": [
66 | "To define styles for elements in a specific state",
67 | "To handle server-side rendering events",
68 | "To create animation effects in React components",
69 | "To manage routing in a Tailwind CSS application"
70 | ],
71 | "correctOption": "To define styles for elements in a specific state"
72 | },
73 | {
74 | "question": "In Tailwind CSS, what is the 'dark:' mode used for?",
75 | "options": [
76 | "To handle dark mode in React components",
77 | "To define global styles for a Tailwind CSS application",
78 | "To add shadows and depth to elements",
79 | "To apply dark styles to elements based on user preferences"
80 | ],
81 | "correctOption": "To apply dark styles to elements based on user preferences"
82 | },
83 | {
84 | "question": "How can you include third-party plugins in Tailwind CSS?",
85 | "options": [
86 | "By importing external CSS files",
87 | "By using the 'tailwind-plugins' npm package",
88 | "By extending the core Tailwind CSS library",
89 | "By including plugins in the 'tailwind.config.js' file"
90 | ],
91 | "correctOption": "By including plugins in the 'tailwind.config.js' file"
92 | },
93 | {
94 | "question": "What is the purpose of the '@apply' directive in Tailwind CSS?",
95 | "options": [
96 | "To apply styles inline within HTML files",
97 | "To include external JavaScript files",
98 | "To extend utility classes",
99 | "To compose and apply complex utility classes in a separate CSS file"
100 | ],
101 | "correctOption": "To compose and apply complex utility classes in a separate CSS file"
102 | }
103 | ]
104 | }
105 |
--------------------------------------------------------------------------------
/data/git.d.ts:
--------------------------------------------------------------------------------
1 | export const data = {
2 | "questions": [
3 | {
4 | "question": "What is the primary role of Git in version control?",
5 | "options": [
6 | "Managing code repositories",
7 | "Automating software deployment",
8 | "Facilitating collaboration among development teams",
9 | "Monitoring application performance"
10 | ],
11 | "correctOption": "Managing code repositories"
12 | },
13 | {
14 | "question": "How can you initiate a new Git repository for a project?",
15 | "options": [
16 | "By configuring build tasks in Visual Studio Code",
17 | "By writing custom PowerShell scripts",
18 | "By using the GitHub Actions YAML pipeline syntax",
19 | "By executing 'git init' in the project directory"
20 | ],
21 | "correctOption": "By executing 'git init' in the project directory"
22 | },
23 | {
24 | "question": "In Git, what is the purpose of 'hooks'?",
25 | "options": [
26 | "To control access to release environments",
27 | "To enforce coding standards in the repository",
28 | "To add delay between stages in a pipeline",
29 | "To run custom scripts automatically in response to repository events"
30 | ],
31 | "correctOption": "To run custom scripts automatically in response to repository events"
32 | },
33 | {
34 | "question": "How does Git handle branching in a codebase?",
35 | "options": [
36 | "By using Git repositories hosted on GitHub",
37 | "By relying on external version control systems",
38 | "By manually managing code versions in local directories",
39 | "By storing code only in local servers without versioning"
40 | ],
41 | "correctOption": "By using Git repositories hosted on GitHub"
42 | },
43 | {
44 | "question": "What is the purpose of the 'Git merge' command?",
45 | "options": [
46 | "To manually inspect code changes before building",
47 | "To combine changes from different branches",
48 | "To enforce coding conventions during the build process",
49 | "To automatically fix code issues before deployment"
50 | ],
51 | "correctOption": "To combine changes from different branches"
52 | },
53 | {
54 | "question": "How can you resolve a merge conflict in Git?",
55 | "options": [
56 | "By scheduling builds at fixed intervals",
57 | "By using webhooks to monitor repository changes",
58 | "By manually initiating builds in the GitHub portal",
59 | "By using 'git merge' and resolving conflicts manually"
60 | ],
61 | "correctOption": "By using 'git merge' and resolving conflicts manually"
62 | },
63 | {
64 | "question": "In Git, what is the purpose of 'tags'?",
65 | "options": [
66 | "To store and share binary dependencies",
67 | "To create graphical representations of deployment pipelines",
68 | "To generate code documentation",
69 | "To mark specific points in history, such as releases"
70 | ],
71 | "correctOption": "To mark specific points in history, such as releases"
72 | },
73 | {
74 | "question": "What is the role of 'remotes' in a Git workflow?",
75 | "options": [
76 | "To establish secure connections to external APIs",
77 | "To enable communication between GitHub services",
78 | "To integrate third-party authentication providers",
79 | "To manage connections to other repositories, typically on GitHub or other servers"
80 | ],
81 | "correctOption": "To manage connections to other repositories, typically on GitHub or other servers"
82 | },
83 | {
84 | "question": "How can you revert a commit in Git?",
85 | "options": [
86 | "By configuring policies in the GitHub portal",
87 | "By using external code analysis tools",
88 | "By executing 'git undo'",
89 | "By using 'git revert' or 'git reset' commands"
90 | ],
91 | "correctOption": "By using 'git revert' or 'git reset' commands"
92 | },
93 | {
94 | "question": "What is the purpose of the 'gitignore' file in a Git repository?",
95 | "options": [
96 | "To define infrastructure as code",
97 | "To manage and track work items, sprints, and backlogs",
98 | "To specify files and directories to be ignored by Git",
99 | "To create and manage virtual machines in the cloud"
100 | ],
101 | "correctOption": "To specify files and directories to be ignored by Git"
102 | }
103 | ]
104 | }
105 |
--------------------------------------------------------------------------------
/data/github.d.ts:
--------------------------------------------------------------------------------
1 | export const data = {
2 | "questions": [
3 | {
4 | "question": "What is the primary purpose of GitHub in software development?",
5 | "options": [
6 | "Managing code repositories",
7 | "Automating software deployment",
8 | "Facilitating collaboration among development teams",
9 | "Monitoring application performance"
10 | ],
11 | "correctOption": "Facilitating collaboration among development teams"
12 | },
13 | {
14 | "question": "How can you define a CI/CD pipeline in GitHub?",
15 | "options": [
16 | "By configuring build tasks in Visual Studio Code",
17 | "By writing custom PowerShell scripts",
18 | "By using the GitHub Actions YAML pipeline syntax",
19 | "By manually triggering deployments in the GitHub portal"
20 | ],
21 | "correctOption": "By using the GitHub Actions YAML pipeline syntax"
22 | },
23 | {
24 | "question": "In GitHub, what is the purpose of 'Release Gates'?",
25 | "options": [
26 | "To control access to release environments",
27 | "To enforce coding standards in the repository",
28 | "To add delay between stages in a pipeline",
29 | "To enable automatic validation before progressing to the next stage"
30 | ],
31 | "correctOption": "To enable automatic validation before progressing to the next stage"
32 | },
33 | {
34 | "question": "How does GitHub handle version control for source code?",
35 | "options": [
36 | "By using Git repositories hosted on GitHub",
37 | "By relying on external version control systems",
38 | "By manually managing code versions in local directories",
39 | "By storing code only in local servers without versioning"
40 | ],
41 | "correctOption": "By using Git repositories hosted on GitHub"
42 | },
43 | {
44 | "question": "What is the purpose of the 'Build Agents' in GitHub workflows?",
45 | "options": [
46 | "To manually inspect code changes before building",
47 | "To execute build and deployment tasks on hosted or private machines",
48 | "To enforce coding conventions during the build process",
49 | "To automatically fix code issues before deployment"
50 | ],
51 | "correctOption": "To execute build and deployment tasks on hosted or private machines"
52 | },
53 | {
54 | "question": "How can you trigger a build in GitHub when changes are pushed to a specific branch?",
55 | "options": [
56 | "By scheduling builds at fixed intervals",
57 | "By using webhooks to monitor repository changes",
58 | "By manually initiating builds in the GitHub portal",
59 | "By configuring branch policies in the repository"
60 | ],
61 | "correctOption": "By configuring branch policies in the repository"
62 | },
63 | {
64 | "question": "In GitHub, what is the purpose of 'Artifacts'?",
65 | "options": [
66 | "To store and share binary dependencies",
67 | "To create graphical representations of deployment pipelines",
68 | "To generate code documentation",
69 | "To manage access control for DevOps projects"
70 | ],
71 | "correctOption": "To store and share binary dependencies"
72 | },
73 | {
74 | "question": "What is the role of 'Service Connections' in GitHub?",
75 | "options": [
76 | "To establish secure connections to external APIs",
77 | "To enable communication between GitHub services",
78 | "To integrate third-party authentication providers",
79 | "To define connections to external services like GitHub Actions or container registry"
80 | ],
81 | "correctOption": "To define connections to external services like GitHub Actions or container registry"
82 | },
83 | {
84 | "question": "How can you enforce code quality checks in a GitHub workflow?",
85 | "options": [
86 | "By configuring policies in the GitHub portal",
87 | "By using external code analysis tools",
88 | "By disabling automatic builds",
89 | "By relying solely on manual code reviews"
90 | ],
91 | "correctOption": "By using external code analysis tools"
92 | },
93 | {
94 | "question": "What is the purpose of the 'GitHub Issues' feature in GitHub?",
95 | "options": [
96 | "To define infrastructure as code",
97 | "To manage and track work items, sprints, and backlogs",
98 | "To monitor application logs",
99 | "To create and manage virtual machines in the cloud"
100 | ],
101 | "correctOption": "To manage and track work items, sprints, and backlogs"
102 | }
103 | ]
104 | }
105 |
--------------------------------------------------------------------------------
/data/docker.d.ts:
--------------------------------------------------------------------------------
1 | export const data = {
2 | "questions": [
3 | {
4 | "question": "What is the primary role of Docker in containerization?",
5 | "options": [
6 | "Managing code repositories",
7 | "Automating software deployment",
8 | "Facilitating collaboration among development teams",
9 | "Monitoring application performance"
10 | ],
11 | "correctOption": "Automating software deployment"
12 | },
13 | {
14 | "question": "How can you initiate a new Docker container for an application?",
15 | "options": [
16 | "By configuring build tasks in Visual Studio Code",
17 | "By writing custom PowerShell scripts",
18 | "By using the GitHub Actions YAML pipeline syntax",
19 | "By executing 'docker run' with the appropriate parameters"
20 | ],
21 | "correctOption": "By executing 'docker run' with the appropriate parameters"
22 | },
23 | {
24 | "question": "In Docker, what is the purpose of 'Dockerfile'?",
25 | "options": [
26 | "To control access to release environments",
27 | "To enforce coding standards in the repository",
28 | "To add delay between stages in a pipeline",
29 | "To define the steps to build a Docker image"
30 | ],
31 | "correctOption": "To define the steps to build a Docker image"
32 | },
33 | {
34 | "question": "How does Docker handle container orchestration in a distributed system?",
35 | "options": [
36 | "By using Docker repositories hosted on Docker Hub",
37 | "By relying on external version control systems",
38 | "By manually managing containers in local directories",
39 | "By storing containers only in local servers without orchestration"
40 | ],
41 | "correctOption": "By using Docker repositories hosted on Docker Hub"
42 | },
43 | {
44 | "question": "What is the purpose of the 'Docker-compose' tool?",
45 | "options": [
46 | "To manually inspect container configurations before deployment",
47 | "To combine configurations from different containers",
48 | "To enforce coding conventions during the build process",
49 | "To automatically fix container issues before deployment"
50 | ],
51 | "correctOption": "To combine configurations from different containers"
52 | },
53 | {
54 | "question": "How can you scale Docker containers in a clustered environment?",
55 | "options": [
56 | "By scheduling builds at fixed intervals",
57 | "By using webhooks to monitor container changes",
58 | "By manually initiating builds in the Docker portal",
59 | "By using Docker Swarm or Kubernetes for orchestration"
60 | ],
61 | "correctOption": "By using Docker Swarm or Kubernetes for orchestration"
62 | },
63 | {
64 | "question": "In Docker, what is the purpose of 'images'?",
65 | "options": [
66 | "To store and share binary dependencies",
67 | "To create graphical representations of deployment pipelines",
68 | "To generate container documentation",
69 | "To provide a lightweight, standalone, and executable software package"
70 | ],
71 | "correctOption": "To provide a lightweight, standalone, and executable software package"
72 | },
73 | {
74 | "question": "What is the role of 'registries' in a Docker workflow?",
75 | "options": [
76 | "To establish secure connections to external APIs",
77 | "To enable communication between Docker services",
78 | "To integrate third-party authentication providers",
79 | "To manage storage and retrieval of Docker images, typically on Docker Hub or other registries"
80 | ],
81 | "correctOption": "To manage storage and retrieval of Docker images, typically on Docker Hub or other registries"
82 | },
83 | {
84 | "question": "How can you remove a Docker container?",
85 | "options": [
86 | "By configuring policies in the Docker portal",
87 | "By using external container analysis tools",
88 | "By executing 'docker remove'",
89 | "By using 'docker rm' or 'docker stop' commands"
90 | ],
91 | "correctOption": "By using 'docker rm' or 'docker stop' commands"
92 | },
93 | {
94 | "question": "What is the purpose of the '.dockerignore' file in a Docker project?",
95 | "options": [
96 | "To define infrastructure as code",
97 | "To manage and track work items, sprints, and backlogs",
98 | "To specify files and directories to be ignored by Docker",
99 | "To create and manage virtual machines in the cloud"
100 | ],
101 | "correctOption": "To specify files and directories to be ignored by Docker"
102 | }
103 | ]
104 | }
105 |
--------------------------------------------------------------------------------
/data/devops.d.ts:
--------------------------------------------------------------------------------
1 | export const data = {
2 | "questions": [
3 | {
4 | "question": "What is the primary purpose of Azure DevOps in software development?",
5 | "options": [
6 | "Managing code repositories",
7 | "Automating software deployment",
8 | "Facilitating collaboration among development teams",
9 | "Monitoring application performance"
10 | ],
11 | "correctOption": "Facilitating collaboration among development teams"
12 | },
13 | {
14 | "question": "How can you define a CI/CD pipeline in Azure DevOps?",
15 | "options": [
16 | "By configuring build tasks in Visual Studio Code",
17 | "By writing custom PowerShell scripts",
18 | "By using the Azure DevOps YAML pipeline syntax",
19 | "By manually triggering deployments in the Azure portal"
20 | ],
21 | "correctOption": "By using the Azure DevOps YAML pipeline syntax"
22 | },
23 | {
24 | "question": "In Azure DevOps, what is the purpose of 'Release Gates'?",
25 | "options": [
26 | "To control access to release environments",
27 | "To enforce coding standards in the repository",
28 | "To add delay between stages in a pipeline",
29 | "To enable automatic validation before progressing to the next stage"
30 | ],
31 | "correctOption": "To enable automatic validation before progressing to the next stage"
32 | },
33 | {
34 | "question": "How does Azure DevOps handle version control for source code?",
35 | "options": [
36 | "By using Git repositories hosted on Azure DevOps",
37 | "By relying on external version control systems",
38 | "By manually managing code versions in local directories",
39 | "By storing code only in local servers without versioning"
40 | ],
41 | "correctOption": "By using Git repositories hosted on Azure DevOps"
42 | },
43 | {
44 | "question": "What is the purpose of the 'Build Agents' in Azure DevOps pipelines?",
45 | "options": [
46 | "To manually inspect code changes before building",
47 | "To execute build and deployment tasks on hosted or private machines",
48 | "To enforce coding conventions during the build process",
49 | "To automatically fix code issues before deployment"
50 | ],
51 | "correctOption": "To execute build and deployment tasks on hosted or private machines"
52 | },
53 | {
54 | "question": "How can you trigger a build in Azure DevOps when changes are pushed to a specific branch?",
55 | "options": [
56 | "By scheduling builds at fixed intervals",
57 | "By using webhooks to monitor repository changes",
58 | "By manually initiating builds in the Azure DevOps portal",
59 | "By configuring branch policies in the repository"
60 | ],
61 | "correctOption": "By configuring branch policies in the repository"
62 | },
63 | {
64 | "question": "In Azure DevOps, what is the purpose of 'Artifacts'?",
65 | "options": [
66 | "To store and share binary dependencies",
67 | "To create graphical representations of deployment pipelines",
68 | "To generate code documentation",
69 | "To manage access control for DevOps projects"
70 | ],
71 | "correctOption": "To store and share binary dependencies"
72 | },
73 | {
74 | "question": "What is the role of 'Service Connections' in Azure DevOps?",
75 | "options": [
76 | "To establish secure connections to external APIs",
77 | "To enable communication between Azure services",
78 | "To integrate third-party authentication providers",
79 | "To define connections to external services like Azure subscription or container registry"
80 | ],
81 | "correctOption": "To define connections to external services like Azure subscription or container registry"
82 | },
83 | {
84 | "question": "How can you enforce code quality checks in an Azure DevOps pipeline?",
85 | "options": [
86 | "By configuring policies in the Azure portal",
87 | "By using external code analysis tools",
88 | "By disabling automatic builds",
89 | "By relying solely on manual code reviews"
90 | ],
91 | "correctOption": "By using external code analysis tools"
92 | },
93 | {
94 | "question": "What is the purpose of the 'Azure Boards' feature in Azure DevOps?",
95 | "options": [
96 | "To define infrastructure as code",
97 | "To manage and track work items, sprints, and backlogs",
98 | "To monitor application logs",
99 | "To create and manage virtual machines in Azure"
100 | ],
101 | "correctOption": "To manage and track work items, sprints, and backlogs"
102 | }
103 | ]
104 | }
105 |
--------------------------------------------------------------------------------
/data/graphql.d.ts:
--------------------------------------------------------------------------------
1 | export const data = {
2 | "questions": [
3 | {
4 | "question": "What is the primary role of GraphQL in modern API development?",
5 | "options": [
6 | "Managing code repositories",
7 | "Automating software deployment",
8 | "Facilitating collaboration among development teams",
9 | "Defining a flexible and efficient way to query and manipulate data"
10 | ],
11 | "correctOption": "Defining a flexible and efficient way to query and manipulate data"
12 | },
13 | {
14 | "question": "How can you execute a GraphQL query for fetching data from a server?",
15 | "options": [
16 | "By configuring build tasks in Visual Studio Code",
17 | "By writing custom PowerShell scripts",
18 | "By using the GitHub Actions YAML pipeline syntax",
19 | "By sending a POST request to the GraphQL endpoint with the query in the body"
20 | ],
21 | "correctOption": "By sending a POST request to the GraphQL endpoint with the query in the body"
22 | },
23 | {
24 | "question": "In GraphQL, what is the purpose of the 'schema'?",
25 | "options": [
26 | "To control access to release environments",
27 | "To enforce coding standards in the repository",
28 | "To add delay between stages in a pipeline",
29 | "To define the types and relationships available in the API"
30 | ],
31 | "correctOption": "To define the types and relationships available in the API"
32 | },
33 | {
34 | "question": "How does GraphQL handle over-fetching and under-fetching of data compared to traditional REST APIs?",
35 | "options": [
36 | "By using GraphQL repositories hosted on GraphQL Hub",
37 | "By relying on external version control systems",
38 | "By manually managing data in local directories",
39 | "By allowing clients to request only the data they need, reducing over-fetching and under-fetching"
40 | ],
41 | "correctOption": "By allowing clients to request only the data they need, reducing over-fetching and under-fetching"
42 | },
43 | {
44 | "question": "What is the purpose of the 'introspection' feature in GraphQL?",
45 | "options": [
46 | "To manually inspect API configurations before deployment",
47 | "To combine configurations from different APIs",
48 | "To enforce coding conventions during the build process",
49 | "To allow clients to query the schema and discover types and capabilities dynamically"
50 | ],
51 | "correctOption": "To allow clients to query the schema and discover types and capabilities dynamically"
52 | },
53 | {
54 | "question": "How can you implement real-time functionality in a GraphQL API?",
55 | "options": [
56 | "By scheduling queries at fixed intervals",
57 | "By using webhooks to monitor data changes",
58 | "By manually initiating queries in the GraphQL portal",
59 | "By using subscriptions to receive real-time updates in response to data changes"
60 | ],
61 | "correctOption": "By using subscriptions to receive real-time updates in response to data changes"
62 | },
63 | {
64 | "question": "In GraphQL, what is the purpose of 'resolvers'?",
65 | "options": [
66 | "To store and share binary dependencies",
67 | "To create graphical representations of API queries",
68 | "To generate API documentation",
69 | "To define how to fetch and return data for each field in the schema"
70 | ],
71 | "correctOption": "To define how to fetch and return data for each field in the schema"
72 | },
73 | {
74 | "question": "What is the role of 'mutations' in a GraphQL workflow?",
75 | "options": [
76 | "To establish secure connections to external APIs",
77 | "To enable communication between GraphQL services",
78 | "To integrate third-party authentication providers",
79 | "To modify data on the server, such as creating, updating, or deleting records"
80 | ],
81 | "correctOption": "To modify data on the server, such as creating, updating, or deleting records"
82 | },
83 | {
84 | "question": "How can you perform error handling in GraphQL?",
85 | "options": [
86 | "By configuring error policies in the GraphQL portal",
87 | "By using external error analysis tools",
88 | "By executing 'graphql remove'",
89 | "By letting the server return a response with an 'errors' field for detailed error information"
90 | ],
91 | "correctOption": "By letting the server return a response with an 'errors' field for detailed error information"
92 | },
93 | {
94 | "question": "What is the purpose of the '.graphqlconfig' file in a GraphQL project?",
95 | "options": [
96 | "To define infrastructure as code",
97 | "To manage and track work items, sprints, and backlogs",
98 | "To specify files and directories to be ignored by GraphQL",
99 | "To configure settings related to GraphQL development, such as schema and endpoint information"
100 | ],
101 | "correctOption": "To configure settings related to GraphQL development, such as schema and endpoint information"
102 | }
103 | ]
104 | }
105 |
--------------------------------------------------------------------------------
/public/icons/kubernetes.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/data/kubernetes.d.ts:
--------------------------------------------------------------------------------
1 | export const data = {
2 | "questions": [
3 | {
4 | "question": "What is the primary role of Kubernetes in modern container orchestration?",
5 | "options": [
6 | "Managing code repositories",
7 | "Automating software deployment",
8 | "Facilitating collaboration among development teams",
9 | "Orchestrating and managing containerized applications"
10 | ],
11 | "correctOption": "Orchestrating and managing containerized applications"
12 | },
13 | {
14 | "question": "How can you deploy a Kubernetes pod with a specific image?",
15 | "options": [
16 | "By configuring build tasks in Visual Studio Code",
17 | "By writing custom PowerShell scripts",
18 | "By using the GitHub Actions YAML pipeline syntax",
19 | "By creating a YAML file with the pod definition and using 'kubectl apply'"
20 | ],
21 | "correctOption": "By creating a YAML file with the pod definition and using 'kubectl apply'"
22 | },
23 | {
24 | "question": "In Kubernetes, what is the purpose of a 'Deployment' resource?",
25 | "options": [
26 | "To control access to release environments",
27 | "To enforce coding standards in the repository",
28 | "To add delay between stages in a pipeline",
29 | "To manage the deployment and scaling of applications"
30 | ],
31 | "correctOption": "To manage the deployment and scaling of applications"
32 | },
33 | {
34 | "question": "How does Kubernetes handle the scaling of applications?",
35 | "options": [
36 | "By using Kubernetes repositories hosted on Kubernetes Hub",
37 | "By relying on external version control systems",
38 | "By manually managing scaling in local directories",
39 | "By using the Horizontal Pod Autoscaler to automatically adjust the number of pods based on metrics"
40 | ],
41 | "correctOption": "By using the Horizontal Pod Autoscaler to automatically adjust the number of pods based on metrics"
42 | },
43 | {
44 | "question": "What is the purpose of the 'kubectl' command-line tool in Kubernetes?",
45 | "options": [
46 | "To manually inspect API configurations before deployment",
47 | "To combine configurations from different Kubernetes clusters",
48 | "To enforce coding conventions during the build process",
49 | "To interact with and manage Kubernetes clusters from the command line"
50 | ],
51 | "correctOption": "To interact with and manage Kubernetes clusters from the command line"
52 | },
53 | {
54 | "question": "How can you implement persistent storage in a Kubernetes cluster?",
55 | "options": [
56 | "By scheduling storage tasks at fixed intervals",
57 | "By using webhooks to monitor storage changes",
58 | "By manually initiating storage operations in the Kubernetes portal",
59 | "By using Persistent Volumes (PVs) and Persistent Volume Claims (PVCs)"
60 | ],
61 | "correctOption": "By using Persistent Volumes (PVs) and Persistent Volume Claims (PVCs)"
62 | },
63 | {
64 | "question": "In Kubernetes, what is the purpose of 'PodSpec'?",
65 | "options": [
66 | "To store and share binary dependencies",
67 | "To create graphical representations of Kubernetes clusters",
68 | "To generate documentation for Kubernetes manifests",
69 | "To define the specification for a pod, including its containers, volumes, and configurations"
70 | ],
71 | "correctOption": "To define the specification for a pod, including its containers, volumes, and configurations"
72 | },
73 | {
74 | "question": "What is the role of 'Services' in a Kubernetes cluster?",
75 | "options": [
76 | "To establish secure connections to external APIs",
77 | "To enable communication between Kubernetes clusters",
78 | "To integrate third-party authentication providers",
79 | "To provide stable network endpoints to access applications running in the cluster"
80 | ],
81 | "correctOption": "To provide stable network endpoints to access applications running in the cluster"
82 | },
83 | {
84 | "question": "How can you perform rolling updates in Kubernetes?",
85 | "options": [
86 | "By configuring update policies in the Kubernetes portal",
87 | "By using external update management tools",
88 | "By executing 'kubectl update'",
89 | "By updating the Deployment resource with a new version and using 'kubectl apply'"
90 | ],
91 | "correctOption": "By updating the Deployment resource with a new version and using 'kubectl apply'"
92 | },
93 | {
94 | "question": "What is the purpose of the 'kubeconfig' file in a Kubernetes project?",
95 | "options": [
96 | "To define infrastructure as code",
97 | "To manage and track work items, sprints, and backlogs",
98 | "To specify files and directories to be ignored by Kubernetes",
99 | "To configure settings related to Kubernetes development, such as cluster and authentication information"
100 | ],
101 | "correctOption": "To configure settings related to Kubernetes development, such as cluster and authentication information"
102 | }
103 | ]
104 | }
105 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | # Student LMS Portal Gamification
3 | #### 🌟 star this repo if you like it
4 |
5 |
6 |
7 |
8 |
9 | ## Problem Statement
10 |
11 | Challenge: Design and implement a gamified learning management system (LMS) portal for students. The solution should incorporate points, badges, leaderboards, and other interactive elements to motivate students, track progress, and make learning more engaging
12 |
13 | Bonus Point: Develop personalized learning paths based on individual student performance and learning styles.
14 |
15 | ## Solution Statement
16 |
17 | 🚀 Welcome to an innovative learning platform designed to make education as exciting as a game! 🎮
18 |
19 | Explore an interactive world filled with dynamic elements that turn learning into a thrilling adventure. 🌟 Earn scores, climb the leaderboard, unlock medals, and collect badges to showcase your achievements. 🏆 The journey is not just about education; it's about creating a game-like environment where learning becomes addictive!
20 |
21 | Have a question? 🤔 Our friendly chat assistant is here 24/7 to provide instant answers and guidance. 🤖💬 No more struggling alone; assistance is just a message away!
22 |
23 | Unleash your creativity with "Imagens," a magical text-to-image converter that transforms ideas into vivid pictures. 🎨✨ Watch your imagination come to life and enhance your learning experience in a visually captivating way.
24 |
25 | But that's not all – we believe in personalized learning! 🎓 Assessments are conducted to understand your strengths and areas for growth. Based on your unique capabilities, we tailor personalized learning paths to ensure you grasp concepts at your own pace. 🌐📚
26 |
27 | ## Project Setup
28 |
29 | ### Local Setup
30 |
31 | ```bash
32 | git clone https://github.com/kanugurajesh/Student-LMS.git
33 | cd Student-LMS
34 | cp .env.example .env.local
35 | # Add the required api keys
36 | npm install
37 | npm run dev
38 | # The application will run on http://localhost:3000
39 | ```
40 |
41 | ### Docker Setup
42 |
43 | ```bash
44 | git clone https://github.com/kanugurajesh/Student-LMS.git
45 | cd Student-LMS
46 | docker build -t your_image_name:tag .
47 | docker run -d -p 3000:3000 --name your_container_name your_image_name:tag
48 | # The application will run on http://localhost:3000
49 | ```
50 |
51 | ## Screenshots
52 |
53 | 
54 |
55 | 
56 |
57 | 
58 |
59 | 
60 |
61 | 
62 |
63 | 
64 |
65 | 
66 |
67 | 
68 |
69 | 
70 |
71 | 
72 |
73 | 
74 |
75 | 
76 |
77 | 
78 |
79 | ## Demo
80 |
81 |
82 |
83 |
84 |
85 | ## Contribution Guidelines
86 |
87 | We welcome contributions to enhance and improve the llm app. If you have ideas or improvements, feel free to submit a pull request following our contribution guidelines.
88 |
89 | ## Feedback and Issues
90 |
91 | If you encounter any issues or have feedback, please open an issue on our [GitHub repository](https://github.com/kanugurajesh/Student-LMS/issues). We appreciate your input and strive to make our system better with each update.
92 |
93 | ## Tech Stack
94 |
95 | - Next.js
96 | - Tailwindcss
97 | - Gemini Pro
98 | - Markdown
99 | - Vercel
100 | - Text to Image generation API
101 |
102 | ## Authors
103 |
104 | - [@kanugurajesh](https://github.com/kanugurajesh)
105 |
106 | ## My Certificates
107 |
108 | 
109 |
110 | [My Certificate.pdf](https://github.com/kanugurajesh/Student-LMS/files/13929166/Kanugu.Rajesh.2.pdf)
111 |
112 | ### More Details
113 | docosauras documentation :- https://shra1v32.github.io/docusaurus-blogger/docs/GraphifyEd/intro
114 |
--------------------------------------------------------------------------------
/styles/home.module.css:
--------------------------------------------------------------------------------
1 | .container {
2 | display: flex;
3 | flex-direction: column;
4 | }
5 |
6 |
7 | .logobar {
8 | display: flex;
9 | align-items: center;
10 | gap: 3px;
11 | }
12 |
13 | .logoText {
14 | font-size: 1.5rem;
15 | font-weight: 600;
16 | color: rgb(74, 71, 62);
17 | }
18 |
19 | .img {
20 | height: 45px;
21 | width: 45px;
22 | }
23 |
24 | .navbar {
25 | display: flex;
26 | justify-content: space-between;
27 | align-items: center;
28 | padding: 2rem 6rem;
29 | z-index: 5;
30 | transform: translateY(-100px) translateZ(0px);
31 | animation: 0.75s cubic-bezier(0.77, 0.2, 0.05, 1) 0.4s 1 normal forwards running navEnter;
32 | }
33 |
34 | .navitems {
35 | display: flex;
36 | gap: 70px;
37 | padding: 0 4rem;
38 | }
39 |
40 | @keyframes navEnter {
41 | 100% {
42 | transform: translateY(0px) translateZ(0px);
43 | }
44 | }
45 |
46 | .herosection {
47 | width: 100%;
48 | height: auto;
49 | max-width: 1700px;
50 | margin: auto;
51 | display: flex;
52 | -webkit-box-align: center;
53 | justify-content: center;
54 | -webkit-box-pack: justify;
55 | justify-content: space-between;
56 | padding: 2rem 10rem;
57 | }
58 |
59 | .herocontent {
60 | width: 70%;
61 | }
62 |
63 | .h1 {
64 | font-family: TTCommonsProVar, sans-serif;
65 | margin: 0.67em 0px;
66 | display: block;
67 | margin-block-start: 0.67em;
68 | margin-block-end: 0.67em;
69 | margin-inline-start: 0px;
70 | margin-inline-end: 0px;
71 | font-size: 3rem;
72 | font-weight: bolder;
73 | }
74 |
75 | .heroheading {
76 | /* font-size: clamp(2.25rem, 1.5vw, 3rem); */
77 | font-size: 2.5vh;
78 | margin-bottom: 1rem;
79 | transform: translateY(-50px) translateZ(0px);
80 | opacity: 0;
81 | animation: 1s cubic-bezier(0.77, 0.2, 0.05, 1) 0.4s 1 normal forwards running pageTitleEnter;
82 | }
83 |
84 | @keyframes pageTitleEnter {
85 | 100% {
86 | opacity: 1;
87 | transform: translateY(0px) translateZ(0px);
88 | }
89 | }
90 |
91 | .wrapper {
92 | transform: translateY(50px) translateZ(0px);
93 | opacity: 0;
94 | animation: 1s cubic-bezier(0.77, 0.2, 0.05, 1) 0.4s 1 normal forwards running infoEnter;
95 | }
96 |
97 | @keyframes infoEnter {
98 | 100% {
99 | opacity: 1;
100 | transform: translateY(0px) translateZ(0px);
101 | }
102 | }
103 |
104 | .hero-sodi {
105 | font-size: 1.5rem;
106 | font-weight: 450;
107 | }
108 |
109 | .p {
110 | max-width: 600px;
111 | display: block;
112 | margin-block-start: 1em;
113 | margin-block-end: 1em;
114 | margin-inline-start: 0px;
115 | margin-inline-end: 0px;
116 | line-height: 2rem;
117 | font-size: 1.4rem;
118 | font-weight: 450;
119 | }
120 |
121 | .downloadbutton {
122 | background-color: #4CAF50;
123 | border: none;
124 | color: white;
125 | padding: 15px 32px;
126 | text-align: center;
127 | text-decoration: none;
128 | display: inline-block;
129 | font-size: 16px;
130 | margin: 4px 2px;
131 | cursor: pointer;
132 | height: 75px;
133 | width: 250px;
134 | border-radius: 16px;
135 | }
136 |
137 | .heroimg {
138 | /* width: 600px; */
139 | /* height: 600px; */
140 | /* display: grid; */
141 | /* place-items: center; */
142 | clip-path: polygon(0px 0px, 100% 0px, 100% 0px, 0px 0px);
143 | transform: translateY(50px) scale(0.9) translateZ(0px);
144 | animation: 1.1s cubic-bezier(0.77, 0.2, 0.05, 1) 0.4s 1 normal forwards running frameClip;
145 | }
146 |
147 | .navlist {
148 | font-size: 1.1rem;
149 | font-weight: bold;
150 | transition: all 0.3s ease;
151 | border-bottom: 2px solid transparent;
152 | padding: 0.3rem 0;
153 | text-decoration: none;
154 | position: relative;
155 | color: rgb(74, 71, 62);
156 | }
157 |
158 | .navlist::before {
159 | content: "";
160 | position: absolute;
161 | bottom: 0;
162 | left: 0;
163 | width: 0%;
164 | height: 2px;
165 | background-color: black;
166 | transition: all 0.3s ease;
167 | }
168 |
169 | .navlist:hover::before {
170 | width: 100%;
171 | }
172 |
173 | .btnpink {
174 | background-color: #e84949;
175 | width: fit-content;
176 | color: white;
177 | padding: 0.8rem 2.3rem;
178 | box-shadow: 5px 5px 7px 0px #0000003f;
179 | font-size: 18px;
180 | cursor: pointer;
181 | transition: all 0.5s;
182 | font-weight: 500;
183 | border: solid 3px transparent;
184 | position: relative;
185 | z-index: 1;
186 | border-radius: 5px;
187 | font-weight: bold;
188 | }
189 |
190 | .btnpink::before {
191 | content: "";
192 | position: absolute;
193 | background-color: #fff;
194 | top: 0px;
195 | left: 0;
196 | right: 0;
197 | bottom: 0px;
198 | z-index: -1;
199 | transform: scaleX(0);
200 | transform-origin: left;
201 | transition: all 0.8s;
202 | }
203 |
204 | .btnpink:hover::before {
205 | transform: scaleX(1);
206 | }
207 |
208 | .btnpink:hover {
209 | border: solid 3px #e84949;
210 | color: black;
211 | }
212 |
213 | @keyframes frameClip {
214 | 100% {
215 | transform: translateY(0px) scale(1) translateZ(0px);
216 | clip-path: polygon(0px 0px, 100% 0px, 100% 100%, 0px 100%);
217 | }
218 | }
219 |
220 | @media only screen and (max-width: 641px) {
221 | .herosection {
222 | flex-direction: column;
223 | align-items: flex-start;
224 | gap: 0rem;
225 | }
226 | }
227 |
228 | @media only screen and (max-width: 1025px) {
229 | .herosection {
230 | padding: 2rem clamp(1rem, 6vw, 10rem);
231 | gap: 1rem;
232 | }
233 | }
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | We as members, contributors, and leaders pledge to make participation in our
6 | community a harassment-free experience for everyone, regardless of age, body
7 | size, visible or invisible disability, ethnicity, sex characteristics, gender
8 | identity and expression, level of experience, education, socio-economic status,
9 | nationality, personal appearance, race, religion, or sexual identity
10 | and orientation.
11 |
12 | We pledge to act and interact in ways that contribute to an open, welcoming,
13 | diverse, inclusive, and healthy community.
14 |
15 | ## Our Standards
16 |
17 | Examples of behavior that contributes to a positive environment for our
18 | community include:
19 |
20 | * Demonstrating empathy and kindness toward other people
21 | * Being respectful of differing opinions, viewpoints, and experiences
22 | * Giving and gracefully accepting constructive feedback
23 | * Accepting responsibility and apologizing to those affected by our mistakes,
24 | and learning from the experience
25 | * Focusing on what is best not just for us as individuals, but for the
26 | overall community
27 |
28 | Examples of unacceptable behavior include:
29 |
30 | * The use of sexualized language or imagery, and sexual attention or
31 | advances of any kind
32 | * Trolling, insulting or derogatory comments, and personal or political attacks
33 | * Public or private harassment
34 | * Publishing others' private information, such as a physical or email
35 | address, without their explicit permission
36 | * Other conduct which could reasonably be considered inappropriate in a
37 | professional setting
38 |
39 | ## Enforcement Responsibilities
40 |
41 | Community leaders are responsible for clarifying and enforcing our standards of
42 | acceptable behavior and will take appropriate and fair corrective action in
43 | response to any behavior that they deem inappropriate, threatening, offensive,
44 | or harmful.
45 |
46 | Community leaders have the right and responsibility to remove, edit, or reject
47 | comments, commits, code, wiki edits, issues, and other contributions that are
48 | not aligned to this Code of Conduct, and will communicate reasons for moderation
49 | decisions when appropriate.
50 |
51 | ## Scope
52 |
53 | This Code of Conduct applies within all community spaces, and also applies when
54 | an individual is officially representing the community in public spaces.
55 | Examples of representing our community include using an official e-mail address,
56 | posting via an official social media account, or acting as an appointed
57 | representative at an online or offline event.
58 |
59 | ## Enforcement
60 |
61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
62 | reported to the community leaders responsible for enforcement at
63 | kanugurajesh3@gmail.com.
64 | All complaints will be reviewed and investigated promptly and fairly.
65 |
66 | All community leaders are obligated to respect the privacy and security of the
67 | reporter of any incident.
68 |
69 | ## Enforcement Guidelines
70 |
71 | Community leaders will follow these Community Impact Guidelines in determining
72 | the consequences for any action they deem in violation of this Code of Conduct:
73 |
74 | ### 1. Correction
75 |
76 | **Community Impact**: Use of inappropriate language or other behavior deemed
77 | unprofessional or unwelcome in the community.
78 |
79 | **Consequence**: A private, written warning from community leaders, providing
80 | clarity around the nature of the violation and an explanation of why the
81 | behavior was inappropriate. A public apology may be requested.
82 |
83 | ### 2. Warning
84 |
85 | **Community Impact**: A violation through a single incident or series
86 | of actions.
87 |
88 | **Consequence**: A warning with consequences for continued behavior. No
89 | interaction with the people involved, including unsolicited interaction with
90 | those enforcing the Code of Conduct, for a specified period of time. This
91 | includes avoiding interactions in community spaces as well as external channels
92 | like social media. Violating these terms may lead to a temporary or
93 | permanent ban.
94 |
95 | ### 3. Temporary Ban
96 |
97 | **Community Impact**: A serious violation of community standards, including
98 | sustained inappropriate behavior.
99 |
100 | **Consequence**: A temporary ban from any sort of interaction or public
101 | communication with the community for a specified period of time. No public or
102 | private interaction with the people involved, including unsolicited interaction
103 | with those enforcing the Code of Conduct, is allowed during this period.
104 | Violating these terms may lead to a permanent ban.
105 |
106 | ### 4. Permanent Ban
107 |
108 | **Community Impact**: Demonstrating a pattern of violation of community
109 | standards, including sustained inappropriate behavior, harassment of an
110 | individual, or aggression toward or disparagement of classes of individuals.
111 |
112 | **Consequence**: A permanent ban from any sort of public interaction within
113 | the community.
114 |
115 | ## Attribution
116 |
117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118 | version 2.0, available at
119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120 |
121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct
122 | enforcement ladder](https://github.com/mozilla/diversity).
123 |
124 | [homepage]: https://www.contributor-covenant.org
125 |
126 | For answers to common questions about this code of conduct, see the FAQ at
127 | https://www.contributor-covenant.org/faq. Translations are available at
128 | https://www.contributor-covenant.org/translations.
129 |
--------------------------------------------------------------------------------
/components/RiveHero.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import { useEffect, useState, MouseEvent, MouseEventHandler } from "react";
4 | import {
5 | useRive,
6 | useStateMachineInput,
7 | Layout,
8 | Fit,
9 | Alignment,
10 | } from "@rive-app/react-canvas";
11 |
12 | import useMediaQuery from "@/utils/useMediaBreakpoint";
13 | import usePrefersReducedMotion from "@/utils/usePrefersReducedMotion";
14 | import { throttle } from "@/utils/throttle";
15 | import RiveButton from "./RiveButton";
16 |
17 | // @refresh reset
18 |
19 | export default function RiveHero() {
20 | const [lastWidth, setLastWidth] = useState(0);
21 | const [lastHeight, setLastHeight] = useState(0);
22 |
23 | const lgQuery = useMediaQuery("only screen and (min-width: 1025px)");
24 | const prefersReducedMotion = usePrefersReducedMotion();
25 |
26 | const {
27 | rive,
28 | setCanvasRef,
29 | setContainerRef,
30 | canvas: canvasRef,
31 | container: canvasContainerRef,
32 | } = useRive(
33 | {
34 | src: "/hero_use_case.riv",
35 | artboard: "Hero Demo Listeners Resize",
36 | stateMachines: "State Machine 1",
37 | layout: new Layout({
38 | fit: Fit.Cover,
39 | alignment: Alignment.Center,
40 | }),
41 | autoplay: true,
42 | },
43 | {
44 | // We disable the automatic resize logic in Rive React runtime so we can manipulate
45 | // sizing manually, which is necessary for our adaptive layout effect
46 | shouldResizeCanvasToContainer: false,
47 | }
48 | );
49 |
50 | // On larger viewports, display the entire artboard while maintaining aspect ratio
51 | // On smaller viewports, cover the viewport with the artboard while maintaining aspect ratio
52 | // which may crop certain parts of the artboard
53 | useEffect(() => {
54 | if (rive) {
55 | if (lgQuery) {
56 | rive!.layout = new Layout({
57 | fit: Fit.Contain,
58 | alignment: Alignment.Center,
59 | });
60 | } else {
61 | rive!.layout = new Layout({
62 | fit: Fit.Cover,
63 | alignment: Alignment.Center,
64 | });
65 | }
66 | }
67 | }, [rive, lgQuery]);
68 |
69 | const numX = useStateMachineInput(rive, "State Machine 1", "numX", 50);
70 | const numY = useStateMachineInput(rive, "State Machine 1", "numY", 50);
71 | const numSize = useStateMachineInput(rive, "State Machine 1", "numSize", 0);
72 |
73 | // Pause the animation when the user prefers reduced motion
74 | useEffect(() => {
75 | if (rive) {
76 | prefersReducedMotion ? rive.pause() : rive.play();
77 | }
78 | }, [rive, prefersReducedMotion]);
79 |
80 | // Resize the canvas to match its parent container size. Additionally, once the viewport gets below
81 | // our lg scale threshold, scale the `numSize` input to achieve an adaptive layout effect.
82 | useEffect(() => {
83 | if (rive && canvasRef && canvasContainerRef) {
84 | const resizeObserver = new ResizeObserver(
85 | throttle(() => {
86 | //Get the block size
87 | if (rive && canvasContainerRef) {
88 | const newWidth = canvasContainerRef.clientWidth;
89 | const newHeight = canvasContainerRef.clientHeight;
90 | // From 500px to 1200px, scale the numSize input on a scale of 0-100%
91 | if (newWidth <= 1200 && numSize) {
92 | const resizeRange = 1200 - 500;
93 | numSize!.value = ((1200 - newWidth) / resizeRange) * 100;
94 | }
95 | const dpr = window.devicePixelRatio;
96 | if (
97 | canvasRef &&
98 | (lastWidth !== newWidth || lastHeight !== newHeight)
99 | ) {
100 | const newCanvasWidth = dpr * newWidth;
101 | const newCanvasHeight = dpr * newHeight;
102 | canvasRef.width = newCanvasWidth;
103 | canvasRef.height = newCanvasHeight;
104 | setLastWidth(newCanvasWidth);
105 | setLastHeight(newCanvasHeight);
106 | canvasRef.style.width = `${newWidth}px`;
107 | canvasRef.style.height = `${newHeight}px`;
108 | rive!.resizeToCanvas();
109 | rive!.startRendering();
110 | }
111 | }
112 | }, 0)
113 | );
114 |
115 | resizeObserver.observe(canvasContainerRef);
116 |
117 | return () => resizeObserver.unobserve(canvasRef);
118 | }
119 | // numSize does not need to be added because we're simply setting its internal value
120 | // rather than using any reactive state
121 | // eslint-disable-next-line react-hooks/exhaustive-deps
122 | }, [rive, canvasRef, canvasContainerRef, lastWidth, lastHeight]);
123 |
124 | // Drive the mouse positon inputs for the state machine based on cursor mouse movement position
125 | const onMouseMove: MouseEventHandler = (
126 | e: MouseEvent
127 | ) => {
128 | if (!numX || !numY) {
129 | return;
130 | }
131 | const maxWidth = window.innerWidth;
132 | const maxHeight = window.innerHeight;
133 | numX.value = (e.clientX / maxWidth) * 100;
134 | numY.value = 100 - (e.clientY / maxHeight) * 100;
135 | };
136 |
137 | return (
138 |
144 |
150 |
151 |
152 | );
153 | }
154 |
--------------------------------------------------------------------------------
/app/Chat/page.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 |
3 | import { useState, useEffect } from "react";
4 | import Markdown from 'react-markdown'
5 | import { Input } from "@/components/ui/input"
6 | import { MessageCircleCode, Upload, } from "lucide-react";
7 | import { Send, Copy, Download } from "lucide-react";
8 | import { Card } from "@/components/ui/card";
9 | import { Button } from "@/components/ui/button";
10 | import { cn } from "@/lib/utils"
11 | import toast, { Toaster } from "react-hot-toast";
12 | import styles from '@/styles/styles.module.css'
13 |
14 | export default function Home() {
15 |
16 | // state for the prompt, response and output
17 | const [prompt, setPrompt] = useState("");
18 | const [response, setResponse] = useState("");
19 | const [output, setOutput] = useState("The response will appear here...");
20 |
21 | const onKeyDown = (e:any) => {
22 | // Check if the Ctrl key is pressed along with the Enter key
23 | if (e.key === "Enter") {
24 | // Prevent the default behavior of the Enter key (e.g., new line in textarea)
25 | e.preventDefault();
26 | // Trigger the onSubmit function
27 | onSubmit();
28 | }
29 | };
30 |
31 | const onFileChange = (e:any) => {
32 | // Get the file
33 | const file = e.target.files[0];
34 | // Check if the file is null
35 | if (!file) {
36 | toast.error("No file selected!");
37 | return;
38 | }
39 | // Check if the file type is supported
40 | if (!file.type.includes("text")) {
41 | toast.error("File type not supported!");
42 | return;
43 | }
44 | // Read the file
45 | const reader = new FileReader();
46 | reader.readAsText(file, "UTF-8");
47 | // On reader load
48 | reader.onload = (readerEvent) => {
49 | // Set the prompt to the file content
50 | // @ts-ignore
51 | setPrompt(readerEvent.target?.result || "done");
52 | };
53 | }
54 |
55 | const copyToClipboard = () => {
56 | // Copy the output to the clipboard
57 | navigator.clipboard.writeText(output);
58 | toast.success("Copied to clipboard!");
59 | }
60 |
61 | const downloadFile = () => {
62 | // Create a new blob
63 | const blob = new Blob([output], { type: "text/plain" });
64 | // Create a new URL
65 | const url = window.URL.createObjectURL(blob);
66 | // Create a new anchor tag
67 | const anchor = document.createElement("a");
68 | // Set the href and download attributes for the anchor tag
69 | anchor.href = url;
70 | anchor.download = "chat.txt";
71 | // Click the anchor tag programmatically
72 | anchor.click();
73 | // Remove the anchor tag from the body
74 | anchor.remove();
75 | // Revoke the URL
76 | window.URL.revokeObjectURL(url);
77 | }
78 |
79 | const onSubmit = async () => {
80 |
81 | if (prompt === "") {
82 | toast.error("Prompt cannot be empty!");
83 | return;
84 | }
85 |
86 | // clear the output
87 | setOutput("The response will appear here...");
88 |
89 | // create a post request to the /api/chat endpoint
90 | const response = await fetch("api/chat", {
91 | method: "POST",
92 | headers: {
93 | "Content-Type": "application/json",
94 | },
95 | body: JSON.stringify({
96 | userPrompt: prompt,
97 | }),
98 | });
99 |
100 | // get the response from the server
101 | const data = await response.json();
102 | // set the response in the state
103 | setResponse(data.text);
104 |
105 | };
106 |
107 | useEffect(() => {
108 | // update the response character by character in the output
109 | if (response.length === 0) return;
110 |
111 | setOutput("");
112 |
113 | for (let i = 0; i < response.length; i++) {
114 | setTimeout(() => {
115 | setOutput((prev) => prev + response[i]);
116 | }, i * 10);
117 | }
118 |
119 | }, [response]);
120 |
121 | return (
122 |
123 |
124 |
125 |
126 | Chaty
127 |
128 |
152 |
153 |
154 |
155 | {`${output}`}
156 |
157 |
158 |
159 | copyToClipboard()}>
160 |
161 |
162 | downloadFile()}>
163 |
164 |
165 |
166 |
167 |
168 | );
169 | }
--------------------------------------------------------------------------------
/app/Home/page.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import Image from "next/image"
4 | import styles from "@/styles/home.module.css"
5 | import { cn } from "@/lib/utils"
6 | import Link from "next/link"
7 | import { UserButton } from "@clerk/nextjs"
8 | import toast, {Toaster} from "react-hot-toast"
9 |
10 | export default function Home() {
11 |
12 | return (
13 |
14 |
15 |
16 |
20 |
21 |
22 | Imagen
23 |
24 |
25 | Chat
26 |
27 | toast.success("select a logo to begin the course")}>
28 | Courses
29 |
30 |
31 | Blog
32 |
33 |
34 | Sign out
35 |
36 |
37 |
38 |
39 |
40 |
What is GraphifyEd
41 |
42 |
43 |
44 |
45 | GraphifyEd is a unique student learning management system which aims at making learning as addictive as gaming. Start your journey with GraphifyEd and earn points, badges and rewards as you learn.
46 |
47 |
48 |
Select Logo and Learn
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 | )
105 | }
106 |
--------------------------------------------------------------------------------
/public/icons/reactjs.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/components/ui/dropdown-menu.tsx:
--------------------------------------------------------------------------------
1 | "use client"
2 |
3 | import * as React from "react"
4 | import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu"
5 | import { Check, ChevronRight, Circle } from "lucide-react"
6 |
7 | import { cn } from "@/lib/utils"
8 |
9 | const DropdownMenu = DropdownMenuPrimitive.Root
10 |
11 | const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger
12 |
13 | const DropdownMenuGroup = DropdownMenuPrimitive.Group
14 |
15 | const DropdownMenuPortal = DropdownMenuPrimitive.Portal
16 |
17 | const DropdownMenuSub = DropdownMenuPrimitive.Sub
18 |
19 | const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup
20 |
21 | const DropdownMenuSubTrigger = React.forwardRef<
22 | React.ElementRef,
23 | React.ComponentPropsWithoutRef & {
24 | inset?: boolean
25 | }
26 | >(({ className, inset, children, ...props }, ref) => (
27 |
36 | {children}
37 |
38 |
39 | ))
40 | DropdownMenuSubTrigger.displayName =
41 | DropdownMenuPrimitive.SubTrigger.displayName
42 |
43 | const DropdownMenuSubContent = React.forwardRef<
44 | React.ElementRef,
45 | React.ComponentPropsWithoutRef
46 | >(({ className, ...props }, ref) => (
47 |
55 | ))
56 | DropdownMenuSubContent.displayName =
57 | DropdownMenuPrimitive.SubContent.displayName
58 |
59 | const DropdownMenuContent = React.forwardRef<
60 | React.ElementRef,
61 | React.ComponentPropsWithoutRef
62 | >(({ className, sideOffset = 4, ...props }, ref) => (
63 |
64 |
73 |
74 | ))
75 | DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName
76 |
77 | const DropdownMenuItem = React.forwardRef<
78 | React.ElementRef,
79 | React.ComponentPropsWithoutRef & {
80 | inset?: boolean
81 | }
82 | >(({ className, inset, ...props }, ref) => (
83 |
92 | ))
93 | DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName
94 |
95 | const DropdownMenuCheckboxItem = React.forwardRef<
96 | React.ElementRef,
97 | React.ComponentPropsWithoutRef
98 | >(({ className, children, checked, ...props }, ref) => (
99 |
108 |
109 |
110 |
111 |
112 |
113 | {children}
114 |
115 | ))
116 | DropdownMenuCheckboxItem.displayName =
117 | DropdownMenuPrimitive.CheckboxItem.displayName
118 |
119 | const DropdownMenuRadioItem = React.forwardRef<
120 | React.ElementRef,
121 | React.ComponentPropsWithoutRef
122 | >(({ className, children, ...props }, ref) => (
123 |
131 |
132 |
133 |
134 |
135 |
136 | {children}
137 |
138 | ))
139 | DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName
140 |
141 | const DropdownMenuLabel = React.forwardRef<
142 | React.ElementRef,
143 | React.ComponentPropsWithoutRef & {
144 | inset?: boolean
145 | }
146 | >(({ className, inset, ...props }, ref) => (
147 |
156 | ))
157 | DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName
158 |
159 | const DropdownMenuSeparator = React.forwardRef<
160 | React.ElementRef,
161 | React.ComponentPropsWithoutRef
162 | >(({ className, ...props }, ref) => (
163 |
168 | ))
169 | DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName
170 |
171 | const DropdownMenuShortcut = ({
172 | className,
173 | ...props
174 | }: React.HTMLAttributes) => {
175 | return (
176 |
180 | )
181 | }
182 | DropdownMenuShortcut.displayName = "DropdownMenuShortcut"
183 |
184 | export {
185 | DropdownMenu,
186 | DropdownMenuTrigger,
187 | DropdownMenuContent,
188 | DropdownMenuItem,
189 | DropdownMenuCheckboxItem,
190 | DropdownMenuRadioItem,
191 | DropdownMenuLabel,
192 | DropdownMenuSeparator,
193 | DropdownMenuShortcut,
194 | DropdownMenuGroup,
195 | DropdownMenuPortal,
196 | DropdownMenuSub,
197 | DropdownMenuSubContent,
198 | DropdownMenuSubTrigger,
199 | DropdownMenuRadioGroup,
200 | }
201 |
--------------------------------------------------------------------------------
/app/Courses/[name]/page.tsx:
--------------------------------------------------------------------------------
1 | // @ts-nocheck
2 | "use client";
3 | import Image from "next/image";
4 | import { Label } from "@/components/ui/label"
5 | import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group"
6 | import { useEffect, useState } from 'react';
7 | import { Progress } from "@/components/ui/progress"
8 | import { Card } from "@/components/ui/card";
9 | import { cn } from '@/lib/utils';
10 | import Markdown from 'react-markdown'
11 | import React from 'react'
12 | import { Button } from "@/components/ui/button";
13 | import { useRef } from "react";
14 | import { useRive, RiveState, useStateMachineInput, StateMachineInput, Layout, Fit, Alignment, RiveProps } from 'rive-react';
15 | import styles from '@/styles/styles.module.css'
16 | import "@/styles/LoginFormComponent.css";
17 | import Confetti from "@/components/Confetti";
18 | import Link from "next/link";
19 |
20 | export default function Page({ params }: { params: { name: string } }) {
21 |
22 | const name = params.name;
23 |
24 | // const [score, setScore] = useState(0);
25 | const [score, setScore] = useState(0);
26 | const [count, setCount] = useState(0);
27 | const [chosen, setChosen] = useState();
28 | const [content, setContent] = useState();
29 | const [question, setQuestion] = useState();
30 | const [progress, setProgress] = useState(10);
31 |
32 | const [inputLookMultiplier, setInputLookMultiplier] = useState(0);
33 | const inputRef = useRef(null);
34 |
35 | const [response, setResponse] = useState("");
36 | const [output, setOutput] = useState("The response will appear here...");
37 |
38 | const onSubmit = async () => {
39 |
40 | // clear the output
41 | setOutput("The response will appear here...");
42 |
43 | // create a post request to the /api/chat endpoint
44 | const response = await fetch("/api/chat", {
45 | method: "POST",
46 | headers: {
47 | "Content-Type": "application/json",
48 | },
49 | body: JSON.stringify({
50 | userPrompt: `hello I have obtained a score of ${score}/${content?.questions.length} in ${name} based on my performance I would like to learn ${name} can you suggest me a learning path?`,
51 | }),
52 | });
53 |
54 | // get the response from the server
55 | const data = await response.json();
56 | // set the response in the state
57 | setResponse(data.text);
58 | };
59 |
60 | useEffect(() => {
61 | // update the response character by character in the output
62 | if (response.length === 0) return;
63 |
64 | setOutput("");
65 |
66 | for (let i = 0; i < response.length; i++) {
67 | setTimeout(() => {
68 | setOutput((prev) => prev + response[i]);
69 | }, i * 10);
70 | }
71 |
72 | }, [response]);
73 |
74 | const STATE_MACHINE_NAME = 'Login Machine'
75 |
76 | useEffect(() => {
77 | if (inputRef?.current && !inputLookMultiplier) {
78 | setInputLookMultiplier(inputRef.current.offsetWidth / 100);
79 | }
80 | }, [inputRef])
81 |
82 | const { rive: riveInstance, RiveComponent }: RiveState = useRive({
83 | src: '/bear.riv',
84 | stateMachines: STATE_MACHINE_NAME,
85 | autoplay: true,
86 | layout: new Layout({
87 | fit: Fit.Cover,
88 | alignment: Alignment.Center
89 | }),
90 | });
91 |
92 | // State Machine Inputs
93 | const trigSuccessInput: StateMachineInput = useStateMachineInput(riveInstance, STATE_MACHINE_NAME, 'trigSuccess');
94 | const trigFailInput: StateMachineInput = useStateMachineInput(riveInstance, STATE_MACHINE_NAME, 'trigFail');
95 | const isHandsUpInput: StateMachineInput = useStateMachineInput(riveInstance, STATE_MACHINE_NAME, 'isHandsUp');
96 |
97 | // read the file from the file system with the `name`
98 | const readFile = async (name: string) => {
99 | const markdown = await import(`@/data/${name}.d.ts`);
100 | return markdown.data;
101 | }
102 |
103 | const onNext = () => {
104 |
105 | setProgress(progress + 10)
106 |
107 | setCount(count + 1)
108 |
109 | if (question?.correctOption == chosen) {
110 | setScore(score + 1)
111 | trigSuccessInput.fire()
112 | } else {
113 | trigFailInput.fire()
114 | }
115 |
116 | setQuestion(content?.questions[count + 1])
117 |
118 |
119 | if (progress >= 100) {
120 | onSubmit()
121 | return
122 | }
123 |
124 | }
125 |
126 | useEffect(() => {
127 | const fetchData = async () => {
128 | try {
129 | const content = await readFile(name);
130 | setQuestion(content?.questions[0]);
131 | setContent(content);
132 | } catch (error) {
133 | console.error("Error reading file:", error);
134 | }
135 | };
136 | fetchData();
137 | }, [name]);
138 |
139 | return (
140 |
141 | {progress < 110 ? (
142 | <>
143 |
148 |
149 |
150 |
151 |
{question?.question}
152 |
153 |
154 |
155 |
156 | {
157 | setChosen(e.target.value)
158 | }} />
159 | {question?.options[0]}
160 |
161 |
162 | {
163 | setChosen(e.target.value)
164 | }} />
165 | {question?.options[1]}
166 |
167 |
168 | {
169 | setChosen(e.target.value)
170 | }} />
171 | {question?.options[2]}
172 |
173 |
174 | {
175 | setChosen(e.target.value)
176 | }} />
177 | {question?.options[3]}
178 |
179 |
180 |
{
181 | onNext()
182 | }
183 | }>{progress <= 110 ? "Next" : "Submit"}
184 |
185 | >
186 | ) : (
187 |
188 |
You scored {score} out of {content?.questions.length}
189 |
{
190 | setProgress(10)
191 | setScore(0)
192 | setCount(0)
193 | setQuestion(content?.questions[0])
194 | }
195 | }>Restart
196 | {score > 6 && (
197 | <>
198 |
199 |
200 |
Congratulations! You have obtained a Gold medal
201 |
202 |
203 | >
204 | )}
205 | {score > 2 && score <= 6 && (
206 | <>
207 |
208 |
209 |
Congratulations! You have obtained a Silver Medal
210 |
211 |
212 | >
213 | )}
214 | {score <= 2 && (
215 | <>
216 |
217 |
218 |
Congratulations! You have obtained a Bronze Medal
219 |
220 |
221 | >
222 | )}
223 |
Based on you performance we are creating a learning path to learn {name}
224 |
225 |
226 | {`${output}`}
227 |
228 |
229 | {/* create a Link to redirect to /leaderboard */}
230 |
231 |
Go to Leaderboard
232 |
233 |
234 | )}
235 |
236 | )
237 | }
--------------------------------------------------------------------------------
/public/icons/express.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------