This is a demo project for Dcard, which is currently deployed on GKE.

Overview

Build, Unit Testing, Versioning and Deploy GitHub GitHub Repo stars GitHub release (latest by date)

This is a project for applying my first intern job at Dcard Taiwan Ltd. 😃 !!!
🔗 Backend documentation link 🔗

Company Requirements

  • One POST api for uploading url
  • One GET api for redirecting to original url
  • Use one of the relational databases: MySQL, PostgresSQL, SQLite
  • Use one of the cache database: Redis, Memcached
  • Reasonable error handling
  • No need to consider auth
  • Simultaneously user access handling
  • Non-existent shorten URL access handling

Tech Stack

  • Using Golang Gin framework to build api
  • Using postgresSQL for relational database
  • Using redis for caching database
  • Deploy database and backend server on Google Kubernetes Engine
  • Github Actions for CI / CD
  • Implement semantic versioning with git

Features

  • Deploy backend service on GKE 3-Nodes distributed systems
  • Deploy databases on GKE 3-Nodes distributed systems
  • Handling invalid access and simultaneously access by caching
  • Automatically unit testing in CI/CD workflow using github action
  • Improve CI/CD efficiency with pipeline workflow
  • Automatically semantic versioning in CI/CD workflow base on git label
  • DNS and proxy server configuration using cloudflare

Detail explanation

How do I design my backend system architecture ?
How do I handle simultaneously access and non-existed-url access with cache ?
Why do I choose Gin framework and how do I handle error in it?
How do I integrate both versioning process and unit tests into CI/CD process ?
How do I implement unit tests ?

Future TODO list

  • Build frontend UI with next.js and ts
  • Feature: Upload video and image
  • Feature: User can set password for uploaded resource
Owner
Yenting Chen
NYCU CS/AM | Crazy coder | Enjoy the time creating new stuff
Yenting Chen
Similar Resources

Using Envoy Proxy to load-balance gRPC services on GKE with header value based Session Affinity

Using Envoy Proxy to load-balance gRPC services on GKE with header value based S

Jan 8, 2022

A small utility to generate a kubectl configuration file for all clusters you have access to in GKE.

gke-config-helper A small utility to generate a kubectl configuration file for all clusters you have access to in GKE. Usage $ gke-config-helper The b

Feb 9, 2022

A simple project (which is visitor counter) on kubernetesA simple project (which is visitor counter) on kubernetes

k8s playground This project aims to deploy a simple project (which is visitor counter) on kubernetes. Deploy steps kubectl apply -f secret.yaml kubect

Mar 23, 2022

Golang project for looking up geo from an IP. Meant to be deployed on Render.

geoip-render-go Golang project for looking up geo from an IP. Meant to be deployed on Render. Dependencies In order to use this project, you'll need a

Dec 6, 2021

MagicSummon - A Terminal Game about Mixing Stuff to summon a MONSTER. Currently The Biggest Project I have worked on.

MagicSummon A Terminal Game about Mixing Stuff to summon a MONSTER that the warriors ALMOST defeated, but the MONSTER fled. Getting Started Clone the

Jan 6, 2022

Demo project which implements accumulative loyalty system

Gophermart Demo project which implements accumulative loyalty system POST /api/user/register — user registration; POST /api/user/login — user authenti

Mar 31, 2022

Golang-demo - A repo for app golang-demo; bootstrapped by DevStream

golang-demo This is a repo for app golang-demo; bootstrapped by DevStream. By de

Mar 1, 2022

False-sharing-demo - Demo for performance effects of CPU cache false-sharing

Example of CPU cache false-sharing in Go. A simple example where 2 integer varia

Jun 3, 2022

Litestream-read-replica-demo - A demo application for running live read replication on fly.io with Litestream

Litestream Read Replica Demo A demo application for running live read replicatio

Jun 3, 2022

A simple OCR API server, seriously easy to be deployed by Docker, on Heroku as well

A simple OCR API server, seriously easy to be deployed by Docker, on Heroku as well

ocrserver Simple OCR server, as a small working sample for gosseract. Try now here https://ocr-example.herokuapp.com/, and deploy your own now. Deploy

Jun 24, 2022

:recycle: Now you can easily rollback to previous deployed images whatever you want on k8s environment

EasyRollback EasyRollback is aim to easy rollback to previous images that deployed on k8s environment Installation You should have go installation fir

May 4, 2022

Open source Observability Platform. 👉 SigNoz helps developers find issues in their deployed applications & solve them quickly

Open source Observability Platform. 👉 SigNoz helps developers find issues in their deployed applications & solve them quickly

