Skip to content

JohnVicke/klask-backend

Repository files navigation

Klask-Backend

Digital leaderboard for klask hosted in the clouds! ☁

discord GitHub issues GitHub workflow status

Klask Project Structure

Codebase Description
backend GO gcloud Serverless Functions in Firebase
app React Native App
web Svelte "Game interface"

Klask Backend Folder structure

├── ci                          // CI&CD Scripts used in github workflows and actions
│   ├── deploy.sh
│   └── verify-version.sh
├── cmd                         // gcloud functions
│   ├── command1
│   │   ├── go.mod
│   │   ├── go.sum
│   │   ├── command1.go
│   │   ├── command1_test.go
│   │   └── .version
│   └── command2
│       ...
|
├── go.mod
├── go.sum
├── main.go
├── pkg                         // packages
│   ├── package1
│   │   ├── go.mod
│   │   ├── go.sum
│   │   ├── package1.go
│   │   ├── package1_test.go
│   │   └── .version
│   └── package2
│       ...
│ 
├── scripts                     // Developer scripts
│   ├── add_command.sh
│   └── gorun.sh
└── .vscode                     // Recommended VSCode settings
    ├── extensions.json
    └── settings.json

ci

Bash scripts used in the ci/cd pipelines (github workflows). Instead of writing bash straight into workflow yml files, import scripts from /ci.

cmd

Each command is a google cloud serverless function. To add a new command run the script ./scripts/add_command <NewCommandName>. All commands should have 100% test coverage.

pkg

Packages used in commands.

scripts

Developer scripts that are used to make the life of us developers easier.

Development

Recommended development workflow.

Hot reload (similar to nodemon in nodejs)

Go Watch: missing watch mode for the go command. It's invoked exactly like go, but also watches Go files and reruns on changes.

Currently requires Unix (MacOS, Linux, BSD). On Windows, runs under WSL.


Usage in klask-backend:

setup:

go install github.com/mitranim/gow@latest

run main:

gow run .

run tests:

gow test github.com/JohnVicke/klask-backend/...

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published