Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/manuelgeek/promocodes-generator

A simple promo codes generator API
https://github.com/manuelgeek/promocodes-generator

Last synced: about 5 hours ago
JSON representation

A simple promo codes generator API

Awesome Lists containing this project

README

        

## PromoCode Generator API

> A sample project to generate promo codes and determine validity

## Set up

`composer install`

`php artisan key:generate`

`cp .env.example .env`

Add database configs to `.env`

`php artisan migarate`

Seed to generate event and codes

`php artisan db:seed`

start server

`php artisan serve`

or serve with valet

`valet link`

Run Tests

`php artisan test`

## APIs Postman Collection
https://documenter.getpostman.com/view/3385291/TzY1iGcZ

### Available endpoints
- Create Promotion with related number of promo codes
- Update Promotion - radius, expiry date, event ifo, promo amount etc
- Update Promotion status, updated all promo code statuses too
- Update promo code status
- Check validity of promo code - within radius, status active, expiry date

## Deployment

- The code is deployed to Heroku.
- CI/CD set up for tests and for deploy to staging with GitHub Actions

### API Base URL
https://promocodes-generator.herokuapp.com

## License

The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).