https://github.com/mlsakiit/ktf-backend
KTF Backend
https://github.com/mlsakiit/ktf-backend
Last synced: 12 months ago
JSON representation
KTF Backend
- Host: GitHub
- URL: https://github.com/mlsakiit/ktf-backend
- Owner: MLSAKIIT
- License: mit
- Created: 2022-05-24T06:52:12.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-06-21T10:22:46.000Z (almost 4 years ago)
- Last Synced: 2025-06-27T00:46:47.835Z (12 months ago)
- Language: TypeScript
- Homepage: https://ktf-backend.herokuapp.com/ping
- Size: 190 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# KTF Backend
## /auth/google-data
Save the data we get from Google login
> POST (user only) (Firebase auth token required)
### Authentication Header:
```
Bearer
```
### Body:
```json
{
"displayName": "",
"email": "",
"photoURL": ""
}
```
---
## /auth/user-data
Save the data we get from User after Google auth
> POST (user only) (Firebase auth token required)
### Authentication Header:
```
Bearer
```
### Body:
```json
{
"college": "",
"phoneNumber": 0,
"graduationYear": 0,
"course": "",
"dob": "",
"gender": "",
"address": "",
"state": "",
"pinCode": 0
}
```
---
## /data/events
All event details.
> GET (public)
---
## /data/merch
All merch details.
> GET (public)
---
## /data/user
All the details of a user.
> GET (user only) (Firebase auth token required) (Bearer token)
---
## /data/cart
Cart items of a user.
> GET (user only) (Firebase auth token required) (Bearer token)
---
## /data/my-orders
Purchase history of a user.
> GET (user only) (Firebase auth token required) (Bearer token)
---
## /cart/add
Add an item to cart.
> POST (user only) (Firebase auth token required)
### Authentication Header:
```
Bearer
```
### Body:
```json
{
"eventID": 0
}
```
```json
{
"merchID": 0,
"quantity": 0,
"merchSize": ""
}
```
### `quantity and merchSize is optional.`
---
## /cart/save-local-storage ??
As Soon as the user login to the Google it will save the cart items of the local storage to the database with others.
> POST (user only) (Firebase auth token required)
---
## /cart/update
Update the quantity and size of an item in cart.
> POST (user only) (Firebase auth token required)
### Authentication Header:
```
Bearer
```
### Body:
```json
{
"merchID": 0,
"quantity": 0,
"merchSize": ""
}
```
---
## /cart/remove/:id
Remove an item from cart.
> DELETE (user only) (Firebase auth token required)
### Authentication Header:
```
Bearer
```
### `:id will contain the eventID or merchID.`
---
## /cart/add-coupon
Add coupon to cart.
> POST (user only) (Firebase auth token required)
### Authentication Header:
```
Bearer
```
### Body
```json
{
"coupon": ""
}
```
---
## /cart/remove-coupon
Add coupon to cart.
> GET (user only) (Firebase auth token required)
### Authentication Header:
```
Bearer
```
---
## /payment/order
Create an order.
> GET (user only) (Firebase auth token required)
### Authentication Header:
```
Bearer
```
### Return value
```json
{
"orderID": "",
"amount": 0,
"currency": ""
}
```
---
## /payment/verify
Verify and save the payment details.
> POST (user only) (Firebase auth token required)
### Authentication Header:
```
Bearer
```
### Body:
```json
{
"orderID": "",
"razorpayPaymentID": "",
"razorpaySignature": ""
}
```
---
## /admin/add-coupons
Add new coupons.
> POST (admin only) (Firebase auth token required)
### Authentication Header:
```
Bearer
```
### Body:
```json
{
"code": "",
"discount": 0,
"type": "",
"description": ""
}
```
---
## /admin/check
Check if the user is registered in the event
> POST (admin only) (Firebase auth token required)
### Authentication Header:
```
Bearer
```
### Body:
```json
{
"uid": "",
"eventID": ""
}
```
---
## /admin/check-in
Check if the user is checked in the event
> POST (admin only) (Firebase auth token required)
### Authentication Header:
```
Bearer
```
### Body:
```json
{
"uid": "",
"eventID": 0
}
```
---