Skip to content

kutay-celebi/gotodo

Repository files navigation

Build Status codecov GitHub GitHub last commit Demo

Introduction

This is a simple todo application built by Go and Vue. gin and gorm which are Go library are used in backend development. There is no UI Framework is used in Vue. The developments are made with pure CSS. Frontend developments have been made with TypeScript.

Requirements

  • Docker
  • Make sure you have Go 1.16.6
  • NodeJS

File Structure

/api                // backend
    /todo           // business logic of todo
    /util           // useful tool&functions 
/frontend           // frontend
    /src            
    /components     // ui components
    /layouts        // router layouts
    /model          // api response models.
    /router         // router configs
    /util           // useful tools&functions
    /views          // pages to be rendered via router

About Todo App

This application, which is a simple TODO application, has been worked with new technologies.

Development processes are based on TDD. Both unit tests and E2E tests are available for the UI. E2E tests were performed with cypress and unit tests with jest. On the GO side, an ORM tool gorm is used. In addition, the web framework gin was used on the GO application.

Pipelines are located on travis. The application is distributed with the help of kubernetes.

Screenshot

Run Application on Test Environment

At the root directory of project,

docker-compose -f docker-compose-test.yml up -d 

After that you can reach application localhost:3000

Development

  1. Clone Project
git clone https://github.com/kutay-celebi/gotodo.git
  1. Install frontend dependencies
cd frontend
yarn install
#or 
npm install
  1. Install backend dependencies
cd api
go mod download
  1. Run Development Databse
docker-compose -f docker-compose-dev.yml up -d
  1. Run backend
cd api
DB_HOST=localhost DB_USER=todo DB_PASS=todo go run .
  1. Run Frontend
cd frontend
yarn serve