Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Adengine Microservice

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.


Features

  • 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

Getting Started

Prerequisites

  • Go 1.18 or higher
  • (Optional) Docker for containerized deployment

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/adengine.git
    cd adengine
    
  2. Install dependencies:

    go mod tidy
    
  3. Run the service:

    go run .
    
  4. The service will be available at http://localhost:8080.


Usage

Test the API using Postman or curl:

curl "http://localhost:8080/v1/delivery?app=com.abc.xyz&country=germany&os=android"

text


Project Structure

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

Extending the Service

  • To load campaigns/rules dynamically, replace data.go with a database or JSON file loader.
  • Add authentication, logging, or metrics as needed.

Contributing

Pull requests and issues are welcome!


License

MIT License


Authors

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages