This is a SvelteKit implementation of the Teleme Analytics Chatbot, focused on providing healthcare analytics through a conversational interface.
Clone this repository:
git clone [repository-url]
cd teleme-analytics-sveltekit
Install dependencies:
pnpm install
Create a .env file by copying the example:
cp env.example .env
Update the environment variables in the .env file with your specific configuration.
Start the development server:
pnpm dev
Open your browser and navigate to http://localhost:9999
Key environment variables:
VITE_N8N_BASE_URL: Base URL for the N8N workflow automation serviceVITE_N8N_API_KEY: API key for N8N service authenticationVITE_N8N_ANALYTICS_WEBHOOK_URL: Webhook URL for analytics operationsVITE_ANALYTICS_JWT_SECRET: Secret key for JWT token verificationVITE_ANALYTICS_CHATBOT_TIMEOUT: Inactivity timeout in minutesThe application uses JWT tokens for authentication. You can provide the token in two ways:
?auth_token=your_jwt_tokenThe token should contain the following claims:
centre_id: ID of the healthcare centercentre_name: Name of the healthcare centeris_ngo: Boolean flag indicating if it's an NGOpnpm build
This generates a production build in the .svelte-kit/output directory.
The application can be deployed using the SvelteKit adapter of your choice. By default, it uses @sveltejs/adapter-auto which selects the appropriate adapter based on your deployment target.