SigNoz SigNoz is an opensource observability platform. SigNoz uses distributed tracing to gain visibility into your systems and powers data using Kafk

Jun 26, 2022

SigNoz helps developer monitor applications and troubleshoot problems in their deployed applications

SigNoz helps developer monitor applications and troubleshoot problems in their deployed applications

SigNoz helps developers monitor their applications & troubleshoot problems, an open-source alternative to DataDog, NewRelic, etc. 🔥 🖥

Jul 2, 2022

kubescape is the first tool for testing if Kubernetes is deployed securely as defined in Kubernetes Hardening Guidance by to NSA and CISA

kubescape is the first tool for testing if Kubernetes is deployed securely as defined in Kubernetes Hardening Guidance by to NSA and CISA

Kubescape is the first tool for testing if Kubernetes is deployed securely as defined in Kubernetes Hardening Guidance by to NSA and CISA Tests are configured with YAML files, making this tool easy to update as test specifications evolve.

Jun 29, 2022

TinyHat.Me: Microservices deployed with Kubernetes that enable users to propose hat pictures and try on hats from a user-curated database.

TinyHat.Me: Microservices deployed with Kubernetes that enable users to propose hat pictures and try on hats from a user-curated database.

Click here to see the "buggy" version 🐛 The Scenario TinyHat.Me is an up and coming startup that provides an API to allow users to try on tiny hats v

Jun 17, 2022

A docker container that can be deployed as a sidecar on any kubernetes pod to monitor PSI metrics

CgroupV2 PSI Sidecar CgroupV2 PSI Sidecar can be deployed on any kubernetes pod with access to cgroupv2 PSI metrics. About This is a docker container

Nov 23, 2021

Example golang microservices deployed on kubernetes.

Example golang microservices deployed on kubernetes.

Tech Stack Golang RabbitMQ Docker K8S MongoDB Services There are two services which communicate via http(sync) and rabbitmq(async). Services opened to

Dec 24, 2021

REST API written in GO with PostgreSQL and Nginx Proxy + Certbot Let's Encrypt HTTPS certificates + Graphical Frontend in PHP. Deployed via docker-compose.

SSOA-PT REST APP Services Backend: REST API in Go Database: PostgreSQL Web Proxy: Nginx Let's Encrypt HTTPS certificates with certbot Frontend: PHP Ap

Mar 19, 2022
A playground project to create a simple web API backed by a MySQL datastore.

A playground project to create a simple web API backed by a MySQL datastore. Which will allow evaluating ORM & HTTP router Go modules.

Oct 16, 2021
A project for sharing secrets in a quick and secure manner
A project for sharing secrets in a quick and secure manner

Yopass - Share Secrets Securely Yopass is a project for sharing secrets in a quick and secure manner*. The sole purpose of Yopass is to minimize the a

Sep 28, 2021
Automated-gke-cilium-networkpolicy-demo - Quickly provision and tear down a GKE cluster with Cilium enabled for working with Network Policy.

Automated GKE Network Policy Demo Before running the automation, make sure you have the correct variables in env-automation/group_vars/all.yaml. There

Jan 1, 2022
Go-gke-pulumi - A simple example that deploys a GKE cluster and an application to the cluster using pulumi

This example deploys a Google Cloud Platform (GCP) Google Kubernetes Engine (GKE) cluster and an application to it

Jan 25, 2022
A barebones Go app, which can easily be deployed to Heroku

go-getting-started A barebones Go app, which can easily be deployed to Heroku. This application supports the Getting Started with Go on Heroku article

Nov 29, 2021
TibiaData API written in Golang and deployed in container (which contains v3)

TibiaData API in Golang TibiaData API written in Golang and deployed in container (which contains v3) Current status of v3 is in beta and information

Jun 9, 2022
Troon-NFT-Contract is deployed on Flow Blockchain, which is a white-label smart-contract for NFTs with an addition layer of Brand, Schema and Template

Overview Summary of NFTContract NFTContract is a Non Fungible Token (NFT) standard for Flow blockchain. It offers a powerful set while keeping unneces

Jan 4, 2022
An operator for managing ephemeral clusters in GKE

Test Cluster Operator for GKE This operator provides an API-driven cluster provisioning for integration and performance testing of software that integ

Feb 9, 2022
This repo contains example on how to consume secrets from Google Secret Manager from GKE

GKE Secret Manager. Environment setup This repo contains examples of how to consume secrets from Google Secret Manager (GSM) from Google Kubernetes En

May 30, 2022
Install hubble-ui on GKE Dataplane V2

GKE Hubble Export This is a grpc server wrapper that re-export the cilium agent's observer service and peer service from the local domain socket. And

Jun 9, 2022