Adengine is a lightweight Go microservice for delivering targeted ad campaigns based on flexible inclusion/exclusion rules. It is designed for easy integration and extensibility.
- Match campaigns using app, country, and OS targeting
- Support for both inclusion and exclusion rules
- Returns all active campaigns matching a request
- Simple RESTful API, easy to test with Postman or curl
- Clear error handling for missing parameters and no matches
- Go 1.18 or higher
- (Optional) Docker for containerized deployment
-
Clone the repository:
git clone https://github.com/yourusername/adengine.git cd adengine -
Install dependencies:
go mod tidy -
Run the service:
go run . -
The service will be available at
http://localhost:8080.
Test the API using Postman or curl:
curl "http://localhost:8080/v1/delivery?app=com.abc.xyz&country=germany&os=android"
text
| File | Purpose |
|---|---|
| main.go | Entry point, HTTP server setup |
| models.go | Data models for campaigns/rules |
| data.go | Dummy campaigns and rules |
| handlers.go | HTTP handlers and logic |
- To load campaigns/rules dynamically, replace
data.gowith a database or JSON file loader. - Add authentication, logging, or metrics as needed.
Pull requests and issues are welcome!
MIT License
- Laksh Gupta (lakshgupta253@gmail.com)