Skip to content

The Hexan Knight Journey WIP ​

Embarking on your journey with Hexancore is like training to become a Hexan Knight. It’s not always easy, and the dark side of bugs and errors lurks around every corner.

An image

But don’t worry, brave developer! This quick start guide is your Hexakey, ready to cut through the complexities and get you up and running at light speed. Remember, every master was once a beginner. May your code compile and your tests pass! 🌟

An image

Chapter 1: Create a Workspace ​

Before we start, ensure You installed all basic tools:

Loading...

Introduction to Nx ​

In the vast expanse of the coding universe, developers seek powerful tools to navigate through the challenges of modern development.

Enter Nx, a set of extensible dev tools designed to help you explore, build, and manage your applications at any scale. Imagine it as a starship, equipped to traverse the complexities of code, allowing you to efficiently manage multiple projects within the same monorepo.

With Nx, you are set to embark on an interstellar journey of discovery and innovation.

Launching Your Coding Odyssey ​

Your mission in our training program is create system designed for managing logistics operations in space.

// TODO: Domain overview // - Module Fleet // - Module Mission // - Module Account

As a brave space explorer, you will use Nx to set up your workspace, preparing yourself for the challenges ahead.

The Command to create workspace πŸš€ ​

To launch your starship(workspace), You must first execute a powerful command in terminal.

$npx create-nx-workspace astronexus \
--preset @hexancore/nx \
--pm pnpm \
--nxCloud skip \
--workspaceType integrated
Arguments
astronexusName of workspace
--pm pnpmHexancore best works with pnpm package manager
--preset @hexancore/nxHexancore Nx preset
--workspaceType integratedHexancore works best in integrated repo docs

This command will initialize your workspace with all the necessary configurations for a successful mission.
In our training program we will use astronexus as our starship name πŸ˜ƒ.

Now, open created folder in Visual Code, install recommended extensions and run:

$make init_devenv

And go to next step.

An image

Chapter 2: Backend ​

Once your workspace is set up, the next step in your mission is to create the backend for application. The backend is the engine that powers your starship, handling data processing, business logic, and interactions with databases and other services.

Step 1: Create backend library ​

Execute the following command(standard execute of Nx generator docs) in your terminal to generate a new backend application within your workspace.

$nx g @hexancore/nx:lib nebula-explorer/backend \
--type backend
Arguments
@hexancore/nx:libHexancore library generator
nebula-explorer/backendLibrary directory, Hexancore supports multi-apps monorepo and convention is [app]/[service]
--type backendSpecifies type of library as generic backend

This command will generate a generic backend library in directory apps/nebula-explorer/backend and Nx project name will be nebula-explorer-backend.

// TODO: fill

Step 2: Create shared library ​

// TODO: fill

Step 3: Create api application ​

Now we need create http api for our navigation system, execute:

$nx g @hexancore/nx:app nebula-explorer/api --type backend
Arguments
@hexancore/nx:appHexancore application generator
nebula-explorer/apiApplication directory, Hexancore supports multi-apps monorepo and convention is [app]/[service]
--type backendSpecifies type of application as generic backend

This command will generate a generic backend application in directory apps/nebula-explorer/api and Nx project name will be app-nebula-explorer-api.