-
Notifications
You must be signed in to change notification settings - Fork 46
test(user): add unit tests for UserUtils token generation and verification #53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
75fc9c8
6166098
21480b7
cd9282a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| # Server Configuration | ||
| PORT=5000 | ||
| HOST=localhost | ||
| APP_ENV=development | ||
|
|
||
|
|
||
| # Debug Settings | ||
| DEBUG=true | ||
| LOG_LEVEL=debug | ||
|
|
||
|
|
||
|
|
||
| CORS_ENABLED=true | ||
| RATE_LIMIT_ENABLED=false | ||
|
|
||
|
|
||
| JWT_SECRET=your_jwt_secret_key_here | ||
| JWT_EXPIRATION=7d | ||
|
|
||
|
|
||
| DB_HOST=localhost | ||
| DB_PORT=27017 | ||
| DB_NAME=localmind | ||
| DB_USER=root | ||
| DB_PASSWORD=password | ||
| DB_CONNECTION_STRING=mongodb://localhost:27017/localmind | ||
|
|
||
|
|
||
| REDIS_HOST=localhost | ||
| REDIS_PORT=6379 | ||
| REDIS_PASSWORD= | ||
|
|
||
|
|
||
| UPLOAD_DIR=./uploads | ||
| TEMP_DIR=./temp | ||
| MAX_FILE_SIZE=5242880 | ||
|
|
||
|
|
||
| ENCRYPTION_KEY=your_encryption_key_here | ||
| ENABLE_RATE_LIMITING=false | ||
|
|
||
| BACKEND_URL=http://localhost:5000 | ||
|
|
||
| # Model Api keys | ||
| OPENAI_API_KEY=your_openai_api_key_here | ||
| GOOGLE_API_KEY=your_google_api_key_here | ||
| GROQ_API_KEY=your_groq_api_key_here |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| # Dependency directories | ||
| node_modules/ | ||
| jspm_packages/ | ||
|
|
||
| # TypeScript output | ||
| dist/ | ||
| build/ | ||
| *.tsbuildinfo | ||
|
|
||
| # Environment variables | ||
| .env | ||
| .env.local | ||
| .env.development | ||
| .env.test | ||
| .env.production | ||
|
|
||
| # Logs | ||
| logs | ||
| *.log | ||
| npm-debug.log* | ||
| yarn-debug.log* | ||
| yarn-error.log* | ||
| lerna-debug.log* | ||
| .pnpm-debug.log* | ||
|
|
||
| # Coverage directories | ||
| coverage/ | ||
| .nyc_output/ | ||
|
|
||
| # IDE / editors | ||
| .idea/ | ||
| .vscode/ | ||
| *.swp | ||
| *.swo | ||
| .DS_Store | ||
| .classpath | ||
| .project | ||
| .settings/ | ||
| *.sublime-workspace | ||
| *.sublime-project | ||
|
|
||
| # Optional npm cache directory | ||
| .npm | ||
|
|
||
| # Optional eslint cache | ||
| .eslintcache | ||
|
|
||
| # Optional stylelint cache | ||
| .stylelintcache | ||
|
|
||
| # Runtime data | ||
| pids | ||
| *.pid | ||
| *.seed | ||
| *.pid.lock | ||
|
|
||
| # Yarn | ||
| .yarn-integrity | ||
| .yarn/cache | ||
| .yarn/unplugged | ||
| .yarn/build-state.yml | ||
| .yarn/install-state.gz | ||
| .pnp.* | ||
|
|
||
| # TypeScript cache | ||
| *.tsbuildinfo | ||
|
|
||
| # Local files | ||
| .local/ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # Ignore artifacts: | ||
| build | ||
| coverage |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| To Train al model we use Csv , Excel , pdf | ||
|
|
||
| ## Cloudflared Tunnel | ||
|
|
||
| To create a Cloudflared tunnel to your local development server running on port 5000, use the following command: | ||
|
|
||
| ```bash | ||
| cloudflared tunnel --url http://localhost:5000 | ||
| ``` | ||
|
|
||
| ## | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| module.exports = { | ||
| preset: 'ts-jest', | ||
| testEnvironment: 'node', | ||
| transform: { | ||
| '^.+\\.tsx?$': 'ts-jest', | ||
| }, | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| { | ||
| "name": "localmind-backend", | ||
| "version": "1.0.0", | ||
| "main": "index.js", | ||
| "scripts": { | ||
| "test": "jest", | ||
| "start-tunnel": "lt --port 5000", | ||
| "setup:backend": "ts-node src/script/project-setup.ts", | ||
| "format": "prettier --write .", | ||
| "build": "tsc", | ||
| "dev": "ts-node-dev --respawn --transpile-only src/server.ts" | ||
| }, | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "git+https://github.com/NexGenStudioDev/LocalMind-Backend.git" | ||
| }, | ||
| "author": "", | ||
| "license": "ISC", | ||
| "bugs": { | ||
| "url": "https://github.com/NexGenStudioDev/LocalMind-Backend/issues" | ||
| }, | ||
| "homepage": "https://github.com/NexGenStudioDev/LocalMind-Backend#readme", | ||
| "description": "", | ||
| "devDependencies": { | ||
| "@babel/preset-typescript": "^7.27.1", | ||
| "@types/argon2": "^0.15.4", | ||
| "@types/bcrypt": "^6.0.0", | ||
| "@types/express": "^5.0.3", | ||
| "@types/node": "^24.7.2", | ||
| "@types/nodemailer": "^7.0.3", | ||
| "jest": "^29.6.4", | ||
| "prettier": "3.6.2", | ||
| "ts-jest": "^29.4.5", | ||
| "ts-node": "^10.9.2", | ||
| "ts-node-dev": "^2.0.0", | ||
| "typescript": "^5.9.3" | ||
| }, | ||
| "dependencies": { | ||
| "@jest/globals": "^29.6.4", | ||
| "@langchain/community": "^0.3.57", | ||
| "@langchain/core": "^0.3.78", | ||
| "@langchain/google-genai": "^0.2.18", | ||
| "@langchain/groq": "^0.2.4", | ||
| "@langchain/ollama": "^0.2.4", | ||
| "@types/cookie-parser": "^1.4.9", | ||
| "@types/jsonwebtoken": "^9.0.10", | ||
| "@types/morgan": "^1.9.10", | ||
| "argon2": "^0.44.0", | ||
| "axios": "^1.5.0", | ||
| "bcrypt": "^6.0.0", | ||
| "chalk": "^5.6.2", | ||
| "cloudflared-tunnel": "^1.0.3", | ||
| "cookie-parser": "^1.4.7", | ||
| "d3-dsv": "^2.0.0", | ||
| "dotenv": "^17.2.3", | ||
| "express": "^4.18.2", | ||
| "figlet": "^1.9.3", | ||
| "jsonwebtoken": "^9.0.2", | ||
| "langchain": "^0.3.36", | ||
| "mongoose": "^8.9.0", | ||
| "morgan": "^1.10.1", | ||
| "ngrok": "5.0.0-beta.2", | ||
| "nodemailer": "^7.0.10", | ||
| "ora": "^9.0.0", | ||
| "zod": "^4.1.12" | ||
| } | ||
| } | ||
|
Comment on lines
+1
to
+67
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Many of the dependency versions listed in |
||
Uh oh!
There was an error while loading. Please reload this page.