A full-stack flight search application with:
- Golang backend (API, flight logic, WebSocket subscriptions)
- Vue.js frontend (Vuetify UI, filters, real-time updates)
- Redis cache (for flight data)
- Docker for full local environment
- Docker
- Docker Compose
- (Optional)
make
, if running the backend manually
To start the whole project (backend + frontend + Redis):
git clone https://github.com/rubengp99/golang-flights-challenge.git
cd golang-flights-challenge
docker-compose up --build
To start the whole project (backend + frontend + Redis):
git clone https://github.com/rubengp99/golang-flights-challenge.git
cd golang-flights-challenge
docker compose up --build
.
├── backend.golang/ # Go source code and Makefile
├── frontend.vuejs/ # Vue.js + Vuetify frontend app
├── docker-compose.yml
└── README.md
| Service | URL |
| ----------- | ---------------------------------------------- |
| Frontend | [http://localhost:8080](http://localhost:8080) |
| Backend API | [http://localhost:8081](http://localhost:8081) |
| Redis | Internal (localhost:6379) |
cd backend.golang
make run
Ensure Go 1.23+ is installed. The server will start on http://localhost:8081. Starts on http://localhost:8080. Make sure your .env points to the backend:
cd frontend.vuejs
npm install
npm run serve
Starts on http://localhost:8080. Make sure your .env file contains:
VUE_APP_BACKEND_URL=localhost:8081
The frontend opens a WebSocket connection to receive flight updates in real time:
new WebSocket("ws://localhost:8081/subscribe?origin=JFK&destination=LAX&date=2025-05-10&adults=1")
Mock server and Infisical secrets support are included.
cd backend.golang
go test ./...
Used by the backend to cache flight responses.
Automatically runs via docker-compose
Host: redis
Port: 6379
Go client: go-redis/v9
Example usage:
val, err := rdb.Get(ctx, "flight:LAX-JFK").Bytes()
if err == redis.Nil {
// cache miss
}
GET /flights/search
Search flights with:
| Query Param | Description |
| ------------- | -------------------- |
| `origin` | Airport code |
| `destination` | Airport code |
| `date` | Date in `YYYY-MM-DD` |
| `adults` | Number of passengers |
| Name | Description |
| ---------------------- | ----------------------------- |
| `VUE_APP_BACKEND_URL` | Vue frontend → backend URL |
| `REDIS_URL` | Mandatory external API source |
| `PROJECT_ID` | Mandatory secrets manager id |
| `INFISICAL_TOKEN` | Mandatory secrets manager key |