Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/manuelgeek/promocodes-generator
- Owner: manuelgeek
- Created: 2021-06-01T11:32:47.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-06-02T07:27:10.000Z (over 3 years ago)
- Last Synced: 2024-04-24T02:42:38.642Z (7 months ago)
- Language: PHP
- Size: 107 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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).