Skip to content

aasumitro/posbe

Repository files navigation

Point of Sales

Authentication

The important part here is in the Login function where we set that sacred JWT Token in a Cookie.

so wee dont need Bearer token in our authorization header.

Create Mocks

Required tools:

How to use

mockery
  --dir=internal/account/repository/mysql
  --name=RoleSqlRepository
  --filename=role_sql_repository.go
  --output=domain/mocks --outpkg=mocks

more info read the docs.

Database Migration

Required tools:

How to use

  • Add new migration

    migrate create -ext sql -dir db/migrations example_table
  • Run Migration

    POSTGRESQL_URL: 'postgresql://postgres:@localhost:5432/posbe?sslmode=disable'

    • set version (dirty state) (version: -1 before last migrate)
       migrate -database ${PG_DSN} -path db/migrations force ${VERSION}
    • up
      migrate -database ${PG_DSN} -path db/migrations up
    • down
      migrate -database ${PG_DSN} -path db/migrations down

more info read the docs.

https://copperchips.com/understanding-resolving-problem-dual-api-calling-reactjs/ https://refine.dev/docs/guides-concepts/data-fetching/#updating-data

About

🚀 WIP: Example Point of Sales

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •