Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 2 additions & 16 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,21 +1,7 @@
# Application
PORT=<http server port (5000)>
ALLOWED_ORIGIN=<allowed origin (http://localhost:5173)>
ACCESS_TOKEN_KEY=<secret jwt access token key>
REFRESH_TOKEN_KEY=<secret jwt refresh token key>
ACCESS_TOKEN_EXPIRATION=<jwt access token expires in seconds>
REFRESH_TOKEN_EXPIRATION=<jwt refresh token expires in seconds>
AUTO_MIGRATE=true

# PostgreSQL
POSTGRES_HOST=<postgres host ('localhost' or 'postgres' in docker compose)>
POSTGRES_HOST=<postgres host ('localhost')>
POSTGRES_PORT=<postgres port (5432)>
POSTGRES_DB=<postgres database name (taskit)>
POSTGRES_USER=<postgres user>
POSTGRES_PASSWORD=<postgres password>
POSTGRES_SSLMODE=<postgres ssl mode (disable | require)>

# PGAdmin
PGADMIN_EMAIL=<pgadmin emailfor login>
PGADMIN_PASSWORD=<pgadmin password for login>
PGADMIN_PORT=<pgadmin port to running>
POSTGRES_SSLMODE=<postgres ssl mode (disable | require)>
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
coverage.out
.env
bin/
.env
coverage.out
20 changes: 0 additions & 20 deletions Dockerfile

This file was deleted.

15 changes: 5 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,20 @@ help:
@echo 'Usage:'
@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /'

## dev: run development server
.PHONY: dev
## run: start main app
.PHONY: run
dev:
@APP_ENV=dev go run cmd/main.go

## mocks: generate or update mocks
.PHONY: mocks
mocks:
@cd internal/domain && mockery --all
@go run cmd/main.go

## test: run tests
.PHONY: test
test:
@go test -v -cover -coverprofile coverage.out ./...

## coverage: run test coverage
## cover: run test & show coverage
.PHONY: cover
cover: test
@go tool cover -html=coverage.out
@go tool cover -func=coverage.out

## migrate/new name=$1: create a new database migration
.PHONY: migrate/new
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ See the [Postman documenter](https://documenter.getpostman.com/view/25225683/2s8

Implement [Clean architecture](https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html) by Robert C. Martin (Uncle Bob)

![project architecture](./docs/architecture.png)

## License

MIT licensed. See the [LICENSE](./LICENSE) file for details.
66 changes: 0 additions & 66 deletions cmd/config/config.go

This file was deleted.

104 changes: 0 additions & 104 deletions cmd/main.go

This file was deleted.

51 changes: 0 additions & 51 deletions docker-compose.yaml

This file was deleted.

Binary file removed docs/architecture.png
Binary file not shown.
36 changes: 28 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,46 @@ module github.com/edwintantawi/taskit
go 1.19

require (
github.com/DATA-DOG/go-sqlmock v1.5.0
github.com/go-chi/chi/v5 v5.0.8
github.com/go-chi/cors v1.2.1
github.com/golang-jwt/jwt/v4 v4.4.3
github.com/golang-migrate/migrate/v4 v4.15.2
github.com/google/uuid v1.3.0
github.com/joho/godotenv v1.4.0
github.com/lib/pq v1.10.7
github.com/ory/dockertest/v3 v3.9.1
github.com/stretchr/testify v1.8.1
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e
)

require (
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/Microsoft/go-winio v0.6.0 // indirect
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect
github.com/cenkalti/backoff/v4 v4.2.0 // indirect
github.com/containerd/continuity v0.3.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/docker/cli v20.10.23+incompatible // indirect
github.com/docker/docker v20.10.23+incompatible // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/kr/pretty v0.3.0 // indirect
github.com/imdario/mergo v0.3.13 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/moby/term v0.0.0-20221205130635-1aeaba878587 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.2 // indirect
github.com/opencontainers/runc v1.1.4 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rogpeppe/go-internal v1.8.0 // indirect
github.com/sirupsen/logrus v1.9.0 // indirect
github.com/stretchr/objx v0.5.0 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
go.uber.org/atomic v1.7.0 // indirect
golang.org/x/mod v0.7.0 // indirect
golang.org/x/net v0.5.0 // indirect
golang.org/x/sys v0.4.0 // indirect
golang.org/x/tools v0.5.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading