DenChenn / shorturl-maker

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

Home Page:https://dcard-api.yentingchen.me/v1/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

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

https://dcard-api.yentingchen.me/v1/

License:MIT License


Languages

Language:Go 99.2%Language:Dockerfile 0.8%