npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

nx-starter

v1.0.9

Published

A simple MVC starter template with node, express, sequelize and socket.io

Downloads

211

Readme

Node Express Starter 2.0

A modern, feature-rich starter template for building scalable web applications with Node.js, Express, MySQL, and Socket.io. This template provides a solid foundation for developing web applications using the MVC architecture pattern.

Features

  • Authentication Ready: Built-in authentication system supporting both REST API and cookie-based EJS authentication flows
  • MVC Architecture: Clean and organized code structure following the Model-View-Controller pattern
  • Real-time Support: Integrated Socket.io for real-time communication
  • Database Integration: Preconfigured Sequelize ORM with MySQL support
  • API Validation: Request validation using Joi
  • Modern UI: Clean and responsive user interface
  • Security: Implementation of best security practices
  • Email Integration: Nodemailer setup for sending emails
  • Session Management: Express session with cookie support

Prerequisites

  • Node.js (v14 or higher)
  • MySQL
  • npm or yarn

Quick Start

You can get started with Node Express Starter 2.0 in two ways:

Option 1: Using npx (Recommended)

npx nx-starter my-project
cd my-project

This will create a new project in the my-project directory with all dependencies installed.

Option 2: Clone the Repository

  1. Clone the repository
git clone https://github.com/khokonm/node-express-starter-2.0.git
cd node-express-starter-2.0
  1. Install dependencies
npm install
  1. Configure environment variables
cp .env.example .env
# Edit .env with your configuration
  1. Start development server
npm run dev
  1. For production
npm start

Project Structure

├── controllers/        # Route controllers (handle incoming requests)
│   ├── api/           # API controllers for REST endpoints
│   ├── auth/          # Authentication controllers
│   └── views/         # View controllers for server-side rendering
├── events/            # Event handlers for Socket.io and system events
├── libs/              # Library functions and shared business logic
├── middleware/        # Express middleware (auth, validation, etc.)
├── models/            # Database models and schemas
├── routes/            # Application routes and API endpoints
├── services/          # Business logic and external service integration
├── utils/             # Utility functions and helpers
├── validations/       # Request validators and schemas
├── views/             # EJS templates and static assets
├── app.js             # Express app setup and configuration
└── server.js          # Server entry point and Socket.io setup

Environment Variables

Create a .env file in the root directory with the following variables:

# Server Configuration
PORT=3000
NODE_ENV=development

# Database Configuration
DB_HOST=localhost
DB_USER=root
DB_PASS=
DB_NAME=your_database
DB_PORT=3306

# Authentication
JWT_SECRET=your_jwt_secret
JWT_EXPIRES_IN=7d

# Session Configuration
SESSION_SECRET=your_session_secret
SESSION_EXPIRES=24h

# Mail Configuration (Optional)
MAIL_HOST=smtp.example.com
MAIL_PORT=587
[email protected]
MAIL_PASS=your_email_password

# OAuth Configuration (Optional)
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret

API Documentation

Detailed API documentation is available at /api-playground when running the development server. The documentation includes:

  • Authentication endpoints
  • User management
  • Business logic APIs
  • WebSocket events
  • Request/Response examples
  • Schema validation rules

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

This project is licensed under the ISC License - see the LICENSE file for details.

Author

Khokon M. (khokon.dev)

Support

For support and questions, please use the GitHub Issues page.

Acknowledgments

  • Express.js team for the excellent web framework
  • Sequelize team for the robust ORM
  • Socket.io team for real-time capabilities
  • The open-source community for various packages and inspirations