Skip to main content

Development Setup

This guide will walk you through the process of setting up the Stencil microservice for development on your local machine.

Step 1: Clone the Repository

Clone the Stencil repository to your local machine using the following command:

git clone --depth 1 https://github.com/ChakshuGautam/stencil.git my-app

Step 2: Navigate to the Project Directory

Move into the newly created project directory:

cd my-app/

Step 3: Copy Environment Configuration

Copy the example environment file to create your local configuration:

cp env-example .env

Step 4: Run Setup Containers

Start the setup container using Docker Compose:

docker compose up setup

Step 5: Start Stencil Containers

Launch the Stencil containers in detached mode:

docker compose up -d

Step 6: Install Dependencies

Install project dependencies using npm:

npm install

Step 7: Generate Prisma Client

Generate the Prisma client by running the following command:

npx prisma generate

Step 8: Start the Development Server

Start the Stencil microservice in development mode:

npm run start:dev

Congratulations! You have successfully set up Stencil for development. The microservice is now running, and you can start building and testing your features. Access the API documentation at http://localhost:3000/docs to explore the available endpoints.