NinjaManager is a web-based task management application tailored for the administrative team at Code Ninjas, owned by Lego Haryanto. This tool is designed to efficiently handle day-to-day administrative tasks, including membership adjustments, customer request management, and task tracking.
The application is built to integrate seamlessly with the existing Code Ninjas Dashboard, ensuring familiarity and ease of use for employees. Key functionalities include a straightforward task creation system, a comprehensive calendar view for tracking due dates, and a dynamic task status indicator to monitor progress, past due, or completed tasks.
NinjaManager offers a clean, user-friendly interface with essential navigation options such as “Home”, “Create Task”, “Calendar”, “Overview”, and “History”. Each section provides specific functionalities - from displaying current tasks on the Home page to a detailed history of completed tasks. The task management process is streamlined, allowing for easy assignment of tasks to employees, setting priorities, and editing task details.
With NinjaManager, the Code Ninjas administrative team can effectively track and manage tasks, ensuring timely responses and efficient operations. This application is a strategic step towards enhancing administrative efficiency, providing a simple yet powerful tool for day-to-day management.
Make sure you have the following installed on your machine:
npm install
Database set-up:
To get your URI that will be used in the next step, navigate to ‘Database’ under ‘Deployment’. Locate your database and click on ‘Connect’. A pop-up window will appear. In this pop-up window, select the ‘Drivers’ option. Your database’s URI should be visible now. Copy it as it will be used in the next step.
Mailtrap set-up:
Once your domain is set-up, you will be able to find your mailtrap USER_NAME and PASSWORD on that same page or in settings. Add the following information using the Environment set-up below.
NinjaManager Roles set-up: NinjaManager currently has 3 roles: employee, admin, and owner. Both owner and admins can assign admins to employees using the “users” dropdown menu which allows users with those roles to delete tasks from the “History” page, however, only the Owner can remove admin privileges and remove users from the database. To assign ownership, you can do one of the 2 options:
.env
file setup, input your email for the variable “OWNER_EMAIL” BEFORE account creation, orEnvironment set-up:
.env
file in the backend folder.Add your environment variables to the .env
file.
Example:
PORT=4000 MONGO_URI=mongodb+srv:// OWNER_EMAIL="owner_email@gmail.com"
DOMAIN_NAME="http://name_of_website.com"
SECRET=randomsecrethashedwordthatissecurectrlaltdelete
EMAIL_VERIFICATION_SECRET=randsecretemailverifwordctrlaltdelete
EMAIL_USERNAME="mailtrap_username"
EMAIL_PASSWORD="mailtrap_password"
Replace <username>
and <password>
with your actual credentials.
Replace OWNER_EMAIL
with your email.
Replace EMAIL_USERNAME
and EMAIL_PASSWORD
with your mailtrap username and password.
npm start
Software Requirements:
System Requirements
Follow the steps below to deploy this project locally on your machine:
Open Studio Visual Code.
Go to File and click on Open Folder.
Locate your CtrlAltDelete Repository (https://github.com/johnvardanyan/ctrlaltdelete) folder and click on Open.
Once opened, navigate to Terminal.
Click anywhere inside the Terminal and input the following command: npm start
Next, you should see mongoDB local server start on port 8000 & local host should open on default browser on port 3000.
IDE: Visual Studio Code (version 1.89.0)
Testing Software:
Jest (version 29.7.0)
Selenium (webdriver version 4.19.0)
Operating System: Windows 10 OS (19045.4291) version 22H2
Jest Configuration:
Open a terminal by selecting Terminal + New Terminal in the upper left-hand corner of the IDE. Make sure you are in the repository’s main file (CtrlAltDelete).
jest –init will have created a jest.config.js file. Please ensure the following configurations are set:
const config = {
clearMocks: true,
collectCoverage: true,
setupFilesAfterEnv: ['./jest.setup.js'],
moduleNameMapper: { '\\.(css|less|scss|sass)$': 'identity-obj-proxy' },
transform: { '^.+\\.(js|jsx|ts|tsx)$': ['babel-jest', { configFile: "./babel.config.js" }] },
coverageDirectory: "coverage",
testEnvironment: "jest-environment-jsdom",
verbose: true,
};
global.fetch = jest.fn((url, config) => {
// Mock responses based on URL
if (url.includes('/api/user/employees')) {
// Respond with an empty array of employees or whatever is appropriate for your tests
return Promise.resolve({
ok: true,
json: () => Promise.resolve([]),
});
}
// You can add more conditions for other API endpoints
// ...
// Default to rejecting fetch calls that aren't explicitly mocked:
return Promise.reject(new Error(`Unmocked endpoint: ${url}`));
});
});
afterEach(() => {
global.fetch.mockClear();
});
afterAll(() => {
global.fetch.mockRestore();
});
Enter npm install –save-dev jest
Enter npm install –save-dev jest-environment-jsdom
Enter npm install –save-dev identity-obj-proxy
Enter npm install node-fetch@2
Enter npm install jest-fetch-mock –save-dev
All test files should be placed in CtrlAltDelete/Frontend/Src/Pages. All Jest testing files have the following naming convention:
Selenium Configuration:
Open a terminal by selecting Terminal + New Terminal in the upper left-hand corner of the IDE. Make sure you are in the repository’s main file (CtrlAltDelete).
Enter npm install selenium-webdriver
Enter npm install chromedriver
All test files should be placed in CtrlAltDelete/Frontend/Src/Pages. All Selenium testing files have the following naming convention:
To run a selenium test, open a new terminal in VSCode by selecting Terminal + New Terminal in the upper left-hand corner. In the main directory (CtrlAltDelete), start the application by entering “npm start.”
Open another terminal by selecting Terminal + New Terminal in the upper left-hand corner of VSCode. Navigate to CtrlAltDelete/Frontend/Src/Pages (where test files should be located). To run a test file, enter “node
Required Software:
Required Libraries:
Frontend Dependencies:
Backend Dependencies:
Coding Standards:
Style Guidelines:
Background Styling should adhere to CodeNinjas Dashboard standards
- Public: Static files like the main HTML template and assets.
- Src:
- Components: Contains reusable React components for different UI parts.
- Context: Manages global state and context providers for the application.
- CSS: Holds all CSS files for styling different components and pages.
- Hooks: Custom hooks like useAuthContext.js and useTasksContext.js.
- Pages: Complete pages for the app, such as Login.js, Home.js, and Profile.js.
- App.js: The main entry point of the frontend application.
Meet the Team:
John Vardanyan | johnvardanyan@gmail.com | https://github.com/johnvardanyan | www.linkedin.com/in/nairy/ |
Elina Grigoryan | elina.grigoryan8@gmail.com | https://github.com/egrigoryan12 | www.linkedin.com/in/elina-grigoryan |
Ashley Palencia – Wisniewski | ashleypalencia-wisn@csus.edu | https://github.com/AshleyPW | www.linkedin.com/in/ashleypalencia |
Jeremy Vuong | jeremyvuong@csus.edu | https://github.com/JxRRRm | https://www.linkedin.com/in/jeremy-vuong-5a1158178/ |
Arjun Bhargava | abhargava@csus.edu | https://github.com/NightWolfz2 |
Navid Baghaei | Navid1.Baghaei@gmail.com | https://github.com/NavidBaghaei | https://www.linkedin.com/in/navid-baghaei-7346602a2/ |
Madusha Yakupitiyage | madushayaku@gmail.com | https://github.com/Madusha0909 | https://www.linkedin.com/in/madusha-yakupitiyage-99b202269/ |
Nikolay Chkhaylo | nchkhaylo@gmail.com | https://github.com/NikolayChkhaylo |
All rights are observed. This project is not open source.