This repository serves as a template for creating robust and production-ready Node.js applications. It includes essential tools, best practices, and modern development workflows to help you kickstart your projects.
- ποΈ MVC Architecture: Organized folder structure for maintainability and scalability.
- π οΈ Tool Integration: Pre-configured with Git, Husky, Prettier, and Commitlint for consistent and high-quality code.
- π Environment Management: Efficient handling of development and production environments.
- π Security Best Practices: Built-in measures to safeguard your app against vulnerabilities.
- π Error Logging & Monitoring: Tools for tracking issues and maintaining application health.
- π³ Docker Integration: Containerization support for modern deployment workflows.
π project-root
βββ π .husky # Git hooks for enforcing code quality
βββ π dist # Compiled output files
βββ π docker # Docker-related configurations
βββ π logs # Application log files
βββ π migrations # Database migration scripts
βββ π node_modules # Installed dependencies
βββ π public # Static files
βββ π script # Utility scripts
βββ π src
β βββ π config # Configuration and environment variables
β βββ π constant # Constants used throughout the application
β βββ π controller # API request controllers
β βββ π middleware # Middleware for handling requests and errors
β βββ π model # Database models
β βββ π router # Route definitions
β βββ π services # Business logic and reusable services
β βββ π types # Type definitions for TypeScript
β βββ π util # Utility functions for logging, error handling, etc.
β βββ π app.ts # Main application setup
β βββ π server.ts # Entry point for starting the server
βββ π .dockerignore # Files to exclude from Docker builds
βββ π .env.development # Environment variables for development
βββ π .env.example # Example environment variables
βββ π .env.production # Environment variables for production
βββ π .gitignore # Ignored files for Git
βββ π commitlint.config.js # Commit linting rules
βββ π ecosystem.config.js # PM2 configuration for process management
βββ π eslint.config.mjs # ESLint configuration file
βββ π nodemon.json # Nodemon configuration for development
βββ π package-lock.json # Lock file for dependencies
βββ π package.json # Project metadata and dependencies
βββ π README.md # Documentation
βββ π tsconfig.json # TypeScript configuration