1.0.0 ⢠Published 9 months ago
@codenarration/create-nexanode v1.0.0
NexaNode Backend Framework
A modern, TypeScript-based backend framework built on Node.js, designed for creating scalable, maintainable, and type-safe applications with ease.
š Core Features
- Type-Safe Architecture: Built with TypeScript for enhanced developer experience and compile-time safety
- Decorator-Based Routing: Intuitive API design using decorators for clean and maintainable code
- Base Classes: Extensible
BaseController
andBaseRepository
for consistent patterns - Authentication & Authorization: Built-in JWT authentication with middleware support
- Database Integration: Seamless TypeORM integration with PostgreSQL
- Rate Limiting: Configurable request rate limiting to protect your APIs
- Error Handling: Comprehensive error management system with custom error types
- Logging: Structured logging system using Winston
- Middleware Support: Flexible middleware system for request processing
- Migration Tools: Built-in database migration scripts and utilities
š ļø Tech Stack
- Runtime: Node.js
- Language: TypeScript
- Web Framework: Express.js
- Database: PostgreSQL
- ORM: TypeORM
- Authentication: JWT
- Logging: Winston
- Request Validation: Class Validator & Class Transformer
š¦ Installation
# Clone the repository
git clone https://github.com/yourusername/nexanode.git
# Install dependencies
npm install
š§ Configuration
- Create a
.env
file in the root directory - Configure your environment variables:
PORT=3000
NODE_ENV=development
DB_HOST=localhost
DB_PORT=5432
DB_USERNAME=your_username
DB_PASSWORD=your_password
DB_DATABASE=your_database
JWT_SECRET=your_jwt_secret
š Quick Start
// Example Controller
import { Controller, Get, Post } from "../decorators/route";
import { BaseController } from "../core/BaseController";
@Controller("/users")
export class UserController extends BaseController {
@Get("/")
async getUsers() {
return { message: "Users retrieved successfully" };
}
@Post("/")
async createUser() {
return { message: "User created successfully" };
}
}
š Project Structure
src/
āāā config/ # Configuration files
āāā controllers/ # API Controllers
āāā core/ # Framework core classes
āāā decorators/ # TypeScript decorators
āāā entities/ # TypeORM entities
āāā middleware/ # Express middleware
āāā repositories/ # Data access layer
āāā scripts/ # Utility scripts
āāā types/ # TypeScript type definitions
āāā utils/ # Helper utilities
š Security Features
- JWT-based authentication
- Rate limiting protection
- Request validation
- Secure error handling
- Type-safe operations
š¤ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
š License
This project is licensed under the MIT License - see the LICENSE file for details.
1.0.0
9 months ago