Documentation

Cysec Labs Frontend

Thank you so much for purchasing our item from themeforest.


  • Created: 8 Nov, 2022
  • Update: 12 Jan, 2023

If you have any questions that are beyond the scope of this help file, Please feel free to message via Whatsapp.


Overview

Cysec Labs is a web application that offers a simulated platform for individuals to develop and improve their cybersecurity skills in a safe and secure setting. The focus is on hands-on, practical training, including penetration testing, ethical hacking, and network security, using real-world scenarios and tasks. With a controlled, simulated environment, users can learn and practice these critical skills with confidence, helping to prepare them for success in the rapidly evolving cybersecurity landscape.

Installation

Follow the steps below to setup your site template:

  1. Unzip the downloaded package and open the /Frontend folder to find all the code for the application.
  2. Open the folder directory in your terminal and run npm install to install the node modules from the /package.json file.
  3. Once the node modules are installed run npm start to start the application. The application should start in localhost:3000
  4. You are good to go for now!

Project Structure

Cysec Labs follows a simple project structure. Here is the project tree for your reference:

```
              Frontend
              ├─ .gitignore
              ├─ package-lock.json
              ├─ package.json
              ├─ public
              │  ├─ favicon.ico
              │  ├─ index.html
              │  ├─ manifest.json
              │  └─ robots.txt
              ├─ README.md
              └─ src
                 ├─ admin
                 │  ├─ Admin.css
                 │  ├─ AdminAccess.jsx
                 │  ├─ CreateLab.jsx
                 │  ├─ CreateMaterials.jsx
                 │  ├─ Preview.jsx
                 │  └─ SuperAdmin.jsx
                 ├─ App.js
                 ├─ assets
                 │  └─ img
                 │     ├─ 8._Computer_Lock-removebg-preview.png
                 │     ├─ blog-3.jpg
                 │     ├─ competeImage1.png
                 │     ├─ competeImage2.png
                 │     ├─ competeImage3.png
                 │     ├─ cysecnewdashboard.png
                 │     ├─ cysecnewlogo.png
                 │     ├─ facebook.png
                 │     ├─ Girl using phone.png
                 │     ├─ Group 37.png
                 │     ├─ Group 38.png
                 │     ├─ Group 39.png
                 │     ├─ heroicons-outline_logout.svg
                 │     ├─ House Graph by Streamlinehq.png
                 │     ├─ image.me.jpg
                 │     ├─ instagram.png
                 │     ├─ intro.mp4
                 │     ├─ linkedin.png
                 │     ├─ Mr Victor.jpg
                 │     ├─ newdashboard.png
                 │     ├─ newdashboardcrop.png
                 │     ├─ quote.png
                 │     ├─ services.jpg
                 │     ├─ Suitcase by Streamlinehq.png
                 │     ├─ technolo.jpg
                 │     ├─ Todo List by Streamlinehq.png
                 │     ├─ twitter.png
                 │     ├─ usersusers.svg
                 │     └─ young woman wearing smart watch and using laptop.png
                 ├─ Auth
                 │  ├─ auth.css
                 │  ├─ Forgot.jsx
                 │  ├─ Login.jsx
                 │  ├─ Register.jsx
                 │  ├─ Reset.jsx
                 │  └─ Verify.jsx
                 ├─ ss
                 │  ├─ AdminMessage.jsx
                 │  ├─ s.css
                 │  ├─ DashboardHome.jsx
                 │  ├─ DashboardNotification.jsx
                 │  ├─ DashNavbar.jsx
                 │  ├─ DownloadVPN.jsx
                 │  ├─ Lab.jsx
                 │  ├─ Labs.jsx
                 │  ├─ Layout.jsx
                 │  ├─ Leaderboard.jsx
                 │  ├─ Machine.jsx
                 │  ├─ MachineItem.jsx
                 │  ├─ Navbar.jsx
                 │  ├─ Room.jsx
                 │  ├─ SearchPage.jsx
                 │  ├─ Settings.jsx
                 │  ├─ Sidebar.jsx
                 │  └─ Spinner.jsx
                 ├─ context
                 │  └─ GlobalContext.jsx
                 ├─ demoData.js
                 ├─ index.css
                 ├─ index.js
                 ├─ pages
                 │  ├─ Competition
                 │  │  ├─ Competition.css
                 │  │  └─ Competition.jsx
                 │  ├─ Dashboard
                 │  │  ├─ dashboard.css
                 │  │  └─ Dashboard.jsx
                 │  ├─ Home
                 │  │  ├─ Home.css
                 │  │  └─ Home.jsx
                 │  └─ NotFound.jsx
                 ├─ reportWebVitals.js
                 ├─ shared
                 │  └─ Spinner.jsx
                 └─ utlis
                    ├─ axios.js
                    └─ User.jsx
              
              ```

