- Project use microservices architecture with gRPC and GraphQL, each service is independent and connect to each other by gRPC. Also, each service working with separate database.
-
For database design, refer to dbdiagram
-
For API Reference, refer to graphql_example
-
Simple Run
docker compose up -d
ordocker compose up
if you want to see log -
GraphQL Server will run via: http://localhost:3000
-
Clean up everything created by docker-compose by use your terminal
docker-compose down
docker volume prune -y
-
GQL-Gen for GraphQL
-
Ent-Go for ORM
-
Gin for Serve Sever
-
Viper for reading config
-
Proto Complier for proto init and gRPC generate code
-
cmd
: It contains graphQL server to run a GraphQL Playground, also with Gin -
docs
: It contains all documentation for example API Reference -
graphql
: It contains all code generated bygqlgen
for GraphQL Server, also resolver,schema
and model-generated by gql -
grpc
: It contains all gRPC services, includesuser-service
,flight-service
,customer-service
,booking-service
-
helper
: It contains all helper functions. For examplecheck_input
orconfig
,... etc helper -
middleware
: It contains all middleware for the GraphQL server, serve with Gin middleware -
pb
: It contains all proto files generated byproto-complier
for gRPC services -
proto
: It contains all proto-define for gRPC services -
scripts
: It contains all scripts fordocker-compose
-
ent
: It contains all ent-generated code by ent-go-framework, also withent/schema
for database design -
handler
: It contains handler for gRPC service -
intercepter
: It contains all intercepter for gRPC service -
internal
: It contains all internal package using for gRPC service, example:auth
orconfig
-
repo
: It contains repository for gRPC service, include init database connection and CRUD function -
request
: It contains request, response for gRPC service, but in this project, only forpagination
-
config.yml
: Config file for gRPC port, db connection config, ... etc -
service.Dockerfile: Dockerfile for gRPC service
- GraphQL Server
- Database Connection
- Pagination GraphQL
- Authentication
- Unit test (0%)
- User Service
- Query User (Admin)
- Create User (Admin)
- Register Customer
- Login
- Flight Service
- Create Flight (Admin)
- Update Flight (Admin)
- Query Flight
- Customer Service
- Change Password
- Query Customer (Admin)
- Update Customer
- Booking Service
- Create Booking
- Cancel Booking
- Booking History
- View Booking
- Query Booking (Admin)
- Database design
- API Reference
- Dockerized
- Docker-compose
- Multi-stage build