Skip to content

new changes - #22

Open
Raunak1375 wants to merge 8 commits into
usarfoss:mainfrom
Raunak1375:main
Open

new changes#22
Raunak1375 wants to merge 8 commits into
usarfoss:mainfrom
Raunak1375:main

Conversation

@Raunak1375

Copy link
Copy Markdown

Fix #8

This pull request introduces the complete Celtrix project, which consists of two major components:

A Command-Line Interface (CLI) tool to automate the creation of new backend projects.

A production-ready Backend Template that includes all the features specified in the original issue, such as logging, rate limiting, authentication, and more.

Changes Implemented

  1. The celtrix-cli Tool 🚀
    A new CLI tool, installable via npm, has been created to scaffold a new backend project with a single command.

Command: celtrix create

Interactive: Uses inquirer to prompt the user if the target directory already exists, preventing accidental data loss.

User-Friendly Output: Uses chalk for colored and easy-to-read console messages.

Core Technology: Built with Node.js and commander.js for robust command handling.

  1. The Production-Ready Backend Template ⚙️
    The CLI generates a new project based on a powerful and scalable backend template built with Express.js and TypeScript. This template serves as the solution to the core task requirements.

Authentication: Implemented JWT-based authentication with Role-Based Access Control (RBAC). Middleware is included to protect routes and authorize specific roles (e.g., admin).

Logging: Integrated Winston for robust, asynchronous logging. Logs are directed to the console in development and to error.log / combined.log files in production.

Rate Limiting: Added middleware using express-rate-limit to prevent brute-force attacks and API abuse.

File Utilities: A dedicated service (file.service.ts) can parse the contents of uploaded PDF and XLSX files using pdf-parse and xlsx.

Notifications: A basic NotificationService stub is included, demonstrating where to integrate email, push, or WebSocket notifications.

Clean Architecture: The project follows a clean and scalable structure, separating concerns into controllers, services, middlewares, routes, and configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Logging, Rate Limiting, File Utils, Notifications, and Auth with Role-Based Access

1 participant