CloudGeometry DevX Cloud Native Application Starter Kit ๐Ÿš€

May 23, 2024 ยท View on GitHub

Cloud Native Application template by CloudGeometry team.

Prerequisites

Before you begin, ensure that you have the following installed on your machine:

  • Node.js (version 18.15.0 or higher)
  • Yarn (version 1.22 or higher)
  • PostgreSQL (version 15 or higher)
  • Docker (version 20.10.14 or higher)

Installing Node.js

Download and install Node.js from the official website

Installing Yarn

To install Yarn, follow the instructions in the official documentation

Installing Docker

To install Docker, follow the instructions in the official documentation for your operating system

Installing PostgreSQL

Download and install PostgreSQL from the official website or

Run PostgreSQL in Docker using image of your choice like official one

docker run --name cg-cnask-postgres -d -p 5432:5432 -e POSTGRES_PASSWORD=mysecretpassword -d postgres

Getting Started

  1. Clone this repository to your local machine.
  2. Install the project dependencies using Yarn:
# yarn
yarn install
  1. Create a new PostgreSQL database and user with the following commands:
createdb my_database
createuser my_user

Note: Replace my_database and my_user with the names you want to use for your database and user. Set the environment variables to API application .env.

When using docker: You could skip this step as you are going to provide db name, user, and password as input parameters.

  1. Setup application services according to README.md

  2. Setup tenant services according to README.md

Local Development

Use the following commands to:

Run application API services. By default, it will be available on http://localhost:3000/.

# yarn
yarn workspace cnask-api start

Run application web UI. By default, it will be available on http://localhost:4200/.

# yarn
yarn workspace cnask-web-client dev

Run tenant management application API services. By default, it will be available on http://localhost:4000/.

# yarn
yarn workspace cnask-api-tenant start

Run application web UI. By default, it will be available on http://localhost:4210/.

# yarn
yarn workspace cnask-web-tenant-admin dev

The app will automatically reload if you change any of the source files.