A modern fullstack bookmark management application built with Spring Boot, React, TanStack Router, PostgreSQL, Docker, GitHub Actions, and Kubernetes.
- Spring Boot 3.2.0 - Java framework
- PostgreSQL - Database
- Spring Data JPA - Data persistence
- Maven - Build tool
- React 18 - UI library
- TanStack Router - Routing
- Vite - Build tool
- TypeScript - Type safety
- Docker - Containerization
- Docker Compose - Local development
- Kubernetes - Orchestration
- GitHub Actions - CI/CD
spring-blog/
├── backend/ # Spring Boot application
├── frontend/ # React + Vite application
├── k8s/ # Kubernetes manifests
├── docker-compose.yml
└── README.md
- Java 17+
- Node.js 20+
- Docker & Docker Compose
- Maven 3.6+
-
Start PostgreSQL and services with Docker Compose:
docker-compose up -d
-
Or run services individually:
Backend:
cd backend mvn spring-boot:runFrontend:
cd frontend npm install npm run dev -
Access the application:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8080/api/bookmarks
Build and run all services:
docker-compose up --build-
Apply ConfigMap:
kubectl apply -f k8s/configmap.yaml
-
Apply secrets:
kubectl apply -f k8s/postgres-secret.yaml
-
Deploy PostgreSQL:
kubectl apply -f k8s/postgres-deployment.yaml
-
Deploy Backend:
kubectl apply -f k8s/backend-deployment.yaml
-
Deploy Frontend:
kubectl apply -f k8s/frontend-deployment.yaml
-
Deploy Ingress (optional):
kubectl apply -f k8s/ingress.yaml
Note: Make sure to build and push Docker images to your container registry before deploying to Kubernetes, or use a local registry.
GET /api/bookmarks- Get all bookmarksGET /api/bookmarks/{id}- Get bookmark by IDPOST /api/bookmarks- Create a new bookmarkPUT /api/bookmarks/{id}- Update a bookmarkDELETE /api/bookmarks/{id}- Delete a bookmarkGET /api/bookmarks/search?q={query}- Search bookmarks
The backend includes Swagger/OpenAPI documentation:
- Swagger UI: http://localhost:8080/swagger-ui.html
- OpenAPI JSON: http://localhost:8080/v3/api-docs
- OpenAPI YAML: http://localhost:8080/v3/api-docs.yaml
To generate TypeScript types from the OpenAPI specification:
- Make sure the backend is running
- Run the type generation command:
cd frontend npm run generate:types
This will fetch the OpenAPI spec from the backend and generate TypeScript types in the shared/api-types.ts file.
You can also specify a custom backend URL:
BACKEND_URL=http://your-backend-url:8080 npm run generate:typesNote: The shared folder is set up as a package (@bookmark/shared) and is linked as a dependency in the frontend. After generating types, you may need to reinstall dependencies:
npm install- ✅ Create, read, update, and delete bookmarks
- ✅ Search bookmarks by title
- ✅ Responsive UI
- ✅ Docker containerization
- ✅ Kubernetes deployment ready
- ✅ CI/CD with GitHub Actions
- ✅ Swagger/OpenAPI documentation
- ✅ TypeScript type generation from OpenAPI spec
- ✅ DTOs for request/response separation
cd backend
mvn clean install
mvn spring-boot:runcd frontend
npm install # This will also link the @bookmark/shared package
npm run devcd backend
mvn clean packagecd frontend
npm run buildMIT