Skip to main content

Introduction to BlueLibs

BlueLibs is a TypeScript-based ecosystem of npm packages which are designed to work together giving you a solid foundation on which you can built-on but also containing rapid-prototyping tooling such as Blueprint.

We are Cult of Coders, a software development company which wanted to develop products faster for our clients. This is how BlueLibs was born.

Since our roots lie in custom development for our clients, our goal was to be able to generate apps really fast, but at the same, avoid sacrificing code quality and scalability for the sake of delivering faster.

The 3 Layers

BlueLibs is composed of 3 important layers built on top of each other:

  • Foundation
    • This is the "base", with independent or base-dependent modules (we call them bundles).
    • Contains core logic for handling bundles (initialisation, testing, shutting down, parameterisation, async event handling)
    • Serialization, Logger, Validation, Emailing (React-based), CLI Runners
    • Modules which integrate with: Express, Apollo, GraphQL
    • Database Integrations: MongoDB, PostgreSQL, MySQL
    • Abstract Security Layer (incl. Advanced Permissioning Systems)
    • Integrated with 500+ Authentication Strategies
  • X-Framework
    • A fullstack framework leveraging Apollo GraphQL MongoDB on the backend and React for frontend.
    • The backend part works with any frontend (Vue, Svelte, iOS, Android)
    • Code Generator from Terminal (We call it: x)
    • Cronjobs Support
    • Uploads integrated with S3 (incl. Image Manipulation & Thumbnail Generation)
    • React UI Tooling (Live Data, Administration Interfaces)
    • Easy free deployment with Heroku and MongoDB Atlas
  • Blueprint
    • We write code to generate X-Framework compatible code
    • Generates backend with collections, graphql entities, queries, mutations, inputs, services, cruds.
    • Generates ui admin with menu items for all exposed collections and their CRUDs
    • Fully featured:
      • Relations
      • Filterable Paginated Lists
      • Generates Create/Edit Forms
      • Auto-mocked Data Fixtures
      • Everything customisable
YOU ARE FREE

BlueLibs is not bound to any UI Layer nor API, while we offer rapid prototyping tools, you are free to create your own custom solutions based on a solid foundation and a set of re-usable tools.

Applicability

The sea of applicability is large, here's some examples:

  • CMS for your websites
  • Web Applications (Shops, Presentation, Custom)
  • Backend Development
  • Microservice-based web applications

At Cult of Coders, we are using BlueLibs to reach production faster for our clients by enabling rapid generation through Blueprint and ability to modify and scale the code how we see fit.

Get Started

Installation prerequisities:

Let's install the terminal tool for scaffolding and blueprint generation:

npm install -g @bluelibs/x

Now run it, press x and ENTER. And write "project", enter on it and follow the instructions, they should be very intuitive.

Learning Curve

Before diving in each section, ensure you have the required knowledge to be able to understand and accelerate your learning process.

Foundation

Foundation is composed of modules that are used by X-Framework such as MongoBundle, ApolloBundle, etc.

X-Framework

X-Framework is basically another bundle we call it XBundle for server, and XUIBundle for the ui. Our code is isomorphic in nature, giving us the ability to use same core concepts for React. This makes heavy use of the MongoBundle and ApolloBundle and dictates the stack.

VSCode

We recommend you use VSCode for its amazing TypeScript support with the following extensions:

  • Apollo GraphQL (autocompletion for your graphql servers on frontend)
  • Git Lens (seeing history)
  • GraphQL (syntax highlighting)
  • Prettier (with auto-formatting)

Conclusion

It's time to start your journey. Take it step by step, start with Foundation - Core and move through all the set of packages. Feel free to come back here to the Learning Curve if you feel you get stuck and you don't have all your basic knowledge up to speed.