This project provides a streamlined setup process for a Nuxt.js application that seamlessly integrates with the Stella framework. It offers a convenient environment for building interactive chat applications or leveraging Stella's features within your Nuxt projects.
New Update Demo
Chat-stella.1.mp4
Fiest Demo https://github.com/aminhaghi86/stella-app/assets/90243818/15fdc551-822e-440f-8ab2-cee6ae022b16
-
Clone the Repository
-
Install dependency of this project run
npm install
- Stella Configuration
Setup STELLA (simple tutorial in documentation) : https://docs.stellaframework.com/Getting_Started.html)
- Create .env File: At the root of your project, create a file named .env. This file will store environment variables for your Nuxt.js application.
BASE_URL="http://localhost:5001" # Replace with your backend URL
SOCKET_HOST="localhost"
SOCKET_PORT="5001"
SOCKET_SSL="false"
SOCKET_NAMESPACE="/chat"
Open nuxt.config.ts and add the following code block:
export default defineNuxtConfig({
devtools: { enabled: true },
runtimeConfig: {
public: {
SOCKET_HOST: process.env.SOCKET_HOST,
SOCKET_PORT: process.env.SOCKET_PORT,
SOCKET_SSL: process.env.SOCKET_SSL,
SOCKET_NAMESPACE: process.env.SOCKET_NAMESPACE,
DEFAULT_WORKSPACE_ID: process.env.DEFAULT_WORKSPACE_ID, // Add this line if needed
},
private: {
// Define private variables here (not exposed on client-side)
},
},
});
npm run dev
stella serve
stella