This is a simple real-time chat application built with SvelteKit, Couchbase, and WebSockets. The application allows users to send and receive messages in real-time.
Clone the Repository
git clone https://github.com/hummusonrails/real-time-chat-svelte-couchbase.git
cd real-time-chat-svelte-couchbase
Install Dependencies
npm install
npm install express ws couchbase dotenv
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p
Set Environment Variables
Copy the .env.example
file in the root of the project to .env
and set the required environment variables.
COUCHBASE_BUCKET=your_bucket_name
COUCHBASE_CONNECTION_STRING=your_connection_string
COUCHBASE_USER=your_username
COUCHBASE_PASSWORD=your_password
node server.cjs
npm run dev -- --open
Open your browser and navigate to http://localhost:5173. Open multiple tabs or windows to simulate multiple users. Send messages and verify they appear in all open instances in real-time.
This project is licensed under the MIT License. See the LICENSE file for details.