mirror of
https://github.com/9technologygroup/patchmon.net.git
synced 2025-10-25 09:03:40 +00:00
Compare commits
19 Commits
feature/go
...
renovate/m
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
317df1d3aa | ||
|
|
8d372411be | ||
|
|
de449c547f | ||
|
|
cd03f0e66a | ||
|
|
a8bd09be89 | ||
|
|
deb6bed1a6 | ||
|
|
3ae8422487 | ||
|
|
c98203a997 | ||
|
|
37c8f5fa76 | ||
|
|
0189a307ef | ||
|
|
00abbc8c62 | ||
|
|
c9aef78912 | ||
|
|
fd2df0729e | ||
|
|
d7f7b24f8f | ||
|
|
1ef2308d56 | ||
|
|
fcd1b52e0e | ||
|
|
5be8e01aa3 | ||
|
|
293733dc0b | ||
|
|
c7ab40e4a2 |
@@ -1,23 +1,29 @@
|
|||||||
# Database Configuration
|
# Database Configuration
|
||||||
DATABASE_URL="postgresql://patchmon_user:p@tchm0n_p@55@localhost:5432/patchmon_db"
|
DATABASE_URL="postgresql://patchmon_user:your-password-here@localhost:5432/patchmon_db"
|
||||||
PM_DB_CONN_MAX_ATTEMPTS=30
|
PM_DB_CONN_MAX_ATTEMPTS=30
|
||||||
PM_DB_CONN_WAIT_INTERVAL=2
|
PM_DB_CONN_WAIT_INTERVAL=2
|
||||||
|
|
||||||
# Redis Configuration
|
# JWT Configuration
|
||||||
REDIS_HOST=localhost
|
JWT_SECRET=your-secure-random-secret-key-change-this-in-production
|
||||||
REDIS_PORT=6379
|
JWT_EXPIRES_IN=1h
|
||||||
REDIS_USER=your-redis-username-here
|
JWT_REFRESH_EXPIRES_IN=7d
|
||||||
REDIS_PASSWORD=your-redis-password-here
|
|
||||||
REDIS_DB=0
|
|
||||||
|
|
||||||
# Server Configuration
|
# Server Configuration
|
||||||
PORT=3001
|
PORT=3001
|
||||||
NODE_ENV=development
|
NODE_ENV=production
|
||||||
|
|
||||||
# API Configuration
|
# API Configuration
|
||||||
API_VERSION=v1
|
API_VERSION=v1
|
||||||
|
|
||||||
|
# CORS Configuration
|
||||||
CORS_ORIGIN=http://localhost:3000
|
CORS_ORIGIN=http://localhost:3000
|
||||||
|
|
||||||
|
# Session Configuration
|
||||||
|
SESSION_INACTIVITY_TIMEOUT_MINUTES=30
|
||||||
|
|
||||||
|
# User Configuration
|
||||||
|
DEFAULT_USER_ROLE=user
|
||||||
|
|
||||||
# Rate Limiting (times in milliseconds)
|
# Rate Limiting (times in milliseconds)
|
||||||
RATE_LIMIT_WINDOW_MS=900000
|
RATE_LIMIT_WINDOW_MS=900000
|
||||||
RATE_LIMIT_MAX=5000
|
RATE_LIMIT_MAX=5000
|
||||||
@@ -26,20 +32,18 @@ AUTH_RATE_LIMIT_MAX=500
|
|||||||
AGENT_RATE_LIMIT_WINDOW_MS=60000
|
AGENT_RATE_LIMIT_WINDOW_MS=60000
|
||||||
AGENT_RATE_LIMIT_MAX=1000
|
AGENT_RATE_LIMIT_MAX=1000
|
||||||
|
|
||||||
|
# Redis Configuration
|
||||||
|
REDIS_HOST=localhost
|
||||||
|
REDIS_PORT=6379
|
||||||
|
REDIS_USER=your-redis-username-here
|
||||||
|
REDIS_PASSWORD=your-redis-password-here
|
||||||
|
REDIS_DB=0
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
LOG_LEVEL=info
|
LOG_LEVEL=info
|
||||||
ENABLE_LOGGING=true
|
ENABLE_LOGGING=true
|
||||||
|
|
||||||
# User Registration
|
# TFA Configuration (optional - used if TFA is enabled)
|
||||||
DEFAULT_USER_ROLE=user
|
|
||||||
|
|
||||||
# JWT Configuration
|
|
||||||
JWT_SECRET=your-secure-random-secret-key-change-this-in-production
|
|
||||||
JWT_EXPIRES_IN=1h
|
|
||||||
JWT_REFRESH_EXPIRES_IN=7d
|
|
||||||
SESSION_INACTIVITY_TIMEOUT_MINUTES=30
|
|
||||||
|
|
||||||
# TFA Configuration
|
|
||||||
TFA_REMEMBER_ME_EXPIRES_IN=30d
|
TFA_REMEMBER_ME_EXPIRES_IN=30d
|
||||||
TFA_MAX_REMEMBER_SESSIONS=5
|
TFA_MAX_REMEMBER_SESSIONS=5
|
||||||
TFA_SUSPICIOUS_ACTIVITY_THRESHOLD=3
|
TFA_SUSPICIOUS_ACTIVITY_THRESHOLD=3
|
||||||
|
|||||||
@@ -295,7 +295,7 @@ app.disable("x-powered-by");
|
|||||||
// Rate limiting with monitoring
|
// Rate limiting with monitoring
|
||||||
const limiter = rateLimit({
|
const limiter = rateLimit({
|
||||||
windowMs: parseInt(process.env.RATE_LIMIT_WINDOW_MS, 10) || 15 * 60 * 1000,
|
windowMs: parseInt(process.env.RATE_LIMIT_WINDOW_MS, 10) || 15 * 60 * 1000,
|
||||||
max: parseInt(process.env.RATE_LIMIT_MAX, 10) || 100,
|
max: parseInt(process.env.RATE_LIMIT_MAX, 10) || 5000,
|
||||||
message: {
|
message: {
|
||||||
error: "Too many requests from this IP, please try again later.",
|
error: "Too many requests from this IP, please try again later.",
|
||||||
retryAfter: Math.ceil(
|
retryAfter: Math.ceil(
|
||||||
@@ -424,7 +424,7 @@ const apiVersion = process.env.API_VERSION || "v1";
|
|||||||
const authLimiter = rateLimit({
|
const authLimiter = rateLimit({
|
||||||
windowMs:
|
windowMs:
|
||||||
parseInt(process.env.AUTH_RATE_LIMIT_WINDOW_MS, 10) || 10 * 60 * 1000,
|
parseInt(process.env.AUTH_RATE_LIMIT_WINDOW_MS, 10) || 10 * 60 * 1000,
|
||||||
max: parseInt(process.env.AUTH_RATE_LIMIT_MAX, 10) || 20,
|
max: parseInt(process.env.AUTH_RATE_LIMIT_MAX, 10) || 500,
|
||||||
message: {
|
message: {
|
||||||
error: "Too many authentication requests, please try again later.",
|
error: "Too many authentication requests, please try again later.",
|
||||||
retryAfter: Math.ceil(
|
retryAfter: Math.ceil(
|
||||||
@@ -438,7 +438,7 @@ const authLimiter = rateLimit({
|
|||||||
});
|
});
|
||||||
const agentLimiter = rateLimit({
|
const agentLimiter = rateLimit({
|
||||||
windowMs: parseInt(process.env.AGENT_RATE_LIMIT_WINDOW_MS, 10) || 60 * 1000,
|
windowMs: parseInt(process.env.AGENT_RATE_LIMIT_WINDOW_MS, 10) || 60 * 1000,
|
||||||
max: parseInt(process.env.AGENT_RATE_LIMIT_MAX, 10) || 120,
|
max: parseInt(process.env.AGENT_RATE_LIMIT_MAX, 10) || 1000,
|
||||||
message: {
|
message: {
|
||||||
error: "Too many agent requests, please try again later.",
|
error: "Too many agent requests, please try again later.",
|
||||||
retryAfter: Math.ceil(
|
retryAfter: Math.ceil(
|
||||||
|
|||||||
@@ -50,6 +50,13 @@ services:
|
|||||||
SERVER_HOST: localhost
|
SERVER_HOST: localhost
|
||||||
SERVER_PORT: 3000
|
SERVER_PORT: 3000
|
||||||
CORS_ORIGIN: http://localhost:3000
|
CORS_ORIGIN: http://localhost:3000
|
||||||
|
# Rate Limiting (times in milliseconds)
|
||||||
|
RATE_LIMIT_WINDOW_MS: 900000
|
||||||
|
RATE_LIMIT_MAX: 5000
|
||||||
|
AUTH_RATE_LIMIT_WINDOW_MS: 600000
|
||||||
|
AUTH_RATE_LIMIT_MAX: 500
|
||||||
|
AGENT_RATE_LIMIT_WINDOW_MS: 60000
|
||||||
|
AGENT_RATE_LIMIT_MAX: 1000
|
||||||
# Redis Configuration
|
# Redis Configuration
|
||||||
REDIS_HOST: redis
|
REDIS_HOST: redis
|
||||||
REDIS_PORT: 6379
|
REDIS_PORT: 6379
|
||||||
|
|||||||
@@ -56,6 +56,13 @@ services:
|
|||||||
SERVER_HOST: localhost
|
SERVER_HOST: localhost
|
||||||
SERVER_PORT: 3000
|
SERVER_PORT: 3000
|
||||||
CORS_ORIGIN: http://localhost:3000
|
CORS_ORIGIN: http://localhost:3000
|
||||||
|
# Rate Limiting (times in milliseconds)
|
||||||
|
RATE_LIMIT_WINDOW_MS: 900000
|
||||||
|
RATE_LIMIT_MAX: 5000
|
||||||
|
AUTH_RATE_LIMIT_WINDOW_MS: 600000
|
||||||
|
AUTH_RATE_LIMIT_MAX: 500
|
||||||
|
AGENT_RATE_LIMIT_WINDOW_MS: 60000
|
||||||
|
AGENT_RATE_LIMIT_MAX: 1000
|
||||||
# Redis Configuration
|
# Redis Configuration
|
||||||
REDIS_HOST: redis
|
REDIS_HOST: redis
|
||||||
REDIS_PORT: 6379
|
REDIS_PORT: 6379
|
||||||
|
|||||||
10
frontend/env.example
Normal file
10
frontend/env.example
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
# Frontend Environment Configuration
|
||||||
|
# This file is used by Vite during build and runtime
|
||||||
|
|
||||||
|
# API URL - Update this to match your backend server
|
||||||
|
VITE_API_URL=http://localhost:3001/api/v1
|
||||||
|
|
||||||
|
# Application Metadata
|
||||||
|
VITE_APP_NAME=PatchMon
|
||||||
|
VITE_APP_VERSION=1.3.0
|
||||||
|
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
"@vitejs/plugin-react": "^4.3.4",
|
"@vitejs/plugin-react": "^4.3.4",
|
||||||
"autoprefixer": "^10.4.20",
|
"autoprefixer": "^10.4.20",
|
||||||
"postcss": "^8.5.6",
|
"postcss": "^8.5.6",
|
||||||
"tailwindcss": "^3.4.17",
|
"tailwindcss": "^4.0.0",
|
||||||
"vite": "^7.1.5"
|
"vite": "^7.1.5"
|
||||||
},
|
},
|
||||||
"overrides": {
|
"overrides": {
|
||||||
|
|||||||
973
package-lock.json
generated
973
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user