Skip to content

This is a basic social network demo by Golang with some features: Login, post new posts, like, comment on post, chat with friend and view newsfeed

Notifications You must be signed in to change notification settings

NamNV2496/go-social-network

Repository files navigation

This is a basic social network demo by Golang.

1. Technologies

1. grpc - "google.golang.org/grpc"
2. goqu - "github.com/doug-martin/goqu/v9"
3. kafka - "github.com/IBM/sarama"
4. redis - "github.com/go-redis/redis/v8"
5. websocket - "github.com/gorilla/websocket"

2. How to start

Docker

1. run `docker compose up`
2. Check status of services

Local

1. go to "cd deployments" and run "docker-compose up"
2. run http-gateway "cd http_gateway/" and "go run cmd/main.go"
3. run user-service "cd user-service/" and "go run cmd/main.go"
4. run post-service "cd post-service/" and "go run cmd/main.go"
5. run newsfeed-service "cd newsfeed-service/" and "go run cmd/main.go"
6. run message-service "cd message-service/" and "go run cmd/main.go"
7. run FE "cd web/" and "start index.html"

flow

User

namnv - namnv
knm - knm
baobq - baobq

alt text

Follower

alt text

3. Data migration

user-service\internal\database\migrations\mysql

4. Demo

Newsfeed

alt text

View comment

alt text

View followers post

if namnv posted a post. knm and baobq will see it in their newsfeed.

alt text

if knm posted a post. Only namnv will see it in his newsfeed baobq will not. Because only namnv follow knm if baobq posted a post. Only namnv will see it in his newsfeed knm will not. Because only namnv follow baobq

alt text

Here is redis alt text

popup in newsfeed

Create new chat room private with friend from newsfeed. Only 2 member of chat can see and join the chat

alt text

Your wall

alt text

alt text

Search another people

alt text

alt text

About

This is a basic social network demo by Golang with some features: Login, post new posts, like, comment on post, chat with friend and view newsfeed

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published