Skip to content

A lightweight Express.js framework with Sequelize, automatic module generation, authentication, and a CLI for easy developmen

License

Notifications You must be signed in to change notification settings

Nathius262/nexusjs

Repository files navigation

πŸš€ NexusJS

NexusJS Logo
Express.js

A lightweight Express.js framework with Sequelize, automatic module generation, authentication, and a CLI for easy development.


✨ Features

  • ⚑ Express.js + Sequelize integration
  • βš™οΈ Automatic module generation via CLI
  • πŸ”‘ Built-in authentication (JWT)
  • πŸ“¦ Lightweight & modular structure

πŸ“₯ Installation

Install using NPM:

npm i @nathius262/nexusjs

πŸš€ CLI Commands

πŸ—οΈ Project Scaffolding

Command Description
npx nexus create-project <name> Creates new project
npx nexus init <name> Alias for create-project

🧩 Module Generation

Command Description
npx nexus make-module <name> [flags] Generate complete module
npx nexus make-controller <name> [--admin --api] Generate controller
npx nexus make-service <name> [--admin --api] Generate service
npx nexus make-router <name> [--admin --api] Generate router
npx nexus make-model <name> Generate model + migration

πŸ› οΈ Generation Flags

Flag Description
-m Generate model and migration
-c Generate controller
-r Generate router
-s Generate service
--admin Generate admin version
--api Generate API version

πŸ“Œ Usage Examples

Create a new project

npx nexus create-project ecommerce-app

Generate a complete product module with all components (admin + API)

npx nexus make-module product -mcrs --api --admin

Generate only API components of user module

npx nexus make-module user -crs --api

Generate only an admin controller for payment

npx nexus make-controller payment --admin

πŸ”§ Create a Full Module

nexus make-module <moduleName> -mcrs

πŸ› οΈ Options

Flag Description
-m Generate model and migration
-c Generate controller
-r Generate router
-s Generate service
--admin Generate admin version (CRS)
--api Generate api version (CR)

πŸ“ Output Structure

src/
β”œβ”€β”€ config/
β”œβ”€β”€ middlewares/
β”œβ”€β”€ core/
β”œβ”€β”€ controllers/
β”œβ”€β”€ models/
β”œβ”€β”€ views/
β”œβ”€β”€ modules/
β”‚   └── product/
β”‚       β”œβ”€β”€ controllers/
β”‚       β”‚   β”œβ”€β”€ api/
β”‚       β”‚   β”‚   └── product.controller.js
β”‚       β”‚   β”‚   └── admin.product.controller.js
β”‚       β”‚   └── product.controller.js
β”‚       β”‚   └── admin.product.controller.js
β”‚       β”œβ”€β”€ routes/
β”‚       β”‚   β”œβ”€β”€ api/
β”‚       β”‚   β”‚   └── product.routes.js
β”‚       β”‚   └── admin.product.routes.js
β”‚       β”‚   └── product.routes.js
β”‚       β”œβ”€β”€ services/
β”‚       β”‚   β”œβ”€β”€ product.service.js
β”‚       β”‚   └── admin.product.service.js
β”‚       └── migrations/
β”‚       β”‚
β”‚       └── models/
β”‚           └── product.model.js
β”œβ”€β”€ utils/
└── index.js

πŸ› οΈ Contributing

We welcome contributions! Follow these steps to get started:

1️⃣ Fork the repository

Click the "Fork" button at the top-right of this repo.

2️⃣ Clone your fork

git clone https://github.com/Nathius262/nexusjs.git
cd nexusjs

3️⃣ Create a new branch

git checkout -b feature/your-feature

4️⃣ Make changes & commit

git add .
git commit -m "Added feature XYZ"

5️⃣ Push changes & create a Pull Request

git push origin feature/your-feature

Then go to GitHub and submit a Pull Request (PR) πŸš€


πŸ“ License

This project is licensed under the MIT License.

MIT License

Β© 2025 Nathaniel

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction...

❀️ Support & Feedback

⭐ Star this project on GitHub if you find it useful!
For questions, open an Issue or create a Pull Request.


πŸš€ Let’s Build Together!

Happy coding! πŸ’»βœ¨

About

A lightweight Express.js framework with Sequelize, automatic module generation, authentication, and a CLI for easy developmen

Resources

License

Stars

Watchers

Forks

Packages