Fully reactive online travel agency made with Spring Boot 2 (w/ WebFlux), Angular, GraphQL, CouchBase, Maven, CircleCI, and Docker.
The goal is to learn as much as possible about new tech while creating a small but hopefully helpful travel agency fully made in reactive programming.
https://mvnrepository.com/artifact/com.dakar/dakar
https://hub.docker.com/repository/docker/dakarinternational/dakar
https://github.com/DaKarInternational/DaKar/releases/tag/3.0.0
-
build jar
mvnw clean install -DskipTests
-
build docker
./mvnw dockerfile:build
-
launch test db
docker-compose up -d couchtest
-
make sure that the db is correctly started
docker-compose logs couchtest
-
launch the app within your IDE
mvnw spring-boot:run -Dspring.profiles.active=local
If you have some network issues with Docker, you may consider having a look at your hosts file
add couch-dakar in your /etc/hosts
Functional controller
http://localhost:8080/test5/
Functional controller :
http://localhost:8080/test1/afghanistan
Functional controller -> hateoas w/ assembler:
http://localhost:8080/test2/afghanistan
Functional controller -> hatoas w/ generics:
http://localhost:8080/test3/afghanistan
Functional controller -> GraphQL:
http://localhost:8080/graphql
Functional controller -> i18n:
http://dakar.lambla.eu:8080/welcome/fr/message
http://localhost:8080/welcome/fr/message
Couchbase:
http://localhost:8091/
- Swagger with spring webflux
- GraphQL subscriptions with spring webflux
sudo systemctl start docker
sudo usermod -a -G docker $USER
sudo reboot
docker pull dreaserdocker/dakar
docker-compose pull
docker login
docker images
docker build -f Dockerfile.testdb . -t testdb
docker-compose up -d couch // to launch only the db
docker-compose up
create cluster
create bucket named 'test'
create index
CREATE PRIMARY INDEX ON `test`
create user 'test' with password = 'password'
docker-compose up -d couchtest
docker-compose stop couchtest
docker exec -ti couch-test /bin/bash
tail -f /opt/couchbase/var/lib/couchbase/logs/http_access_internal.log
docker-compose -f docker-compose-prod.yml exec couch bash
docker image prune
docker volume prune
docker-compose -f docker-compose-prod.yml rm -v
./mvnw javadoc:javadoc
./mvnw clean package source:jar javadoc:jar deploy
./mvnw dockerfile:build dockerfile:push
docker-compose ps
docker ps --all
docker rm $(docker ps -a -q)
docker rmi $(docker images -q)
// all jouneys
query {
allJourney{
destination
}
}
// search Journeys
{
searchJourney(criteria: {destination: {contains: "afghanistan"}}) {
id
destination
}
}
// create Journey
mutation {
createJourney(input: {price: "test", destination: "afghanistan"}) {
price
destination
}
}