https://github.com/alesbe/swapi-quiz
An interactive Star Wars data browser built with Angular and Spring Boot β¨
https://github.com/alesbe/swapi-quiz
angular spring-boot starwars swapi typescript
Last synced: 6 months ago
JSON representation
An interactive Star Wars data browser built with Angular and Spring Boot β¨
- Host: GitHub
- URL: https://github.com/alesbe/swapi-quiz
- Owner: alesbe
- Created: 2025-06-18T10:49:43.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-06-18T10:54:09.000Z (7 months ago)
- Last Synced: 2025-06-18T11:47:41.599Z (7 months ago)
- Topics: angular, spring-boot, starwars, swapi, typescript
- Language: Java
- Homepage:
- Size: 0 Bytes
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# π SWAPI Quiz
An interactive **Star Wars** data browser built with Angular and Spring Boot, styled with a custom dark theme inspired by the galaxy itself. Explore characters and planets from the Star Wars universe through a responsive, paginated, and filterable UI β all deployed with Docker.
> β‘ Built for learning, performance, and clean architecture!
## 
## π Features
- π§± **Hexagonal architecture** in the backend (Spring Boot)
- π **Reactive search with debounce** for smooth filtering
- π **Dynamic pagination and sorting** for people and planets
- π¨ **Themed Star Wars UI** with glowing buttons and Orbitron font
- π **Back button** behavior mimicking navigation history
- π **CORS handled via NGINX proxy** for clean frontend-backend communication
- π¦ Fully containerized with **Docker Compose**
---
## π οΈ Technologies Used
### Frontend
- β‘ Angular 17
- π
SCSS (custom themed styles)
- π§ͺ Jasmine + Karma for unit testing
- π NGINX for static file serving and API proxy
### Backend
- β Spring Boot 3 (JDK 21)
- π§ͺ JUnit 5 + Mockito for unit testing
- π§± Hexagonal (Ports & Adapters) architecture
- π CORS Configuration via `WebMvcConfigurer`
### DevOps
- π³ Docker & Docker Compose
- π Maven
---
## π§© Architecture Highlights
- β
Clean separation between domain, application, and infrastructure
- β
DTO mapping for REST controllers
- β
Pagination, sorting and searching integrated with Spring Data
- β
Environment-based `apiUrl` for frontend flexibility
- β
Angular standalone components + reactive forms
- β Had to **bypass SSL verification** for SWAPI requests in the backend because their certificate expired in April 2025
---
## π¦ Installation with Docker Compose
1. **Clone the repo**:
```bash
git clone https://github.com/alesbe/swapi-quiz.git
cd swapi-quiz
```
2. **Run the app**:
```bash
docker compose up --build
```
3. **Access**:
- Frontend: http://localhost:6969
- Backend API (optional direct access): http://localhost:8080/api
## π§ Things I'd Improve If I Started Over
- π§© Create a reusable generic table component in Angular to avoid duplication across views
- πͺ Avoid embedding full planet objects inside people β it would be better to store only the `homeworldName` for better performance and simpler DTOs. However, I chose to embed them here to showcase my skills in entity mapping and nested object handling.
- π§Ό Add loading skeletons and custom error pages
- π Add internationalization (i18n) support
- π Add basic authentication
## π¨βπ» Author
**Γlvaro Esparza Bellver**
GitHub: [@alesbe](https://github.com/alesbe)
## β If you like it...
Give the repo a β and feel free to fork it or reach out with improvements!
> May the code be with you π»β¨