/Go.Timesheet-App

Golang timesheet app for final task project, working as fullstack developer in this project

Primary LanguageGo

ERD

TMA.png

How to run this project

  • clone this project
git clone https://git.enigmacamp.com/enigma-camp/upskilling-class/01040726-upskilling-angular/final-task/be-timesheet-app/golang-timesheet.git
  • copy the .example.env and make new file .env
cp .example.env .env
  • update library
go mod tidy
  • setting the env file
  • optional (for new update please checkout development)
git checkout development
  • run with
go run .

For documentation

using postman

go-timesheet.postman_collection.json

  • download file above
  • import in postman

look this file to documentation without postman

collection.md

How to use import documentation

  • open postman
  • click import
  • select the file above

Endpoint that already tested

Auth

  • login [POST] localhost:8080/api/v1/login
  • register [POST] localhost:8080/api/v1/admin/register

Works

  • create works [POST] localhost:8080/api/v1/admin/works
  • get works by id [GET] localhost:8080/api/v1/admin/works/:id
  • get all works [GET] localhost:8080/api/v1/admin/works?paging=&rowsPerPage=
  • update works [PUT] localhost:8080/api/v1/admin/works/:id
  • delete works [DELETE] localhost:8080/api/v1/admin/works/:id

Accounts

  • change password [PUT] localhost:8080/api/v1/accounts/change-password
  • get detail profile [GET] localhost:8080/api/v1/accounts/profile
  • activate account [GET] localhost:8080/api/v1/accounts/activate?e&unique
  • upload-signature [POST] localhost:8080/api/v1/accounts/profile/upload-signature
  • update account [PUT] localhost:8080/api/v1/accounts

Admin

  • get all account [GET] localhost:8080/api/v1/admin/accounts
  • detail admin account [GET] localhost:8080/api/v1/admin/accounts/detail/:id
  • get all roles [GET] localhost:8080/api/v1/admin/roles
  • delete account [DELETE] localhost:8080/api/v1/admin/accounts/delete/:id

TimeSheets

  • create timesheet [POST] localhost:8080/api/v1/timesheets
  • get all timesheet [GET] localhost:8080/api/v1/timesheets?period=&userId=&status=
  • update timesheet [PUT] localhost:8080/api/v1/timesheets/:id
  • get timesheet by id [GET] localhost:8080/api/v1/timesheets/:id
  • approved by manager [POST] localhost:8080/api/v1/manager/approve/timesheets/:id
  • rejected by manager [POST] localhost:8080/api/v1/manager/reject/timesheets/:id
  • approved by benefit [POST] localhost:8080/api/v1/benefit/reject/timesheets/:id
  • rejected by benefit [POST] localhost:8080/api/v1/benefit/reject/timesheets/:id