Overview

What is Stellar?

Stellar is an action based web framework that focuses on developing APIs. Each Stellar execution instance can respond to requests from multiple protocols simultaneously, making it possible to use the same API in different usage scenarios. The framework is written in JavaScript ES6 using Node.JS. The objective of Stellar is to create an easy-to-use development environment that is reusable and scalable, making Stellar an excellent solution not only for small projects but also for enterprise-scale projects.

Stellar uses a system based on actions. This means that all features are represented as actions; you can read more about actions in a section dedicated to them.

A Stellar execution instance is able to both respond to client requests and process tasks - operations that are performed concurrently in background (e.g., sending an email).

Supported Protocols

Architecture

The Stellar core is composed of the Engine, a set of Satellites, and three different types of servers. The Engine is responsible for loading modules and providing mechanisms that allow Satellites to expose their APIs to the rest of the platform so that their functionality can be used by other components. The modular design allows features of a given area to be more easily ported to other projects or shared with the Open Source community.

Core Architecture

How to Contribute

Both the documentation of this website and the Stellar source code are available on GitHub. You can submit pull requests for the dev branch, but first, please read the contribution guide carefully. All help is welcome! πŸ˜‰

You can also help using the issue tracker to report bugs, make suggestions, or submit feature requests.

Structure of an Application

The typical directory structure of a Stellar project is shown below. This example is a simple API that implements the functionality of a blog.

.
β”œβ”€β”€ config
β”‚Β Β  └── (project-level settings)
β”œβ”€β”€ manifest.json
β”œβ”€β”€ modules
β”‚Β Β  β”œβ”€β”€ private
β”‚Β Β  └── blog
β”‚Β Β  β”œβ”€β”€ actions
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ posts.js
β”‚Β Β  β”‚Β Β  └── comments.js
β”‚Β Β  β”œβ”€β”€ config
β”‚Β Β  β”‚Β Β  └── comments.js
β”‚Β Β  β”œβ”€β”€ listeners
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ del_post.js
β”‚Β Β  β”‚Β Β  └── new_post.js
β”‚Β Β  β”œβ”€β”€ manifest.json
β”‚Β Β  β”œβ”€β”€ mod.js
β”‚Β Β  β”œβ”€β”€ middleware
β”‚Β Β  β”‚Β Β  └── edit_permission.js
β”‚Β Β  β”œβ”€β”€ models
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ post.js
β”‚Β Β  Β Β  β”‚Β Β  └── comment.js
β”‚Β Β  β”œβ”€β”€ satellites
β”‚Β Β  β”‚Β Β  └── something.js
β”‚Β Β  └── tasks
β”‚Β Β  └── rss.js
└── temp
└── (temporary files)

manifest.json

The manifest.json file defines the project’s name, version, description, and active modules. Below is an example of the format of this file:

{
"name": "blog",
"version": "1.0.0",
"description": "A simple blog system that supports authentication",
"modules": [
"authentication"
]
}

Start a Server Instance

One of the easy parts of using Stellar is that you don’t need any special configuration to start developing your app. To running an instance of your API you just need to execute a command on the root of your project:

stellar run

Note: to run Stellar as a daemon you need to use the --daemon option

Yap! It’s all you need to start build amazing APIs. πŸ˜‰