This is part 1 of the realtime chat application built with Go, Next, and Typescript. In the following part, we will set up the websocket endpoint and test our connection.
In this part, we will:
1. Pull the postgres image from the Docker hub and create the go-chat database
2. Set up our database to connect to the postgres on the specified port, and add a db migration file with golang-migrate
3. Start building the architecture with the handler, service, and repository layers to create the /signup, /login, and /logout endpoints
@TECHSCHOOLGURU does an awesome job explaining at how you can use the refresh token to manage user session here: [ Ссылка ]
Github repo: [ Ссылка ]
sql library: [ Ссылка ]
lib/pq: [ Ссылка ]
golang-migrate: [ Ссылка ]
golang-jwt: [ Ссылка ]
bcrypt: [ Ссылка ]
gin: [ Ссылка ]
![](https://s2.save4k.ru/pic/W9SuX9c40s8/maxresdefault.jpg)