Giter Club home page Giter Club logo

thebe's Introduction

Usage

running this command to run service

docker-compose up -d db

and then running this command to check database can connection

docker logs -f db

last running this command to running app

docker-compose up -d app

List Service

Feature Status
Authentication ✔️
Event ✔️
Payment ✔️
User ✔️
Dockerize ✔️
Frontend Ongoing
Order ✔️
Monitoring Ongoing
File Handler ✔️
Webhook ✔️

API Documentation

Create User - All User

  • Method : POST
  • Endpoint : /user/register/
  • Header :
    • Content-Type : application/json
    • Accept: application/json
  • Body :
{
    "name": "string",
    "email": "string",
    "password": "string",
    "address": "long",
    "telephone": "string"
}
  • Response :
{
    "code": "number",
    "message": "string",
    "data": {
        "name": "string",
        "email": "string",
        "password": "string",
        "address": "long",
        "telephone": "string",
        "role": "string"
    }
}

Login User - All User

  • Method : POST
  • Endpoint : /user/login/
  • Header :
    • Content-Type : application/json
    • Accept: application/json
  • Body :
{
    "email": "string",
    "password": "string",
}
  • Response :
{
    "code": "number",
    "message": "string",
    "data": {
        "name": "string",
        "email": "string",
        "token": "string"
    }
}

Refresh Token - All User

  • Method : POST
  • Endpoint : /user/refresh-token/
  • Header :
    • Content-Type : application/json
    • Accept: application/json
  • Body :
  • Header :
    • Content-Type : header
  • Body :
Set-Cookie: "token"
  • Response :
{
    "code": "number",
    "message": "string"
}

Validate Token - All User

  • Method : POST
  • Endpoint : /user/validate-token
  • Header :
    • Content-Type : header
  • Body :
{
    "token": "string",
}
  • Response :
{
    "code": "number",
    "message": "string"
}

NotificationSteream Midtrans

  • Method : POST
  • Endpoint : /midtrans/payment-callback/
  • Header :
    • Content-Type : application/json
    • Accept: application/json
  • Response :
response dari midtrans, sebagai callback untuk ke midtrans

Authentication

Semua api wajib di tambahkan authentikasi dari hasil login user

  • Header :
    • Authorization: Token JWT

FindByID Event - All User

  • Method : GET
  • Endpoint : /api/event/{id}
  • Header :
    • Accept: application/json
  • Response :
{
    "code": "number",
    "message": "string",
    "data": {
        "name": "string",
        "desc": "string",
        "price": "int",
        "participant": "array"
    }
}

User Logout - All User

  • Method : DELETE
  • Endpoint : /user/logout/
  • Header :
    • Content-Type : application/json
    • Accept: application/json
  • Body :
  • Header :
    • Content-Type : header
  • Body :
Set-Cookie: "token"
  • Response :
{
    "code": "number",
    "message": "string"
}

Create Order - All User

  • Method : POST
  • Endpoint : /api/order/
  • Header :
    • Accept : application/json
    • Content-Type : application/json
  • Body :
{
    "user_id": "int",
    "event_id": "int"
}
  • Response :
{
    "code": "number",
    "message": "string",
    "data": {
        "uuid": "string",
        "name": "string",
        "email": "string",
        "address": "string",
        "telephone": "string",
        "event_name": "string",
        "event_price": "int"
    }
}

FindByUUID Order - All User

  • Method : GET

  • Endpoint : /api/order/{uuid}

  • Header :

    • Accept : application/json
    • Content-Type : application/json
  • Response :

{
    "code": "number",
    "message": "string",
    "data": {
        "uuid": "string",
        "name": "string",
        "email": "string",
        "address": "string",
        "telephone": "string",
        "event_name": "string",
        "event_price": "int"
    }
}

FindByUserID Order - All User ( all history user )

  • Method : GET

  • Endpoint : /api/order/{user_id}

  • Header :

    • Accept : application/json
    • Content-Type : application/json
  • Response :

{
    "code": "number",
    "message": "string",
    "data": {
        "uuid": "string",
        "name": "string",
        "email": "string",
        "address": "string",
        "telephone": "string",
        "event_name": "string",
        "event_price": "int"
    }
}

FindByUserIDDetail Order - All User ( detail history )

  • Method : GET

  • Endpoint : /api/order/{user_id}/{uuid}

  • Header :

    • Accept : application/json
    • Content-Type : application/json
  • Response :

{
    "code": "number",
    "message": "string",
    "data": {
        "uuid": "string",
        "name": "string",
        "email": "string",
        "address": "string",
        "telephone": "string",
        "event_name": "string",
        "event_price": "int"
    }
}

Checkout Order - All User

  • Method : POST
  • Endpoint : /api/order/checkout/
  • Header :
    • Accept : application/json
    • Content-Type : application/json
{
    "order_id": "int",
}
  • Response :
{
    "code": "number",
    "message": "string",
    "data": {
        "snap_url": "string",
        "token": "string",
        "name": "string",
        "event": "string",
        "price": "int"
    }
}

Create Submission Task - All User

  • Method : POST
  • Endpoint : /api/event/{id}/submission
  • Header :
    • Accept : application/json
    • Content-Type : application/json
{
    "name": "string",
    "user_id": "int",
    "event_id": "int",
    "file": "string"
}
  • Response :
{
    "code": "number",
    "message": "string",
    "data": {
        "name": "string",
        "event": "string",
        "filename": "string"
    }
}

Handling Status Midtrans - Admin

  • Method : GET
  • Endpoint : /api/order/{uuid}/status
  • Header :
    • Accept : application/json
    • Content-Type : application/json
  • Response :
response by midtrans

Create Event - Admin

  • Method : POST
  • Endpoint : /api/event/
  • Header :
    • Content-Type : application/json
    • Accept: application/json
  • Body :
{
    "name": "string",
    "desc": "string",
    "price": "int"
}
  • Response :
{
    "code": "number",
    "message": "string",
    "data": {
        "name": "string",
        "desc": "string",
        "price": "int",
        "participant": "array"
    }
}

Update Event - Admin

  • Method : PUT
  • Endpoint : /api/event/{id}
  • Header :
    • Content-Type : application/json
    • Accept: application/json
  • Body :
{
    "name": "string",
    "desc": "string",
    "price": "int"
}
  • Response :
{
    "code": "number",
    "message": "string",
    "data": {
        "name": "string",
        "desc": "string",
        "price": "int",
        "participant": "array"
    }
}

FindByID Role - Admin

  • Method : GET

  • Endpoint : /api/role/{id}

  • Header :

    • Content-Type : application/json
  • Response :

{
    "code": "number",
    "message": "string",
    "data": {
        "name": "string",
        "description": "text",
        "user": "array",
    }
}

Update Role - Admin

  • Method : PUT
  • Endpoint : /api/role/{id}
  • Header :
    • Content-Type : application/json
    • Accept: application/json
  • Body :
{
    "name": "string",
    "description": "text"
}
  • Response :
{
    "code": "number",
    "message": "string",
    "data": {
        "name": "string",
        "description": "text",
        "user": "array",
    }
}

thebe's People

Contributors

rulanugrh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.