- The project description can be found here
- Golang
- GraphQL
- Database schema management (AtlasGo)
- Hasura
- gRPC
- Message Queue (RabbitMQ)
- Auths Service (Authentication)
- Hasura API Gateway (Supergraph, Authorization)
- Hasura Cache
- Contracts Service
- Users Service
- Withdraw Requests Service
- Mails Service
- gRPC API Gateway
- Proto Server (Stores protocol buffer and its generated files)
NOTE: This guide assumes that you already have AtlasGo, Golang, and Protobuf installed. It may not be easy, but you will have a fun time with it. If some services have their ports running in the background and you don't know how to turn them off, run "net stop hns && net start hns."
1.1: Go to each service folder and run the following commands: - `make up` (for docker-compose) - `make migratedb` (for the database)
1.2: Configure the .env file in each service. You can use mine as a reference. The .yaml files also use .env as environment variables, so you don't need to configure the .yaml file.
1.3: You need to create 6 command terminals and run 6 Makefile commands. It was configured to work perfectly on Windows, so it's best not to make changes.
1.4: The link to each service will appear in the terminals. Click on it to open the GraphQL playground. The Email service interface will run on port 8025.
2.1: Create a project and go to the Hasura Cloud environment.
2.2: Enable HASURA_GRAPHQL_ENABLE_REMOTE_SCHEMA_PERMISSIONS.
2.3: Enable and fill in HASURA_GRAPHQL_JWT_SECRET as follows:
{
"key": "the secret key here must match the secret key in the project",
"type": "HS256"
}2.4: Make your service available online on a website. Here, I will use ngrok. You will need at least 2 ngrok accounts (free) and divide your services the way you like in ngrok1.yml and ngrok2.yml.
2.5: Add these services to the remote schema. Fill in all prefixes and suffixes of each service with different names. For example, if you add your users service, configure "GraphQL Customizations" like this:
- You cannot use Apollo because Apollo doesn't have this feature, so you will need to modify your node interface names (node and nodes).
2.6: Configure the authorization and relationships, and modify your code to match the Hasura config (quite challenging).
- Note that if you use ngrok (or other free services) like me, each time you want to configure your authorization, you need to start from scratch because the URL will change, and Hasura breaks when the URL changes. Somehow, you cannot change the URL. This step takes about 1 to 1.5 hours to complete.
2.7: Test it!!!
3.1: Go to the proto server folder and run the following commands: make git
- Enter message commit and version (version should be 1.x.x)
3.2: Go to main project folder and run the following commands: make proto
- Enter the version(tag) you push in step 3.1.
3.3: Wait for a second, all packages that used proto server will be updated.














