IamNanjo / encrypted-chat-app

End-to-end encrypted realtime chat app made using Nuxt 3, Websockets and the Web Crypto API

Home Page:https://chat.nanjo.tech

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Encrypted Chat App

This chat app uses end-to-end-encryption with RSA-OAEP. The encryption is done on the client using the Web Crypto API. The encrypted messages and public keys are saved on the server and they are then sent to users.

New chats and messages are sent to clients using Websockets. This means that only the new messages need to be decrypted and there will be no need to constantly poll the server for updates. This makes the chat app far more performant efficient.

New messages are fetched using polling. In a future update the app will use Websockets instead of polling for faster updates and less unnecessary requests. This will also allow only decrypting new messages instead of the whole list every time, making the app far more efficient.

Screenshots

Login page

User profile

User search

Chat with messages

Setup

Make sure to install the dependencies:

# npm
npm install

# yarn
yarn install

# bun
bun install

Database Setup

# npm
npm run dbinit
npm run dbgenerate

# yarn
yarn dbinit
yarn dbgenerate

# bun
bun dbinit
bun dbgenerate

Development Server

Start the development server on http://localhost:3000:

# npm
npm run dev

# yarn
yarn dev

# bun
bun dev

Production

Build the application for production:

# npm
npm run build

# yarn
yarn build

# bun
bun run build

Locally preview production build:

# npm
npm run preview

# yarn
yarn preview

# bun
bun preview

Serve the production build using PM2:

# npm
npm run start

# yarn
yarn start

# bun
bun start

About

End-to-end encrypted realtime chat app made using Nuxt 3, Websockets and the Web Crypto API

https://chat.nanjo.tech


Languages

Language:TypeScript 54.7%Language:Vue 44.9%Language:JavaScript 0.4%