gotify

module
v0.0.0-...-ac0e98d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2024 License: MIT

README

Gotify

go.mod Go version

Gotify is an application that provides authorization/authentication, user creation, and a notification system. Users can subscribe to topics and receive email notifications when there are updates.

Implementation Notes

Distribution and processing of tasks is done via a asynchronous Redis worker and is run side-by-side with our API in a separate goroutine. Both goroutines are managed by an errgroup and support graceful shutdown and load shedding. For the data layer I decided to use sqlx in combination with the pgx driver.

Running locally

Before running the app create a app.env file and copy all of the configuration from app.env.example. I recommend leaving the defaults but you can optionally add your own email and password. Then simply run:

$ docker-compose up --build

Docs

API documentation is served here when the server is running.

Database documentation can be accessed here.

Features

  • Authorization/Authentication: Secure register & login system to protect users accounts.
  • Notification System: Users can subscribe to topics and receive email notifications.
  • Retry Mechanism: Sending notifications is being retried upon failure.
  • Email Verification: Users are sent a verification email when registered.

Directories

Path Synopsis
cmd
api
Package api binds the crud domain set of routes into the specified app.
Package api binds the crud domain set of routes into the specified app.
api/authgrp
Package authgrp maintains the group of handlers for auth access.
Package authgrp maintains the group of handlers for auth access.
api/ntfgrp
Package ntfgrp maintains the group of handlers for notification access.
Package ntfgrp maintains the group of handlers for notification access.
api/subgrp
Package subgrp maintains the group of handlers for subscription access.
Package subgrp maintains the group of handlers for subscription access.
api/topicgrp
Package topicgrp maintains the group of handlers for topic access.
Package topicgrp maintains the group of handlers for topic access.
api/usergrp
Package usergrp maintains the group of handlers for user access.
Package usergrp maintains the group of handlers for user access.
api/vrfgrp
Package vrfgrp maintains the group of handlers for verification access.
Package vrfgrp maintains the group of handlers for verification access.
docs
swagger
Package swagger Code generated by swaggo/swag.
Package swagger Code generated by swaggo/swag.
internal
core/notification
Package notification provides a core business API.
Package notification provides a core business API.
core/notification/mock
Package mockntf is a generated GoMock package.
Package mockntf is a generated GoMock package.
core/notification/store
Package notificationdb contains notification related CRUD functionality.
Package notificationdb contains notification related CRUD functionality.
core/session
Package session provides a core business API.
Package session provides a core business API.
core/session/mock
Package mocksessn is a generated GoMock package.
Package mocksessn is a generated GoMock package.
core/session/store
Package sessiondb contains session related CRUD functionality.
Package sessiondb contains session related CRUD functionality.
core/subscription
Package subscription provides a core business API.
Package subscription provides a core business API.
core/subscription/mock
Package mocksub is a generated GoMock package.
Package mocksub is a generated GoMock package.
core/subscription/store
Package subscriptiondb contains subscription related CRUD functionality.
Package subscriptiondb contains subscription related CRUD functionality.
core/topic
Package topic provides a core business API.
Package topic provides a core business API.
core/topic/mock
Package mocktpc is a generated GoMock package.
Package mocktpc is a generated GoMock package.
core/topic/store
Package topicdb contains topic related CRUD functionality.
Package topicdb contains topic related CRUD functionality.
core/user
Package user provides a core business API.
Package user provides a core business API.
core/user/mock
Package mockusr is a generated GoMock package.
Package mockusr is a generated GoMock package.
core/user/store
Package userdb contains user related CRUD functionality.
Package userdb contains user related CRUD functionality.
core/verification
Package verification provides a core business API.
Package verification provides a core business API.
core/verification/mock
Package mockvrf is a generated GoMock package.
Package mockvrf is a generated GoMock package.
core/verification/store
Package verificationdb contains verification related CRUD functionality.
Package verificationdb contains verification related CRUD functionality.
worker
Package worker provides support for distributing and processing tasks.
Package worker provides support for distributing and processing tasks.
worker/mock
Package mocktd is a generated GoMock package.
Package mocktd is a generated GoMock package.
pkg
config
Package config provides a configuration setup needed to run the app.
Package config provides a configuration setup needed to run the app.
mailer
Package mailer provides an interface and a Gmail implementation for sending emails.
Package mailer provides an interface and a Gmail implementation for sending emails.
maker
Package maker provides an interface and related functionality for token creation and verification.
Package maker provides an interface and related functionality for token creation and verification.
mid
Package mid contains the set of middleware functions.
Package mid contains the set of middleware functions.
util
Package util provides handy functions for generating random strings.
Package util provides handy functions for generating random strings.
validate
Package validate contains the support for validating models.
Package validate contains the support for validating models.
platform
database
Package database provides support for accessing the database.
Package database provides support for accessing the database.
logger
Package logger provides a convience function to constructing a logger for use.
Package logger provides a convience function to constructing a logger for use.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL