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 🙏

© 2024 – Pkg Stats / Ryan Hefner

ubel

v2.0.0

Published

ubel is a Back-end FrameWork based on express. it's most like a boilerplate than a framework

Downloads

10

Readme

UBEL Framework

ubel is a backend framework based on Express, designed to function as a boilerplate to streamline the development of web applications. It includes built-in features for generating Mongoose schemas, controllers, and routes. ubel also facilitates the setup of authentication and authorization systems and provides a pre-defined file structure for easy project management.

Features

  • Mongoose Schema Generator: Automatically create schemas with one command.
  • Controller and Routes Generator: Quickly generate RESTful controllers and routes.
  • Authentication System: Build an entire authentication system with a single command.
  • Authorization: Includes protected routes to manage access control.
  • File Structure: Pre-defined boilerplate for organizing your project efficiently.

Installation

  1. Clone the repository:

    ```bash npm install ubel ```

  2. Navigate to the project directory:

    ```bash cd ubel-project ```

  3. Install dependencies:

    ```bash npm install ```

Commands

1. Generate Mongoose Schema, Controller, and Routes

ubel provides a command to quickly create Mongoose schemas, controllers, and routes based on the object properties you specify.

Example:

```bash ubel reelseiden user atribute:mongooseSchema type (string, number,date) ```

This command generates:

  • User Mongoose schema
  • User controller
  • RESTful routes for the User model

2. Generate Authentication System

ubel can generate a complete authentication system using the following command:

```bash ubel sorganeil ```

This command will:

  • Create a User model with properties such as first_name, last_name, email, password, phone, status, and role.
  • Generate an authentication controller with routes (login, register, etc.).
  • Set up JWT-based authentication for the project.

File Structure

The framework provides a well-organized file structure to keep your project modular and easy to navigate. Here's an example:

``` ubel-framework/ │ | ├── models/ ├── controllers/ ├── routes/ ├── middlewares/ |── config/ |── app.js |── .env │ └── README.md ```

Usage

ubel Create Project

To create a new project using ubel, follow these steps:

  1. Run the generate command to create Mongoose models, controllers, and routes:

    ```bash ubel generate objectname propertyName:propertyType ```

  2. If your project requires authentication, run the following command to set up the authentication system:

    ```bash ubel sorganeil ```

    This will copy authentication system files into your src directory.

  3. Customize the generated files based on your project requirements.

Authentication and Authorization

After generating the authentication system, you will have access to several endpoints:

  • Register: /api/register
  • Login: /api/login
  • Protected Routes: Use middleware to protect routes based on user roles and permissions.

Requirements

  • Node.js (v14+)
  • MongoDB
  • Express
  • Mongoose

Contributing

Contributions are welcome! If you would like to contribute to the ubel framework, feel free to submit pull requests or open issues.