https://github.com/huythanh0x/udemy_coupon_server_java_spring
100% off Udemy coupons. Access paid courses for free at my site
https://github.com/huythanh0x/udemy_coupon_server_java_spring
free java spring udemy
Last synced: 2 months ago
JSON representation
100% off Udemy coupons. Access paid courses for free at my site
- Host: GitHub
- URL: https://github.com/huythanh0x/udemy_coupon_server_java_spring
- Owner: Huythanh0x
- License: mit
- Created: 2024-07-12T06:21:46.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2026-04-11T05:33:52.000Z (2 months ago)
- Last Synced: 2026-04-11T07:21:41.115Z (2 months ago)
- Topics: free, java, spring, udemy
- Language: Java
- Homepage: https://coupons.thanh0x.com
- Size: 448 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Spring Boot: 100% Off Udemy Coupon Server



The Spring Boot Coupon Server is a robust application designed to crawl 100% off coupons from various websites and validate them using the official Udemy API. It provides several API endpoints for fetching, searching, and filtering these free coupons, with built-in authentication and authorization.
## Features
- **Coupon Crawling**: Automatically fetch coupons from multiple sources.
- **Coupon Validation**: Validate coupons using the Udemy API then filter 100% off coupon only
- **Search Functionality**: Search for coupons by query.
- **Filter Functionality**: Filter coupons based on various criteria.
- **Authentication & Authorization**: Secure access to API endpoints.
## Architecture
- `modules/coupon-domain`: entities, repositories, shared DTOs, Flyway migrations.
- `modules/coupon-api-service`: REST APIs, security/auth, Swagger UI (port 8080).
- `modules/coupon-crawler-service`: crawler workers + schedulers (port 8081).
## Prerequisites
- [Java 17](https://jdk.java.net/17/) or higher (JDK)
- with [Docker](https://www.docker.com/) (for MySQL container)
- or [Docker Compose](https://docs.docker.com/compose/)
## Getting Started
### Clone the Repository
```shell
git clone https://github.com/huythanh0x/udemy_coupon_server_java_spring
cd udemy_coupon_server_java_spring
```
### Start the Services
1. Full stack via Docker Compose (published images - CI parity) - recommended:
```shell
docker compose -f docker-compose.prod.yml up
```
This pulls the API/crawler images built by GitHub Actions (and starts MySQL/Redis plus the observability stack).
2. Local development (run services from source, MySQL via local compose):
```shell
docker compose -f docker-compose.local.yml up -d
./gradlew :modules:coupon-api-service:bootRun --args='--spring.profiles.active=local'
# optional crawler worker
./gradlew :modules:coupon-crawler-service:bootRun --args='--spring.profiles.active=local'
```
## Database migrations
- Schema changes and seed data are managed by [Flyway](https://flywaydb.org/).
- Migration scripts live under `modules/coupon-domain/src/main/resources/db/migration` (e.g., `V1__init_schema.sql`).
- When the Spring Boot app starts it automatically runs pending migrations; no manual SQL is required.
- For local verification you can run `./gradlew :modules:coupon-api-service:flywayMigrate` (or the crawler equivalent) once MySQL is up.
## API Documentation
Once the server is running, navigate to [Swagger UI](http://localhost:8080/swagger-ui/index.html) for interactive docs or fetch the OpenAPI JSON at `/v3/api-docs`. See `docs/getting-started.md` for setup instructions and `docs/business-logic.md` for flow details.
You can also view the live Swagger API documentation at [swagger-ui/index.html](https://coupons-api.thanh0x.com/swagger-ui/index.html).
## Contributing
We welcome contributions! Please see our [Contributing Guidelines](CONTRIBUTING.md) for more details.
## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE.md) file for details.
## Contact
For any inquiries or issues, please open an issue on GitHub or contact us at huythanh0x@gmail.com
