https://github.com/paulwizviz/lotterystat
The purpose of this project is to demonstrate the development of an application to enable a user perform simple statistical based in past draws using *Golang concurrency* and *SQL DB*. Note, the emphasis of this project to demonstrate software engineering principles.
https://github.com/paulwizviz/lotterystat
concurrency docker docker-compose go golang sql sqlite3
Last synced: 5 months ago
JSON representation
The purpose of this project is to demonstrate the development of an application to enable a user perform simple statistical based in past draws using *Golang concurrency* and *SQL DB*. Note, the emphasis of this project to demonstrate software engineering principles.
- Host: GitHub
- URL: https://github.com/paulwizviz/lotterystat
- Owner: paulwizviz
- License: apache-2.0
- Created: 2020-09-11T21:34:46.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2026-01-21T13:17:58.000Z (5 months ago)
- Last Synced: 2026-01-22T01:25:16.171Z (5 months ago)
- Topics: concurrency, docker, docker-compose, go, golang, sql, sqlite3
- Language: Go
- Homepage:
- Size: 683 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README

# Overview
The objective of this project is to demonstrate software engineering principles by developing an example application in Go that applies *concurrent programming* and *database integration* techniques.
The example application, named `ebz`, extracts UK national lottery results in CSV format, persists data into SQLite and PostgreSQL, and performs simple statistical analyses, such as frequency analysis (see Figure 1). SQLite is the primary database whilst PostgreSQL is the secondary database.

Figure 1 - ebz Functionalities
## Project Layout and Setup
The layout of this project is based on the principles articulated in [this article](https://paulwizviz.github.io/go/2022/12/23/go-proverb-architecture.html).
The project requires the following environmental variables:
```sh
export SQLITE_DB=
export PGADMIN_DEFAULT_EMAIL=
export PGADMIN_DEFAULT_PASSWORD=
export POSTGRES_USER=
export POSTGRES_PASSWORD=
export POSTGRES_HOST=localhost
export POSTGRES_PORT=5432
export POSTGRES_DBNAME=default
```
## Architecture Patterns
This project has incorporated the following architecture patterns:
* [Fan-in and Fan-out](./docs/fan-in-out.md)
## Disclaimer
This project uses UK National Lottery draws for illustrative purposes only. It is intended to demonstrate software engineering principles, **not** to predict lottery results.
Please note that this is an evolving project and is subject to changes without prior notice.
## Copyright notice
Unless otherwise specified, the copyright of this project is assigned as follows.
Copyright 2023 Paul Sitoh
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.