DrishtiVerse is an AI-enabled game backend built using Go, Dapr, and YugabyteDB. The project is inspired by Indian mythology, where "Drishti" means vision or insight. DrishtiVerse creates a magical, AI-driven universe powered by modern technologies.
- Go 1.23: The primary language used for building microservices.
- Dapr 1.14: A portable, event-driven runtime to build distributed applications across cloud and edge.
- YugabyteDB 2.21.1.0: A distributed SQL database designed for cloud-native applications.
DrishtiVerse/
│
├── api-gateway/
│ ├── main.go
│ ├── go.mod
│ ├── go.sum
│ ├── components/
│ │ ├── statestore.yaml
│ │ └── pubsub.yaml
│ └── Dockerfile
│
├── gptclient-service/
│ ├── main.go
│ ├── go.mod
│ ├── go.sum
│ ├── components/
│ │ ├── statestore.yaml
│ │ └── pubsub.yaml
│ └── Dockerfile
│
├── shortstories-service/
│ ├── main.go
│ ├── go.mod
│ ├── go.sum
│ ├── components/
│ │ ├── statestore.yaml
│ │ └── pubsub.yaml
│ └── Dockerfile
│
├── quiz-service/
│ ├── main.go
│ ├── go.mod
│ ├── go.sum
│ ├── components/
│ │ ├── statestore.yaml
│ │ └── pubsub.yaml
│ └── Dockerfile
│
├── common/
│ ├── config/
│ │ └── config.go
│ ├── database/
│ │ ├── yugabyte.go
│ │ └── migration.sql
│ └── utils/
│ └── utils.go
│
├── Makefile
├── docker-compose.yaml
└── README.md
- Location:
api-gateway/ - Port: 8080
- Description: The entry point for all client requests, routes requests to the respective microservices.
- Location:
gptclient-service/ - Port: 8081
- Description: Handles communication with the GPT-3.5 API to generate content.
- Location:
shortstories-service/ - Port: 8082
- Description: Manages short stories, including fetching them from the database or generating new ones if not found.
- Location:
quiz-service/ - Port: 8083
- Description: Manages quiz questions and answers, fetches from the database or requests new content from GPTClient service if necessary.
- Go 1.23
- Docker
- Dapr CLI
- YugabyteDB
git clone <repository-url> DrishtiVerse
cd DrishtiVerseEnsure that the Dapr CLI is installed and initialized.
dapr initStart a local YugabyteDB instance using Docker:
docker run -d --name yugabytedb -p 5433:5433 yugabytedb/yugabyte:2.21.1.0-b20 bin/yugabyted start --daemon=false-
API Gateway
cd api-gateway dapr run --app-id api-gateway --app-port 8080 --dapr-http-port 3500 go run main.go -
GPTClient Service
cd ../gptclient-service dapr run --app-id gptclient-service --app-port 8081 --dapr-http-port 3501 go run main.go -
ShortStories Service
cd ../shortstories-service dapr run --app-id shortstories-service --app-port 8082 --dapr-http-port 3502 go run main.go -
Quiz Service
cd ../quiz-service dapr run --app-id quiz-service --app-port 8083 --dapr-http-port 3503 go run main.go
You can also use Docker Compose to bring up all services together:
docker-compose upTo stop the services:
docker-compose downPlease feel free to contribute to this project by submitting pull requests, suggesting features, or reporting bugs.
For any inquiries or support, please reach out to the maintainers.