shortlink

module
Version: v0.0.0-...-fe7969f Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2021 License: MIT

README

Shortlink service

PkgGoDev codecov Go Report Card Releases LICENSE CII Best Practices


High Level Architecture 🚀

shortlink-arhitecture

Architecture (miro.com)
Services
Service Description Language/Framework Docs
landing Welcome page JS/JQuery
docs Example blog Hugo https://batazor.github.io/shortlink/
next UI service JS/NextJS docs
api GateWay Go docs
link Link service Go docs
proxy Proxy service for redirect to original URL TypeScript
bot Telegram bot JAVA
billing Billing service Go
logger Logger service Go
metadata Parser site by API Go
notify Send notify to smtp, slack, telegram Go
shortctl Shortlink CLI Go docs
csi CSI example Go
ory/kratos User management service Go docs
ory/hydra OAuth 2.0 Provider Go docs
Run
DETAILS

Require Install GIT sub-repository

git submodule update --init --recursive
docker-compose For run
make run
For down
make down
Kubernetes (1.19+) For run
make minikube-up
make helm-shortlink-up
For down
make minikube-down
Skaffold (link) For run
make skaffold-init
make skaffold-up
For down
make skaffold-down
Debug mode
make skaffold-debug

HTTP API

arhitecture.json

Support HTTP REST API:
  • HTTP (chi)
  • gRPC-gateway
  • GraphQL
  • Optional
MQ
OpenTracing

http_add_link

Cloud-Native
Gateway
  • Traefik
  • Nginx
UI
ENV for UI

Use .env file in ui/[next/etc] directories for setting your UI

Name Default Description
NODE_ENV - Select: production, development, etc...
SENTRY_DSN - Your sentry DSN
UI Screenshot
Describe Screenshot
Link Table link table
Mobile
  • Hello World on flutter ;-)
Configuration
DETAILS

12 factors: ENV

View ENV Variables

CoreDNS IP table
Service Ip address Description
store 10.5.0.100 Main database (postgres/mongo/cassandra/redis)
troubleshooting

Sometimes a container without a specified ip may occupy a binding address of another service, which will result in Address already in use.

Ansible
DETAILS

Vagrant

cd ops/vagrant
vagrant up

cd ops/ansible
ansible-playbook playbooks/playbook.yml
DNS/HTTP
  • ui-next.shortlink.vagrant:8081

CI/CD

-~- THE END -~-

Directories

Path Synopsis
cmd
api
Shortlink application API-service
Shortlink application API-service
auth
Auth service
Auth service
billing
Shortlink application Billing-service
Shortlink application Billing-service
cli
CLI tooling - generate ENV-docs
CLI tooling - generate ENV-docs
link
Shortlink application Link-service
Shortlink application Link-service
logger
Shortlink application Logger-service
Shortlink application Logger-service
metadata
Metadata application Get information by links
Metadata application Get information by links
notify
Bot application
Bot application
pkg
csi
rpc
internal
di
di/internal/config
Config package
Config package
pkg/batch
Package for work in batch mode
Package for work in batch mode
pkg/db
Data Base package
Data Base package
pkg/eventsourcing/store
Billing Service.
Billing Service.
pkg/freeport
Get free port
Get free port
pkg/healthcheck
Heath checker
Heath checker
pkg/logger
Logger
Logger
pkg/mq/v1
Message Queue
Message Queue
pkg/notify
Notify system
Notify system
pkg/traicing
Tracing wrapping
Tracing wrapping
services/api/application/grpc_web/v1
Package v1 is a reverse proxy.
Package v1 is a reverse proxy.
Billing Service.
Link Service.
Link entity
Store Endpoint
Store Endpoint
Store Endpoint
Metadata Service.
Metadata Service.
Bot Service

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL