ASP.NET Core Messenger: PWA Asp.Net core & Angular messenger that features Groups, dialogs, end-to-end encrypted chats. Uses mobile phone login system (firebase is used as SMS provider) and tokens based authorization. Running at https://denisavko.me, UI Api: https://denisavko.me/swagger/ui/index.html
Messaging | User profiles |
---|---|
Side drawer | Group profiles |
Search | Start view |
Back-end overview:
- Authorization & login system.
- Messaging.
- End-to-end encrypted chats.
- Database.
- Storage.
- Publishing.
Front-end:
- Tech stack.
- Login system & registration: to register or log in, user must have a valid phone number. If user logs in for the first time, he'll be asked to change his auto-generated username.
- Sms provider: For free SMS ( 10k/mo ) firebase was used. See link to get started.
- Tokens: After user logs in, he'll be granted a JWT refresh token - token with long expiration date, which, in turn, needed to get short-term tokens.
For messaging and push-events SignalR was used.
Standard Diffie-Hellman scheme was used. Public keys are 2048 bits length and pre-generated on server. On secure chat creation, client which creates secure chat sends a request to server whereupon server fires push event on this client with created secure chat. Now the client needs to initiate key exchange. Key exchange could be initiated in 2 ways: immediately(if user in dialog is online), or via subsription system: when second client comes online, key exchange will be initiated.
For storage, Kestrel with PhysicalFileProvider
was used.
EF Core with PostgreSQL provider was used.
docker build -t vibechat.fileserver .
docker save -o <Output path> vibechat.fileserver
- On linux VM:
docker load --input <filename>; docker run -p 5000:5000 -e ASPNETCORE_URLS=http://*:5000 vibechat.fileserver --mount source=fileserver_volume,target=/app vibechat.fileserver
.
docker-compose build
- Save database image and back-end image, and load them onto your VM, as shown above.
docker-compose up
- Install nginx, copy config file, run nginx.
Framework and UI: Angular 8: internationalization (i18n), UI components(Angular material).