This is a clone of Twitter with a minimal set of features built using GO and distributed storage using RAFT.
Technical specifications:
-
A Web Server to serve user requests using HTTP APIs. No state is stored in this service.
-
3 backend services (namely authentication service, users service, tweets service) which talk to Web Server through GRPC in order to fulfill users requests.
-
The backend services persist all data onto RAFT backed storage using etcd.
- Create an account using Username, Name, and Password
- Login with Username and Password
- Follow and Unfollow other users
- Post Tweets
- View own Tweets
- View TImeline with Tweets from people you follow
- Multiple users login using sessions
The steps need to be followed in order.
Firstly, Install Go
Then, install Goreman
go install github.com/mattn/goreman@latest
Then start from root of project and ensure go dependencies are satisfied
cd ./web
go mod download
Start from root of project
cd ./raft/src/go.etcd.io/etcd/contrib/raftexample
go build -o raftexample
goreman start
Start from root of project.
cd ./web/users
go test
cd ./web/tweets
go test
cd ./web/authentication
go test
Start from root of project.
go run ./web/web.go
Start from root of project.
go run ./web/server.go
The application should be available at https://ide8000.anubis-lms.io/ or http://localhost:8080/ if running locally.