Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mahela98/nestjs-auth0-gym-app-backend
GYM application backend using NestJS, Auth0 and MongoDB
https://github.com/mahela98/nestjs-auth0-gym-app-backend
auth0 mongodb nestjs
Last synced: 13 days ago
JSON representation
GYM application backend using NestJS, Auth0 and MongoDB
- Host: GitHub
- URL: https://github.com/mahela98/nestjs-auth0-gym-app-backend
- Owner: mahela98
- Created: 2021-06-09T17:45:36.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-09-14T06:32:21.000Z (over 3 years ago)
- Last Synced: 2024-11-09T07:34:42.480Z (2 months ago)
- Topics: auth0, mongodb, nestjs
- Language: TypeScript
- Homepage:
- Size: 1.25 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Backend for a Gym application using NestJs, Auth0 and MongoDB
### To start
- start mongodb
- npm run start:dev#### Important
- when updating an objectid in a document send [] to indicate empty
- date format shouldbe "date": "2021-06-18T07:03:01.078Z"## When Adding Data
### Membership Type
{"type": "Type 01",
"description":"small description",
"body":"description",
"price":"5000"}
### Member
{
"first_name": "name 1",
"middle_name": "middle",
"last_name": "name 2",
"email": "[email protected]",
"mobile": "1111111111",
"occupation": "Manager",
"birthday": "2012-02-21",
"membershiptype": "Should give a membership type ID",
"address": {
"line1": "sdf",
"line2": "sdf",
"city": "sdf"
},
"nationality": {
"passport_number": "35rdfdfsdf",
"nic_number": "35rdfdfsdf"
}
}### API endpoints
#### Member
/member/create, POST
/member/edit/:memberID, PUT
/member/delete/:memberID, DELETE
/member/:memberID, GET
/member, GET
##### Member GET Query Params
page
limit
namesearch - search members using name
nationalitySearch - search members using NIC or Passport
#### Membership Type
/membershiptype/create, POST
/membershiptype/edit/:MambershipTypeID, PUT
/membershiptype/delete/:MambershipTypeID, DELETE
/membershiptype/:MambershipTypeID, GET
/membershiptypes, GET
## Screenshots
![Untitled](https://user-images.githubusercontent.com/59562575/133206666-066e0876-936d-4634-b651-4aef8499f9e7.jpg)
-
![as](https://user-images.githubusercontent.com/59562575/133206692-72af8c4f-090e-451b-be1d-98a446cc2b00.jpg)
-
![end](https://user-images.githubusercontent.com/59562575/133206699-84118685-72ed-45b7-b5bb-4de101dec3ab.jpg)### Used URL's
- Developing a Secure API with NestJS: Managing Identity
- https://auth0.com/blog/developing-a-secure-api-with-nestjs-adding-authorization/#Enable-CORS-in-NestJS
- Developing a Secure API with NestJS: Managing Roles
- https://auth0.com/blog/developing-a-secure-api-with-nestjs-adding-role-based-access-control/