A simple backend service for a Wedding RSVP and Registry. It is implemented with an http-api-gw, grpc-middleware, scylla-db, and an nginx proxy.
The HTTP API server utilizes the poem-api crate
, thus, it creates its own swagger docs.
The endpoint is hosted on localhost/api/v1
and the swagger page is hosted on localhost/api/v1/doc
The grpc middleware is the bridge between frontend HTTP and backend DB. It is a gRPC server and is flexible
enough to be written in any language using the objects.proto
and methods.proto
.
This is the library crate which defines the objects/methods that are passed between services. This includes goals, guests, and images.
Scylla stores the data locally in the ./db
folder. To restart local data, docker compose kill && docker compose down
then delete the ./db
folder.
It's also possible to manipulate the data from within the container. docker exec -it scylla cqlsh
Some sample commands include:
select * from wedding.image;
select * from wedding.guest;
truncate wedding.guest
Deletes all guest elements from the db
cd wedding-planner
docker compose up -d
docker compose kill && docker compose down --remove-orphans
setup.sh
is used by the maintainer to compile/build and push docker images to dockerhub
-
Optimized Docker images
-
API responses inspired through poem/examples:
database.rs
- Complete refactor
- Flexibility
- Currently CRUD queries/operations are hard coded
- Authentication
- Can start with something simple like basic authentication
- Automation scripts
- Additional HTTP codes
- Error handling is loosely done
- github workflows
- testing
- HTTP-API/gRPC-DB
- Improve Logs
- Production use case
- DB
- Connect to managed service (possibly use cql_proxy)
- NGINX
- Set up self signed certs
- DB