YardBot is a telegram bot and part of YardRaffles project. This is an API backend solution - a core of the YardRaffles project.
Rare clothing items, particularly sneakers, are frequently sold in limited quantities, making their purchase challenging. To address this, major brands and their retailers conduct raffles granting the "right to purchase" these exclusive fashion pieces, simultaneously boosting their social media following.
This project focuses on such raffles. Its primary objective is to facilitate genuine enthusiasts, rather than resellers, in acquiring these items through luck, without the intent of profit-making.
controllers
- calling services and handling errorsmiddleware
- auth middleware for protected routesmigrations
- data structure migrations used to initialize the dbmodels
- data models declared withSequelize
routes
- api endpointsservices
- performing data querying and mutation usingSequelize
validation
- validating request data withexpress-validator
DB dump can be found here
npm install
npx sequelize-cli db:migrate
or import database.sql
straight
Example:
DB_HOST="127.0.0.1"
DB_USER="root"
DB_PASSWORD=""
DB_NAME="yardraffles"
PORT=3000
AUTH_SECRET="123"
yarn dev