Categorygithub.com/mhkarimi1383/goExpenseTracker
modulepackage
0.0.0-20220806202947-ceaa65632390
Repository: https://github.com/mhkarimi1383/goexpensetracker.git
Documentation: pkg.go.dev

# README

Go Expense Tracker

Go Report Card

Demo

Already deployed at tracker.karimi.dev just contact me to get access

Powered by

  • GoLang
  • GoTemplate
  • OpenIDConnect (like Keycloak or Google)
  • MongoDB
  • Bootstrap
  • Flat Remix CSS
  • Based on goAPIBaseProject

How to bring it up?

since I'm using onedev in my lab you can see that .onedev-buildspec.yml contains configuration needed to build and deploy the project

or

set required variables and run golang project directly

as you can see there are some configurations you need to set in order to build and deploy the project

you can use config file called config.yml or set Environment variables

set environment variables like below and bring up the project

Environment VariablesConfig File KeyDescriptionDefault Value
METRIC_ADDRESSmetric_addressBind address for prometheus exporter:9090
API_ADDRESSapi_addressBind address for main server:8080
SENTRY_DSNsentry_dsnDSN address for sending logs and errors to sentry-
LOG_FORMATlog_formatFormat for logging can be either text or jsontext
APPLICATION_TITLEapplication_titleTitle of application used for Database, etc.goExpenseTracker
APPLICATION_DESCRIPTIONapplication_descriptionDescription of application (not used in this project)-
MONGODB_CONNECTION_URImongodb_connection_uriURI for MongoDB connection-
OPENID_ADDRESSopenid_addressEndpoint of OpenID Provider-
OPENID_CLIENT_SECRETopenid_client_secretSecret from OpenID Connect Provider-
OPENID_CLIENT_IDopenid_client_idID for OpenID Connect Provider Client-
OPENID_USERNAME_KEYopenid_username_keyUnique Key from OpenID Connect Provider to use as username (refer to provider documentation about jwt Token Spec)preferred_username
BASE_URLbase_urlBase URL for application with protocol (http or https and no trailing slash [/])http://127.0.0.1:8080

# Packages

configuration implimentation is here.
No description provided by the author
all http handlers are here.
our custom http server goes here (with logging middleware is here).
logging module with sentry capture on top of logrus TODO: also send logs to logstash.
all types are here.
a package for validating things (like structs, json, etc) based on github.com/go-playground/validator/v10.