Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

crafta

daxp472125ISC1.2.5

Lightweight, modular Node.js framework

auth, authentication, jwt, bcrypt, mongoose, express, plugins, backend, framework, node.js, modular, plug-and-play, crafta

readme

Crafta

NPM Version License Downloads

Lightweight, modular Node.js framework for rapid backend development

Table of Contents

Features

  • Modular & Lightweight: Easily extendable and adaptable to your needs.
  • Authentication Ready: Pre-built authentication system with JWT and bcrypt support. Install it separately via @dax-crafta/auth.
  • Express Integration: Built on top of Express, it integrates smoothly into your existing Node.js apps.
  • Plug-and-Play System: Minimal setup required—just install and configure to get started in minutes.

Installation

# Core package
npm install crafta

# Optional: Authentication module
npm install @dax-crafta/auth

Quick Start

const crafta = require('crafta');
const { auth } = require('@dax-crafta/auth');

const app = crafta();

// Enable authentication (optional, if you need auth functionality)
app.use(auth({
  secret: 'your-secret-key',
  expiresIn: '1d'
}));

// Define a protected route
app.get('/protected', (req, res) => {
  res.json({ message: 'Protected route accessed successfully!' });
});

app.listen(3000, () => {
  console.log('Server running on http://localhost:3000');
});

Documentation

For detailed documentation, visit our documentation site.

Authentication

If you need authentication features, you can integrate @dax-crafta/auth:

const { auth } = require('@dax-crafta/auth');

// Configure authentication
app.use(auth({
  secret: 'your-secret-key',
  expiresIn: '1d'
}));

// Create a new user
const user = await createUser({
  username: 'john',
  password: 'secure123'
});

Contributing

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

Support

License

ISC © [Dax Patel]