A web application example to work with a customer object

Wallester Task

This repository contains a web application example to work with a customer object.

  • Build in GO version 1.17.1

Live running app example could be found here

Project structure

cmd

Contains entry point, main setting, middleware and routers.

Please fill main settings in the main.go file to run the application:

  • const portNumber = ":8080" //should be changed if it needs
  • const dbName = ""
  • const dbUser = ""
  • const dbPass = ""
  • const dbHost = ""
  • const dbPort = ""

internal

Contains all app functionality

migrations

Contains database migrations. The app uses Soda CLI. Soda CLI should be installed additional. Also the app could be used without running migrations. Please find the database script in the wallester_db_query.sql file

static

Contains static element of the app as css, javascript and images

templates

Contain app templates

Tests

Unit test examples could be found in the form package: internal/forms/forms_test.go Database functional tests could be found in the repository package: internal/repository/dbrepo/postgres_test.go

For database tests separated database should be used. In this case: wallester_tests. It must have the same structure.

Tests will remove data from the table. In case of using the main database data will be gone.

Comments

Since this application is an example please note:

  • implemented basic search functionality. In real projects it should be done according to business requirements. In case strict search will be used to improve database speed appropriate fields should be indexed.
  • implemented UI pagination. This kind of implementation fits small amounts of data. In other cases the pagination should be done from the backend side (for example with offset and limit or auto incremented field)
  • settings are in the main.go file, but they should be separated for live and dev environments and moved to the additional files for live projects.
  • implemented not all tests.
Similar Resources

๐Ÿ––๐Ÿป A self-hosted Quora like web application written in Go

๐Ÿ––๐Ÿป A self-hosted Quora like web application written in Go

Guora ๐Ÿ––๐Ÿป A self-hosted Quora like web application written in Go ๅŸบไบŽ Golang ็ฑปไผผ็ŸฅไนŽ็š„็งๆœ‰้ƒจ็ฝฒ้—ฎ็ญ”ๅบ”็”จ ๅŒ…ๅซ้—ฎ็ญ”ใ€่ฏ„่ฎบใ€็‚น่ตžใ€็ฎก็†ๅŽๅฐ็ญ‰ๅŠŸ่ƒฝ Quick Start (Docker Deploy) $ docker-comp

Dec 27, 2022

Using golang framework (Gin) to create a web-application

News feeder Using golang framework (Gin) to create a web-application. This simpl

Aug 22, 2022

Go-service-gin - Simple Web api application developed in Golang and Gin

Simple Web api application developed in Golang and Gin Initial Tutorial URL http

Jan 4, 2022

Go kickstart is a simple repository that I'm managing to a have a fast setup for Go web application

Go kickstart is a simple repository that I'm managing to a have a fast setup for Go web application with my most common use cases using practices that I found useful and easy to maintain.

Jan 30, 2022

Ecommerce-api - Rest api of e-commerce web application

Ecommerce-api - Rest api of e-commerce web application

E-commerce Rest API Swagger documentation to test api Domain diagram

Jan 2, 2023

GoVWA - A web application developed to help the pentester and programmers to learn the vulnerabilities

GoVWA - A web application developed to help the pentester and programmers to learn the vulnerabilities

Feb 12, 2022

Jeen is a package wrapper that is used as a web application base for the go language.

Jeen Jeen is a package wrapper that is used as a web application base for the go language. Package Wrappers? Yes, because jeen works by using other av

Feb 21, 2022

Go-watchdog - a web application observability tool built for Go

Go-watchdog - a web application observability tool built for Go

Go-watchdog is a web application observability tool built for Go, it exposes a status endpoint for application services like databases, caches, message-brokers, mails and storages.

Jul 11, 2022

Extract structured data from web sites. Web sites scraping.

Extract structured data from web sites. Web sites scraping.

Dataflow kit Dataflow kit ("DFK") is a Web Scraping framework for Gophers. It extracts data from web pages, following the specified CSS Selectors. You

Jan 7, 2023
A simple example application on how a telemetry client can be written

Telemetry Client This is a simple example application on how a telemetry client can be written. Building This application requires that the Go compile

Dec 8, 2021
A basic example of a go web server with a react frontend
A basic example of a go web server with a react frontend

GO-React starter This is a basic example of a go web server with a react frontend. It uses the go fiber framework Getting started Running locally Clon

Nov 16, 2021
A cross platform single binary tool to work with draw io files

SNIPO SNIPIO is a cross platform single binary tool to work with draw io files With snipio you can do the following operations: list all layers in a d

Jan 7, 2023
Package GoEagi provides some fundamental functionalities that work with Asterisk's EAGI

GoEagi Package GoEagi provides some fundamental functionalities that work with Asterisk's EAGI. It has the following features: Audio Streaming Google'

Dec 16, 2022
A simple database application that I was asked to implement as part of a job application process

This is a simple database application that I was asked to implement as part of a job application process. They told me I could choose any languages an

Nov 24, 2021
sigurlx a web application attack surface mapping tool.

sigurlx a web application attack surface mapping tool, it does ...:

Jul 24, 2021
GoTTY - Share your terminal as a web application
 GoTTY - Share your terminal as a web application

GoTTY - Share your terminal as a web application GoTTY is a simple command line tool that turns your CLI tools into web applications. Installation Fro

Dec 28, 2022
Retro-Floppy UI is a web based application for managing & using a GoTek floppy emulator running the Flash Floppy firmware.
Retro-Floppy UI is a web based application for managing & using a GoTek floppy emulator running the Flash Floppy firmware.

A web user interface for a GoTek running flashfloppy utilising a Raspberry PI 0W as the storage. This allows for remote uploading of files & selecting which disk image is loaded on a retro computer like the BBC Micro or Amiga A1200

Dec 10, 2022
A web application attack surface mapping tool. It takes in a list of urls then performs numerous probes

sigurlscann3r A web application attack surface mapping tool. It takes in a list of urls then performs numerous probes Resources Features Installation

Sep 24, 2022
A simple web application written in Golang which listens on port 8080

GoWebApp It's a simple web application written in Golang which listens on port 8080 Building It can be build using the command go build -o metricsweba

Oct 21, 2021