Back to Home
PrithiviPM2580 icon

lekhanX

Verified Safe

by PrithiviPM2580

Overview

Backend API for an AI-powered blogging platform with user authentication, role-based permissions, and content management.

Installation

Run Command
pnpm install && pnpm build && pnpm start

Environment Variables

  • PORT
  • NODE_ENV
  • LOG_LEVEL
  • DB_URL
  • DB_NAME
  • APP_NAME
  • APP_VERSION
  • ADMIN_EMAIL
  • JWT_ACCESS_TOKEN_SECRET
  • JWT_REFRESH_TOKEN_SECRET
  • JWT_ACCESS_TOKEN_EXPIRATION
  • JWT_REFRESH_TOKEN_EXPIRATION

Security Notes

The server demonstrates good security practices including password hashing with bcrypt, JWTs for authentication (secrets from environment variables), refresh token management (stored in DB with user agent and IP), HTTP-only and secure cookies, input validation with Zod, rate limiting, and a comprehensive global error handler that specifically catches and processes JWT-related errors. There are no obvious hardcoded secrets or dangerous patterns like 'eval'. The use of `req.ip` for rate limiting and token tracking relies on proper proxy configuration for accurate client IP in production environments.

Similar Servers

Stats

Interest Score0
Security Score8
Cost ClassLow
Avg Tokens20
Stars0
Forks0
Last Update2025-11-20

Tags

Web & APIsNode.jsExpress.jsMongoDBAuthentication