Skip to content Loading repository dataβ¦
ai-enabled-nodejs-microservices-starter GitHub Details, Stars and Alternatives | OpenRepoFinder
Home / Repositories / clintgallivan/ai-enabled-nodejs-microservices-starter clintgallivan / repository
ai-enabled-nodejs-microservices-starter π Production-ready Node.js/TypeScript starter with complete JWT authentication, microservices architecture, and developer tooling. Includes email service, database cleanup, testing, Postman collections, AI development setup (Claude/Cursor), Docker deployment, and quality tools. Skip the boilerplate!
View Repository on GitHub β REPOSITORY OVERVIEW Live repository statistics β
18 Stars
β 1 Forks
β― 0 Open issues
β 18 Watchers
46 /100
OPENREPOHUB HEALTH SIGNAL Mixed signals A transparent discovery signal based on current public GitHub metadata.
Recent activity35% weight
52 Community adoption25% weight
19 Maintenance state20% weight
100 License clarity10% weight
0 Project information10% weight
35 This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
README preview π AI-Enabled Node.js Microservices Starter
Production-ready TypeScript microservices with AI-powered development workflow
β¨ Claude Code + Cursor AI Ready | π³ Docker Native | π Railway Template | π Complete Auth
An AI-enhanced microservices starter that gets you from zero to production in minutes. Built for modern development with Claude Code and Cursor integration, featuring complete authentication, microservices architecture, and one-click Railway deployment.
β¨ Why This Template?
π€ AI-First Development
Pre-configured Claude Code context (CLAUDE.md)
Cursor IDE integration with Sonnet-4
AI-aware project conventions and patterns
Intelligent code completion and suggestions
π Railway Template Ready
One-click deployment to Railway
Pre-configured for microservices scaling
Environment-specific deployments (dev/staging/prod)
Auto-detected Dockerfiles for each service
ποΈ Production Architecture
Microservices with dedicated email & token cleanup services
JWT authentication with refresh token rotation
Redis-backed queues and caching
PostgreSQL with Prisma ORM
Comprehensive logging and monitoring
π§ Developer Experience
TypeScript throughout with absolute imports
Hot reload development environment
Automated release management
Quality gates (ESLint, Prettier, TypeScript)
Docker containerization
π Tech Stack
Node.js + TypeScript
Express
Prisma ORM + PostgreSQL
Redis (JWT blacklist + Bull queues)
JWT authentication (15m access + 7d refresh tokens) + scoped admin tokens (health/logs)
Bull queue system for reliable email processing
Microservices architecture (email-service, token-cleanup)
Winston structured logging (env-aware)
ALGORITHMICALLY RELATED Similar Open-Source Projects Selected from shared topics, language and repository descriptionβnot editorial ratings.
π Production-ready AI news aggregation API with 11 intelligent features β¨ | Multi-source aggregation (70+ sources) | Gemini AI enhancement | Personalized recommendations | Built with Node.js + TypeScript + MongoDB π
66 /100 healthActive repository
TypeScriptMIT #ai-news-aggregation #ai-powered-news #backend-api #content-recommendation
β 0 forks β― 0 issues Updated May 17, 2026
π‘οΈ Secure REST API & Developer Dashboard is a production-ready platform featuring JWT authentication, RBAC/ABAC authorization, secure REST APIs, PostgreSQL, real-time monitoring, API sandbox, telemetry analytics, task management, and a modern React dashboard built with Node.js & TypeScript. ππ
62 /100 healthRecently updated Active repository
TypeScriptNo license
β 0 forks β― 0 issues Updated 3 days ago
CORS per environment via config
Docker containerization
Railway-ready (dev/staging/prod)
π― Core Features
User registration/login with validation (email + strong password)
JWT access tokens (15m) + refresh tokens (7d) with rotation
Password reset and email verification flows
Admin-only token minting for health/logs endpoints
Role-based access control (user, admin)
Fire-and-forget email processing via microservice
Automated token cleanup via dedicated microservice
Centralized error handling
Strong logging with global metadata (version, environment, service)
Secure CORS configuration per environment
Queue-based architecture for async operations
π Project Structure src/
βββ app.ts # Express app wiring (CORS, security, parsers, routes, errors)
βββ server.ts # Server bootstrap + startup logs
βββ config/
β βββ env.ts # getEnvVar helper (no defaults; explicit envs)
β βββ index.ts # Typed config, reads env vars
βββ controllers/
β βββ authController.ts # register, login, logout, refresh, password reset, email verify
β βββ exampleController.ts
β βββ healthController.ts
βββ middleware/
β βββ errorHandler.ts # Central error middleware
β βββ tokenAuthHandler.ts # JWT verification + blacklist check
βββ routes/
β βββ index.ts # Route aggregation
β βββ v1/
β βββ authRoute.ts # /v1/auth routes
β βββ healthRoute.ts
β βββ logsRoute.ts
β βββ homeRoute.ts
βββ services/
β βββ redis/
β β βββ jwtBlacklist.ts # blacklistToken, isTokenBlacklisted
β β βββ refreshTokens.ts # refresh token management
β β βββ redisClient.ts # Redis connection
β βββ authTokenService.ts # password reset & email verification tokens
β βββ emailQueueService.ts # fire-and-forget email processing
βββ utils/
β βββ assertions/ # Validation (isValidEmail, isStrongPassword)
β βββ logger.ts # Winston logger
microservices/
βββ email-service/ # Dedicated email processing microservice
β βββ src/
β βββ Dockerfile
β βββ package.json
β βββ README.md
βββ token-cleanup/ # Automated token cleanup microservice
βββ src/
βββ Dockerfile
βββ package.json
βββ README.md
π Quick Start
Option 1: Railway Template (Recommended)
Click the "Deploy on Railway" button above
Connect your GitHub account
Railway will automatically:
Fork this repository
Set up PostgreSQL and Redis
Deploy all microservices
Configure environment variables
Your app will be live in ~3 minutes!
Option 2: Local Development
Prerequisites
Node.js 18+
PostgreSQL database per environment (dev/staging/prod)
Redis instance per environment (or shared with env-specific keys)
Install & Setup # Clone and install
git clone <your-repo-url>
cd nodejs-microservices-starter
yarn install
Environment Files Create the following files in the repo root (values are examples):
# .env.development
NODE_ENV=development
PORT=3000
DATABASE_URL=postgresql://user:pass@localhost:5432/myapp_dev
JWT_SECRET=dev_jwt_secret
HEALTH_SECRET=dev_health_secret
LOGS_SECRET=dev_logs_secret
REDIS_URL=redis://localhost:6379
ALLOWED_ORIGINS=http://localhost:3001
# .env.staging
NODE_ENV=staging
DATABASE_URL=postgresql://...staging
JWT_SECRET=staging_jwt_secret
HEALTH_SECRET=staging_health_secret
LOGS_SECRET=staging_logs_secret
REDIS_URL=redis://...
ALLOWED_ORIGINS=https://staging-frontend.yourapp.com
# .env.production
NODE_ENV=production
DATABASE_URL=postgresql://...production
JWT_SECRET=prod_jwt_secret
HEALTH_SECRET=prod_health_secret
LOGS_SECRET=prod_logs_secret
REDIS_URL=redis://...
ALLOWED_ORIGINS=https://yourapp.com,https://www.yourapp.com
No defaults are used for critical variables; missing envs will throw at startup.
Railway sets PORT automatically; you do not need to set it there.
π€ AI Development Workflow This template is optimized for AI-assisted development:
Claude Code Integration
π CLAUDE.md : Complete project context for Claude Code sessions
π― Conventions : AI-aware coding patterns and architecture
π οΈ Commands : Pre-configured yarn scripts for AI suggestions
Cursor IDE Setup
π cursor_context.md : Mirrors CLAUDE.md for Cursor AI
βοΈ .cursorrules : Auto-applied coding standards
π Sync : Automatic context synchronization
What Makes This AI-Enhanced?
CLAUDE.md - Complete project context for Claude Code
cursor_context.md - Mirrors context for Cursor IDE
.cursorrules - Auto-applied coding standards
Synchronized documentation across all AI tools
π― AI-Optimized Patterns
# AI understands these semantic commands
yarn quality # Runs type-check + lint + format
yarn release:minor # Intelligent version bumping
yarn migrate:dev # Context-aware DB migrations
yarn dev # Hot reload with AI suggestions
π Instant AI Onboarding
Zero configuration needed for Claude Code or Cursor
AI instantly understands your architecture and patterns
Contextual suggestions based on microservices best practices
Automated code quality and consistency
π Scripts {
"dev": "dotenv -e .env.development -- ts-node-dev --respawn --transpile-only -r tsconfig-paths/register src/server.ts",
"staging": "dotenv -e .env.staging -- ts-node-dev --respawn --transpile-only -r tsconfig-paths/register src/server.ts",
"build": "tsc",
"start": "dotenv -e .env.production -- node dist/server.js",
"migrate:generate": "dotenv -e .env.development -- prisma migrate dev --create-only",
"migrate:dev": "dotenv -e .env.development -- prisma migrate deploy",
"migrate:staging": "dotenv -e .env.staging -- prisma migrate deploy",
"migrate:prod": "dotenv -e .env.production -- prisma migrate deploy"
}
πββοΈ Run Locally # Development backend on http://localhost:3000
yarn dev
# Staging-config backend locally
yarn staging
# Start all services with Docker
docker-compose up
π Database Setup (Prisma + PostgreSQL)
π Quick Database Setup
Option 1: Railway Template (Automatic) When you deploy via Railway template:
PostgreSQL is auto-provisioned and connected
Migrations run automatically during deployment
Ready to use - no manual setup needed!
Option 2: Local Development Setup
Set up PostgreSQL locally or use a cloud provider
Configure DATABASE_URL in your .env.development:
DATABASE_URL=postgresql://user:password@localhost:5432/myapp_dev
Run initial migration to create tables:
yarn migrate:dev
Generate Prisma client :
yarn prisma generate
π Database Schema The starter includes a minimal authentication schema:
users - User accounts with email verification
auth_tokens - Password reset & email verification tokens
Location: prisma/schema.prisma | Generated client: generated/prisma/
π Migration Commands # Development: Apply migrations and generate client
yarn migrate:dev
# Production environments: Apply migrations only
yarn migrate:staging # For staging environment
yarn migrate:prod # For production environment
# Create new migration (when you modify schema)
yarn migrate:generate -- --name your_migration_name
# Generate Prisma client after schema changes
yarn prisma generate
π¨ Important Setup Notes
Database is auto-configured β
Migrations run automatically β
No manual setup required β
Run yarn migrate:prod after first deployment
Run migrations after each schema change
Generate client in build process
Run yarn migrate:dev after cloning
This creates tables and generates the client
Redis also required (see docker-compose.yml)
π First-Time Setup When you first clone this template:
No existing migrations - The template starts clean
Run yarn migrate:dev - This will:
Create your first migration based on the schema
Apply it to your database
Generate the Prisma client
Database ready - You now have users and auth_tokens tables
The starter schema includes everything needed for authentication!
π Authentication
Endpoints
POST /v1/auth/register (with email verification)
POST /v1/auth/login
POST /v1/auth/refresh (refresh access token)
POST /v1/auth/logout (blacklists token, optional ?all=true)
POST /v1/auth/forgot-password
POST /v1/auth/reset-password
POST /v1/auth/change-password (authenticated)
POST /v1/auth/verify-email
POST /v1/auth/resend-verification
GET /v1/auth/health-token (admin only)
GET /v1/auth/logs-token (admin only)
JWT Tokens
Access token: 15 minutes, signed with JWT_SECRET
Refresh token: 7 days, stored in Redis with session rotation
Password reset tokens: 1 hour, database-backed with single use
Email verification tokens: 24 hours, database-backed with single use
Health/Logs tokens: 1 hour, signed separately (HEALTH_SECRET, LOGS_SECRET). Intended for service endpoints like /v1/health and /v1/logs
Middleware: tokenAuthHandler
Verifies token using the expected secret (based on route scope) and populates req.user.
Checks Redis blacklist for access tokens (revoked on logout). If blacklisted β 401.
Logout
Blacklists current access token in Redis with TTL matching token expiry.
Health/Logs tokens are not blacklisted during user logout (different scope/use).
β
Validation
Email: utils/assertions/isValidEmail.ts
Password strength: utils/assertions/isStrongPassword.ts
π CORS Configured in src/app.ts using `config.a
π Production-ready Node.js TypeScript template with Express, Sequelize ORM, JWT authentication, PostgreSQL, feature-first architecture, and security best practices. Perfect for building REST APIs and backend services.
60 /100 healthActive repository
TypeScriptISC
β 0 forks β― 0 issues Updated May 25, 2026
π A modern, production-ready boilerplate for Node.js TypeScript WebAssembly applications with performance optimization and graceful JavaScript fallbacks
51 /100 healthActive repository Has homepage
TypeScriptMIT #boilerplate #nodejs #performance #template
β 0 forks β― 0 issues Updated Aug 2, 2025
Project homepage β