Skip to main content

Installation

In this section, we will walk you through the process of installing Aetheria on your local machine or server. We will also cover alternative installation methods such as Docker and package managers.

note

Development setup differs from production setup, consider cloning the official Aetheria monorepo for development purposes.

System requirements for running Aetheria

Aetheria requires the following dependencies to be installed on your system:

  • Node.js (latest LTS or higher) 1
  • Node package manager 2
  • MongoDB 3
  • Unix-like operating system (Linux, macOS, WSL, etc.) 4
  • NestJs cli (headless only) 5
Notes on requirements
Node.js 1

Node.js is a JavaScript runtime environment that allows you to run JavaScript code outside a browser. You can download the latest version of Node.js from the official Node.js website or using nvm (suggested)

Node package manager 2

There are many node package managers the most commonly used are npm, yarn and pnpm. You can install npm by installing Node.js or by following the instructions on the official npm website.

Alternatively, you can install yarn by following the instructions on the official yarn website.

Currently, pnpm is not officially supported by Aetheria due to its way of managing deeply nested dependencies, this may change in the future as we strongly think that Aetheria will benefit from pnpm powerful tree reorganization.

MongoDB 3

Currently Aetheria only supports MongoDB as a database, you can install MongoDB by following the instructions on the official MongoDB website.

Even though MongoDB can be installed on a local machine we strongly discourage this practice as it is not secure and will not scale well, instead we suggest using a cloud provider such as MongoDB Atlas for production environments or using the attached docker-compose.yml file for development environments.

Unix-like operating system 4

Aetheria is built on top of two frameworks, Nest.js and Next.js, as they are both built on top of Node.js they are platform-agnostic, however, due to the optimization made by Aetheria's to the plugin system, we strongly suggest using a Unix-like operating system such as Linux, macOS or WSL.

One of the main reasons for this is that Aetheria uses symlinks to link plugins to the main application, this may not be fully supported on Windows and may require additional configuration.

This is valid for development but is mostly a strict requirement for production environments.

NestJs cli 5

The NestJs cli is a command-line interface that allows you to generate NestJs applications and modules, it eases the development process by providing a set of commands that can be used to generate boilerplate code and manage dependencies, build the app and start development server. This is only required for the headless version of Aetheria, you can install it by running the following command:

npm install -g @nestjs/cli

Step-by-step installation guide

1. Clone the repository

Depending on your requirements, you can clone the official Aetheria monorepo, the Aetheria frontend repository or the headless one.

git clone --recurse-submodule [email protected]:override-sh/aetheria.git
note

In order to clone the repositories you must have git installed on your system.

2. Install dependencies

cd aetheria/aetheria-frontend
npm install

# In a separate terminal
cd aetheria/aetheria-headless
npm install

3. Configure the application

# ensure that you are in the aetheria-frontend directory
cp ./apps/frontend/.env.example ./apps/frontend/.env

# In a separate terminal
# ensure that you are in the aetheria-headless directory
cp .env.example .env

4. Build the application

note

This step is only required for production environments, for development environments you can skip this step.

# ensure that you are in the aetheria-frontend directory
npx nx run frontend:export

# In a separate terminal
# ensure that you are in the aetheria-headless directory and have installed the NestJs cli
npm run build

5. Start the application

Production environment
# ensure that you are in the aetheria-frontend directory
npx nx run frontend:serve:production

# In a separate terminal
# ensure that you are in the aetheria-headless directory and have installed the NestJs cli
npm run cli:seed # this will seed the database with some dummy data
npm run start:prod
Development environment
# ensure that you are in the aetheria-frontend directory
npx nx run frontend:serve

# In a separate terminal
# ensure that you are in the aetheria-headless directory and have installed the NestJs cli
npm run cli:seed # this will seed the database with some dummy data
npm run start

Alternative installation methods

Docker

Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package.

As soon as you have installed Docker, you can run the following command to start the application:

docker-compose up

Dedicated images

Dedicated images are available for the frontend and the headless application.

You can find them on the Docker Hub.

Serverless

Serverless is a cloud computing execution model in which the cloud provider allocates machine resources on demand, taking care of the servers on behalf of their customers.

Serverless computing does not eliminate servers, but instead seeks to emphasize the idea that computing resource considerations can be moved into the background during the design process.

Aetheria (both headless and frontend) is not currently available as a serverless application due to the nature of its plugin system.