Git Product home page Git Product logo

affiliate-marketing-api's Introduction

Affiliate Marketing API

Version

Description

This project aims to manage affiliate marketing links.
You can register a new shop, create a campaing to products with a personalized discount.
Influencers will navigate trough a list of products, and generate a unique link.
When this link is clicked we track some info, and redirect to the shop page.

Project Archteture

This project is composed by multilayer folder structure, inspired by DDD and Clean Archteture.

`Each domain of business has an controller, service, repository and model.`
  • The application layer on ./src/api
    This layer is responsible to mediate between the rest api and your business domain.
  • The Domain layer on ./src/domain
    This layer is reponsible to all the business rules, and interfacing with DB trough a repository pattern.
  • The Infra Layer on ./src/infra
    This layer contains configurations for the application and the database.

This structure provides some design patterns to be easily modified when needed.

Pre-Requisites

  • node >=11.8.0
  • docker
  • docker-compose

Usage

docker-compose up

This will up mongo db and the application

Routes

Shops

  • GET localhost:7003/shops
  • GET localhost:7003/shop/:id
  • PUT localhost:7003/shop/:id
  • POST localhost:7003/shop
  • DELETE localhost:7003/shops

Products

  • GET localhost:7003/products
  • GET localhost:7003/product/:id
  • PUT localhost:7003/product/:id
  • POST localhost:7003/product
  • DELETE localhost:7003/producs

Campaings

  • GET localhost:7003/campaings
  • GET localhost:7003/campaing/:id
  • PUT localhost:7003/campaings/:id
  • POST localhost:7003/campaing
  • DELETE localhost:7003/campaing

Short/Expand Urls

  • GET localhost:7003/urls
  • POST localhost:7003/url/shorten
  • GET localhost:7003/url/expand/:url

Tracking clicks

  • GET localhost:7003/url/:url

Author

Anderson [email protected]

affiliate-marketing-api's People

Contributors

0x7an avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.