If you need more information, please visit bootstrap site: https://getbootstrap.com



Folders

Admin

The Admin folder contains all the files necessary for the administrative management and control of the system. These files handle various tasks related to the administration such as user authentication, authorization, and access control, managing user accounts and permissions, monitoring and maintaining the system, and any other tasks that are crucial to the efficient functioning of the system from an administrative perspective. The files in this folder ensure that the administration of the system is carried out smoothly, securely, and in accordance with the set policies and guidelines.


Assets

The "Assets" folder contains all the visual media files used in the project, including images and Scalable Vector Graphics (SVGs). These files provide the visual elements necessary for a rich and engaging user experience, including logos, icons, photographs, illustrations, and other graphic assets. The images and SVGs stored in this folder are used throughout the project to enhance the overall look and feel of the application.


Auth

This folder contains all the logic and styling related to user authentication in the project. It holds the code responsible for verifying user credentials, managing user sessions, and providing secure access to authorized users. The included CSS file provides styling for all components related to authentication, ensuring a consistent look and feel across the application.


Components

This folder holds all the individual components used in the project, such as buttons, form fields, headers, and footers. These components can be reused throughout the application to streamline development and reduce code duplication.


Context

The "Context" folder contains the context wrapper for the project, which manages the state of the application. The context API is used to share data and functions between components, allowing for easy access and manipulation of the state from any component in the application.


Pages

The "Pages" folder contains all the screens or pages in the project. Each screen is represented by a single component, providing a clear and organized structure for the application. The pages can be easily navigated to and from, allowing for seamless navigation between different parts of the application.


Shared

"Shared" folder: The "Shared" folder holds components that are used across multiple pages in the project. In this case, it contains the spinner component, which is used to indicate that the application is in the process of loading data.


Utils

The "Utils" folder is a container for utility functions, including the wrapper for API calls to the server. This folder holds all the necessary functions for making HTTP requests to the server, processing the responses, and providing a convenient and consistent way for the rest of the application to access data from the server.


Functions

RegisterUser

This function is responsible for registering a new user in the database. Upon successful registration, the function redirects the user to the "Verify" component, where they will receive a verification token sent to their email. The verification token ensures that the user is the owner of the email they provided during registration.


RegisterAdminUser

This function is used to create a new admin user for the dashboard. The admin user will have elevated permissions, allowing them to perform administrative tasks such as managing user accounts, viewing system logs, and making changes to the configuration of the application.


VerifyUser

This function verifies the token received by the user via email. Upon successful verification, the user's account is activated, allowing them to log in to the application.


LoginUser

This function logs an existing user into the application. Upon successful login, the user is redirected to the dashboard, where they can access their account and use the application's features.


LogoutUser

This function logs the user out of the cached data, effectively ending their session. The user is then redirected to the login page, where they must enter their credentials to log in again.


checkUser

This function checks the status of the user and redirects them to the appropriate page based on their status. If the user is an admin, they will have access to additional features on the dashboard.


closeNotification

This is an experimental function that toggles a notification on the dashboard. The purpose of this function is to test the behavior and functionality of notifications in the application.


FetchLabs

This function retrieves all lab data from the database. The lab data is used to populate the lab list on the dashboard, providing a clear and concise overview of all available labs.


DeleteLab

This function deletes a selected lab from the database. The user must provide confirmation before the lab is deleted, to prevent accidental deletion of important data.


AddLab

This function creates a new lab in the database collection of labs. The user can provide the necessary information to create the lab, such as its name, location, and description.


UpdateLab

This function is called upon when an update to a lab is selected. The user can make changes to the lab's information, such as its name, location, or description. The updated information is then saved to the database, ensuring that the lab data remains accurate and up-to-date.


Changelog

See what's new added, changed, fixed, improved or updated in the latest versions.

If you have any questions that are beyond the scope of this help file, Please feel free to message via Whatsapp.

Version 1.0 (8 Nov, 2022)

  • Fixed Some minor bugs for browser compatibility
  • Fixed Some minor bugs for responsive
  • Updated Sever database from local to live
  • Updated Improvements in CSS and JS