Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .env.example
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
69 changes: 69 additions & 0 deletions .gitignore
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/
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Ignore artifacts:
build
coverage
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
11 changes: 11 additions & 0 deletions a.md
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
```

##
7 changes: 7 additions & 0 deletions jest.config.ts
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',
},
}
68 changes: 68 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"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": "^30.2.0",
"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": "^30.2.0",
"@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/mongoose": "^5.11.97",
"@types/morgan": "^1.9.10",
"argon2": "^0.44.0",
"axios": "^1.12.2",
"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": "^5.1.0",
"figlet": "^1.9.3",
"jsonwebtoken": "^9.0.2",
"langchain": "^0.3.36",
"mongoose": "^8.19.1",
"morgan": "^1.10.1",
"ngrok": "5.0.0-beta.2",
"nodemailer": "^7.0.10",
"ora": "^9.0.0",
"zod": "^4.1.12"
}
}
Loading