Thank you for your interest in contributing to our project! To ensure that our project remains sustainable and that contributions can be integrated smoothly, we require all contributors to agree to the following Contributor License Agreement ("Agreement"). This Agreement helps us maintain the quality and integrity of the project while respecting your rights as a contributor.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#################################################### | |
# .env.production Configuration File | |
#################################################### | |
# This file serves as a template for configuring environment variables essential for the development environment. | |
# Adjust these settings to align with your specific development needs and infrastructure requirements. | |
#################################################### | |
# APPLICATION ENVIRONMENT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import globals from 'globals'; | |
import pluginJs from '@eslint/js'; | |
import pluginReact from 'eslint-plugin-react'; | |
/** | |
* ESLint configuration for a JavaScript/TypeScript project. | |
* | |
* This configuration includes rules and settings for general JavaScript and React projects. | |
* It aims to enforce best practices, coding conventions, and ensure code consistency. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#################################################### | |
# .nvmrc Configuration File | |
#################################################### | |
# Purpose: | |
# The .nvmrc file is used with Node Version Manager (NVM) to specify | |
# the required version of Node.js for this project. By defining the | |
# Node.js version, all developers and environments will use the same | |
# version, ensuring consistency and preventing issues caused by version | |
# mismatches during development or deployment. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
import fs from 'fs'; | |
import path from 'path'; | |
/** | |
* Represents the file system path to the 'shared' directory. | |
* The path is constructed by resolving the current working directory and appending 'shared' to it. | |
* It can be used to reference or access files and sub-directories located within the 'shared' directory. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fs from 'fs'; | |
import path from 'path'; | |
/** | |
* Recursively generates a tree structure of the directory. | |
* | |
* @param {string} dir - The directory to scan. | |
* @param {string} [prefix=''] - The prefix used for formatting the tree structure. | |
* @param {string} [output=''] - The accumulated output string containing the directory structure. | |
* @returns {string} - The complete directory structure as a string. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import errorResponse from '../utilities/errorResponse.js'; | |
import httpStatus from '../constant/httpStatus.constants.js'; | |
import sendResponse from '../utilities/sendResponse.js'; | |
import loggerService from '../service/logger.service.js'; | |
import toSentenceCase from '../utilities/toSentenceCase.js'; | |
const getResourceById = async (model, populateMethod, resourceId, resourceType) => { | |
try { | |
const resource = await populateMethod(model.findById(resourceId)); | |
if (!resource) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncErrorHandlerService from '../utilities/asyncErrorHandler.js'; | |
import getRequesterId from '../utilities/getRequesterId.js'; | |
import loggerService from '../service/logger.service.js'; | |
import getHostData from '../utilities/getHostData.js'; | |
import getRequestedDeviceDetails from '../utilities/getRequestedDeviceDetails.js'; | |
// TODO: Implement the `entity` log | |
// TODO: utilize the hostData for every entity | |
const createNewUserEntity = (service, createFunction) => |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import NodeCache from 'node-cache'; | |
import loggerService from '../service/logger.service.js'; | |
const cache = new NodeCache(); | |
const create = (duration = 3600) => { | |
return (req, res, next) => { | |
let key; |
NewerOlder